@adminide-stack/core 3.1.2-alpha.0 → 3.1.2-alpha.101
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/constants/configuration.d.ts +2 -1
- package/lib/constants/configuration.js +3 -2
- package/lib/constants/configuration.js.map +1 -1
- package/lib/core/configurations/configuration.d.ts +31 -15
- package/lib/core/configurations/configuration.js +279 -47
- package/lib/core/configurations/configuration.js.map +1 -1
- package/lib/core/configurations/configuration.test.d.ts +1 -0
- package/lib/core/configurations/configuration.test.js +20 -0
- package/lib/core/configurations/configuration.test.js.map +1 -0
- package/lib/core/configurations/events/AbstractConfigurationChangEvent.d.ts +0 -0
- package/lib/core/configurations/events/AbstractConfigurationChangEvent.js +25 -0
- package/lib/core/configurations/events/AbstractConfigurationChangEvent.js.map +1 -0
- package/lib/core/configurations/events/AllKeysConfigurationChangeEvent.d.ts +0 -0
- package/lib/core/configurations/events/AllKeysConfigurationChangeEvent.js +27 -0
- package/lib/core/configurations/events/AllKeysConfigurationChangeEvent.js.map +1 -0
- package/lib/core/configurations/events/ConfigurationChangeEvent.d.ts +21 -0
- package/lib/core/configurations/events/ConfigurationChangeEvent.js +59 -0
- package/lib/core/configurations/events/ConfigurationChangeEvent.js.map +1 -0
- package/lib/core/configurations/events/OrganizationConfigurationChangeEvent.d.ts +0 -0
- package/lib/core/configurations/events/OrganizationConfigurationChangeEvent.js +37 -0
- package/lib/core/configurations/events/OrganizationConfigurationChangeEvent.js.map +1 -0
- package/lib/core/configurations/events/index.d.ts +1 -4
- package/lib/core/configurations/events/index.js +4 -4
- package/lib/core/configurations/events/index.js.map +1 -1
- package/lib/core/configurations/helpers/configuration.d.ts +2 -8
- package/lib/core/configurations/helpers/configuration.js +23 -40
- package/lib/core/configurations/helpers/configuration.js.map +1 -1
- package/lib/core/configurations/models/{configuration-model.d.ts → ConfigurationModel.d.ts} +11 -4
- package/lib/core/configurations/models/{configuration-model.js → ConfigurationModel.js} +89 -29
- package/lib/core/configurations/models/ConfigurationModel.js.map +1 -0
- package/lib/core/configurations/models/ConfigurationModel.test.d.ts +1 -0
- package/lib/core/configurations/models/ConfigurationModel.test.js +172 -0
- package/lib/core/configurations/models/ConfigurationModel.test.js.map +1 -0
- package/lib/core/configurations/models/index.d.ts +1 -1
- package/lib/core/configurations/models/index.js +1 -1
- package/lib/core/configurations/models/index.js.map +1 -1
- package/lib/core/organization/configuration.d.ts +4 -19
- package/lib/core/organization/configuration.js +2 -68
- package/lib/core/organization/configuration.js.map +1 -1
- package/lib/enums/integrations.d.ts +2 -1
- package/lib/enums/integrations.js +1 -0
- package/lib/enums/integrations.js.map +1 -1
- package/lib/errors/auth-error-messages.js +1 -1
- package/lib/interfaces/configuration/configuration.d.ts +89 -1
- package/lib/interfaces/configuration/configuration.js +8 -0
- package/lib/interfaces/configuration/configuration.js.map +1 -1
- package/lib/interfaces/configuration/configurationRegistry.d.ts +144 -0
- package/lib/interfaces/configuration/configurationRegistry.js +3 -0
- package/lib/interfaces/configuration/configurationRegistry.js.map +1 -0
- package/lib/interfaces/configuration/configuraton-service.d.ts +7 -11
- package/lib/interfaces/configuration/event.d.ts +7 -10
- package/lib/interfaces/configuration/index.d.ts +1 -0
- package/lib/interfaces/configuration/index.js +1 -0
- package/lib/interfaces/configuration/index.js.map +1 -1
- package/lib/interfaces/generated/generated-models.d.ts +989 -442
- package/lib/interfaces/generated/generated-models.js +116 -128
- package/lib/interfaces/generated/generated-models.js.map +1 -1
- package/lib/interfaces/workbench-exports.d.ts +0 -4
- package/lib/interfaces/workbench-exports.js +3 -0
- package/lib/interfaces/workbench-exports.js.map +1 -1
- package/lib/services/abstract-configuration.d.ts +12 -12
- package/lib/services/abstract-configuration.js +59 -6
- package/lib/services/abstract-configuration.js.map +1 -1
- package/lib/services/abstract-organization-context-service.js +5 -5
- package/lib/services/abstract-organization-context-service.js.map +1 -1
- package/package.json +6 -3
- package/lib/core/configurations/events/abstract-configuration-change-event.d.ts +0 -6
- package/lib/core/configurations/events/abstract-configuration-change-event.js +0 -27
- package/lib/core/configurations/events/abstract-configuration-change-event.js.map +0 -1
- package/lib/core/configurations/events/all-keys-configuration-change-event.d.ts +0 -17
- package/lib/core/configurations/events/all-keys-configuration-change-event.js +0 -33
- package/lib/core/configurations/events/all-keys-configuration-change-event.js.map +0 -1
- package/lib/core/configurations/events/configuration-change-event.d.ts +0 -24
- package/lib/core/configurations/events/configuration-change-event.js +0 -84
- package/lib/core/configurations/events/configuration-change-event.js.map +0 -1
- package/lib/core/configurations/events/organization-configuration-change-event.d.ts +0 -15
- package/lib/core/configurations/events/organization-configuration-change-event.js +0 -39
- package/lib/core/configurations/events/organization-configuration-change-event.js.map +0 -1
- package/lib/core/configurations/models/configuration-model.js.map +0 -1
@@ -0,0 +1,144 @@
|
|
1
|
+
import { IStringDictionary } from "@vscode-alt/monaco-editor/esm/vs/base/common/collections";
|
2
|
+
import { IJSONSchema } from "@vscode-alt/monaco-editor/esm/vs/base/common/jsonSchema";
|
3
|
+
import { Event } from '@vscode-alt/monaco-editor/esm/vs/base/common/event';
|
4
|
+
import { ConfigurationScope, EditPresentationTypes } from '@workbench-stack/core';
|
5
|
+
import { IConfigurationNode, IExtensionInfo, IConfigurationDelta, IConfigurationDefaults, IConfigurationDefaultOverride } from "./configuration";
|
6
|
+
export declare type PolicyName = string;
|
7
|
+
export interface IPolicy {
|
8
|
+
/**
|
9
|
+
* The policy name.
|
10
|
+
*/
|
11
|
+
readonly name: PolicyName;
|
12
|
+
/**
|
13
|
+
* The Code version in which this policy was introduced.
|
14
|
+
*/
|
15
|
+
readonly minimumVersion: `${number}.${number}`;
|
16
|
+
}
|
17
|
+
export interface IConfigurationPropertySchema extends IJSONSchema {
|
18
|
+
scope?: ConfigurationScope;
|
19
|
+
/**
|
20
|
+
* When restricted, value of this configuration will be read only from trusted sources.
|
21
|
+
* For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.
|
22
|
+
*/
|
23
|
+
restricted?: boolean;
|
24
|
+
/**
|
25
|
+
* When `false` this property is excluded from the registry. Default is to include.
|
26
|
+
*/
|
27
|
+
included?: boolean;
|
28
|
+
/**
|
29
|
+
* List of tags associated to the property.
|
30
|
+
* - A tag can be used for filtering
|
31
|
+
* - Use `experimental` tag for marking the setting as experimental. **Note:** Defaults of experimental settings can be changed by the running experiments.
|
32
|
+
*/
|
33
|
+
tags?: string[];
|
34
|
+
/**
|
35
|
+
* When enabled this setting is ignored during sync and user can override this.
|
36
|
+
*/
|
37
|
+
ignoreSync?: boolean;
|
38
|
+
/**
|
39
|
+
* When enabled this setting is ignored during sync and user cannot override this.
|
40
|
+
*/
|
41
|
+
disallowSyncIgnore?: boolean;
|
42
|
+
/**
|
43
|
+
* Labels for enumeration items
|
44
|
+
*/
|
45
|
+
enumItemLabels?: string[];
|
46
|
+
/**
|
47
|
+
* When specified, controls the presentation format of string settings.
|
48
|
+
* Otherwise, the presentation format defaults to `singleline`.
|
49
|
+
*/
|
50
|
+
editPresentation?: EditPresentationTypes;
|
51
|
+
/**
|
52
|
+
* When specified, gives an order number for the setting
|
53
|
+
* within the settings editor. Otherwise, the setting is placed at the end.
|
54
|
+
*/
|
55
|
+
order?: number;
|
56
|
+
/**
|
57
|
+
* When specified, this setting's value can always be overwritten by
|
58
|
+
* a system-wide policy.
|
59
|
+
*/
|
60
|
+
policy?: IPolicy;
|
61
|
+
}
|
62
|
+
export declare type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & {
|
63
|
+
defaultDefaultValue?: any;
|
64
|
+
source?: IExtensionInfo;
|
65
|
+
defaultValueSource?: IExtensionInfo | string;
|
66
|
+
};
|
67
|
+
export interface IConfigurationRegistry {
|
68
|
+
/**
|
69
|
+
* Register a configuration to the registry.
|
70
|
+
*/
|
71
|
+
registerConfiguration(configuration: IConfigurationNode): void;
|
72
|
+
/**
|
73
|
+
* Register multiple configurations to the registry.
|
74
|
+
*/
|
75
|
+
registerConfigurations(configurations: IConfigurationNode[], validate?: boolean): void;
|
76
|
+
/**
|
77
|
+
* Deregister multiple configurations from the registry.
|
78
|
+
*/
|
79
|
+
deregisterConfigurations(configurations: IConfigurationNode[]): void;
|
80
|
+
/**
|
81
|
+
* update the configuration registry by
|
82
|
+
* - registering the configurations to add
|
83
|
+
* - dereigstering the configurations to remove
|
84
|
+
*/
|
85
|
+
updateConfigurations(configurations: {
|
86
|
+
add: IConfigurationNode[];
|
87
|
+
remove: IConfigurationNode[];
|
88
|
+
}): void;
|
89
|
+
/**
|
90
|
+
* Register multiple default configurations to the registry.
|
91
|
+
*/
|
92
|
+
registerDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;
|
93
|
+
/**
|
94
|
+
* Deregister multiple default configurations from the registry.
|
95
|
+
*/
|
96
|
+
deregisterDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;
|
97
|
+
/**
|
98
|
+
* Bulk update of the configuration registry (default and configurations, remove and add)
|
99
|
+
* @param delta
|
100
|
+
*/
|
101
|
+
deltaConfiguration(delta: IConfigurationDelta): void;
|
102
|
+
/**
|
103
|
+
* Return the registered configuration defaults overrides
|
104
|
+
*/
|
105
|
+
getConfigurationDefaultsOverrides(): Map<string, IConfigurationDefaultOverride>;
|
106
|
+
/**
|
107
|
+
* Signal that the schema of a configuration setting has changes. It is currently only supported to change enumeration values.
|
108
|
+
* Property or default value changes are not allowed.
|
109
|
+
*/
|
110
|
+
notifyConfigurationSchemaUpdated(...configurations: IConfigurationNode[]): void;
|
111
|
+
/**
|
112
|
+
* Event that fires whenever a configuration has been
|
113
|
+
* registered.
|
114
|
+
*/
|
115
|
+
readonly onDidSchemaChange: Event<void>;
|
116
|
+
/**
|
117
|
+
* Event that fires whenever a configuration has been
|
118
|
+
* registered.
|
119
|
+
*/
|
120
|
+
readonly onDidUpdateConfiguration: Event<{
|
121
|
+
properties: ReadonlySet<string>;
|
122
|
+
defaultsOverrides?: boolean;
|
123
|
+
}>;
|
124
|
+
/**
|
125
|
+
* Returns all configuration nodes contributed to this registry.
|
126
|
+
*/
|
127
|
+
getConfigurations(): IConfigurationNode[];
|
128
|
+
/**
|
129
|
+
* Returns all configurations settings of all configuration nodes contributed to this registry.
|
130
|
+
*/
|
131
|
+
getConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;
|
132
|
+
/**
|
133
|
+
* Return all configurations by policy name
|
134
|
+
*/
|
135
|
+
getPolicyConfigurations(): Map<PolicyName, string>;
|
136
|
+
/**
|
137
|
+
* Returns all excluded configurations settings of all configuration nodes contributed to this registry.
|
138
|
+
*/
|
139
|
+
getExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;
|
140
|
+
/**
|
141
|
+
* Register the identifiers for editor configurations
|
142
|
+
*/
|
143
|
+
registerOverrideIdentifiers(identifiers: string[]): void;
|
144
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"configurationRegistry.js","sourceRoot":"","sources":["../../../src/interfaces/configuration/configurationRegistry.ts"],"names":[],"mappings":""}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Event } from '@vscode-alt/monaco-editor/esm/vs/base/common/event';
|
2
|
-
import {
|
2
|
+
import { IDisposable } from '@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle';
|
3
|
+
import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
4
|
+
import { ConfigurationTarget, IConfigurationValue } from './configuration';
|
3
5
|
import { IConfigurationChangeEvent } from './event';
|
4
6
|
import { IConfigurationOverrides, IConfigurationData, IConfigurationModel, IIResourceData, IIConfigurationModel } from '../generated';
|
5
|
-
import { IDisposable } from '@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle';
|
6
7
|
import { IOrganizationContext } from '../organization';
|
7
|
-
import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
8
8
|
export interface IConfigurationService extends IDisposable {
|
9
9
|
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
10
10
|
getConfigurationData(): IConfigurationData;
|
@@ -35,14 +35,7 @@ export interface IConfigurationService extends IDisposable {
|
|
35
35
|
*/
|
36
36
|
reloadConfiguration(resource: any): Promise<void>;
|
37
37
|
initialize(organizationContext: IOrganizationContext): Promise<void>;
|
38
|
-
inspect<T>(key: string, overrides?: IConfigurationOverrides):
|
39
|
-
default: T;
|
40
|
-
user: T;
|
41
|
-
organization?: T;
|
42
|
-
organizationResource?: T;
|
43
|
-
memory?: T;
|
44
|
-
value: T;
|
45
|
-
};
|
38
|
+
inspect<T>(key: string, overrides?: IConfigurationOverrides): IConfigurationValue<T>;
|
46
39
|
keys(): {
|
47
40
|
default: string[];
|
48
41
|
user: string[];
|
@@ -55,6 +48,9 @@ export interface IClientConfigurationService extends IConfigurationService {
|
|
55
48
|
externalConfiguration?(resource: URI): IConfigurationModel;
|
56
49
|
extAcceptConfigurationChanged(data: IConfigurationData, event: IConfigurationChangeEvent): void;
|
57
50
|
}
|
51
|
+
export interface IUserClientConfigurationService extends IClientConfigurationService {
|
52
|
+
userId: string;
|
53
|
+
}
|
58
54
|
export interface IConfigurationMicroserviceEvent {
|
59
55
|
onDidChangeConfiguration: (event: IConfigurationChangeEvent) => Promise<void>;
|
60
56
|
}
|
@@ -1,12 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { ResourceMap } from '@vscode-alt/monaco-editor/esm/vs/base/common/map';
|
4
|
-
import { IConfigurationModel } from '../generated';
|
1
|
+
import { IConfigurationOverrides } from '../generated';
|
2
|
+
import { ConfigurationTarget, IConfigurationChange } from './configuration';
|
5
3
|
export interface IConfigurationChangeEvent {
|
6
|
-
source: ConfigurationTarget;
|
7
|
-
affectedKeys: string[];
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
changedConfigurationByResource: ResourceMap<IConfigurationModel>;
|
4
|
+
readonly source: ConfigurationTarget;
|
5
|
+
readonly affectedKeys: string[];
|
6
|
+
readonly change: IConfigurationChange;
|
7
|
+
affectsConfiguration(configuration: string, overrides?: IConfigurationOverrides): boolean;
|
8
|
+
readonly sourceConfig: any;
|
12
9
|
}
|
@@ -19,4 +19,5 @@ __exportStar(require("./event"), exports);
|
|
19
19
|
__exportStar(require("./configuraton-service"), exports);
|
20
20
|
__exportStar(require("./configuration-server-service"), exports);
|
21
21
|
__exportStar(require("./configuration-file-service"), exports);
|
22
|
+
__exportStar(require("./configurationRegistry"), exports);
|
22
23
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,0CAAwB;AACxB,yDAAuC;AACvC,iEAA+C;AAC/C,+DAA6C"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,0CAAwB;AACxB,yDAAuC;AACvC,iEAA+C;AAC/C,+DAA6C;AAC7C,0DAAwC"}
|