@adminide-stack/core 0.1.1 → 1.0.201-alpha.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/LICENSE +674 -0
- package/README.md +2 -2
- package/lib/constants/billing-plan.d.ts +1 -0
- package/lib/constants/billing-plan.js +5 -0
- package/lib/constants/billing-plan.js.map +1 -0
- package/lib/constants/configuration.d.ts +6 -0
- package/lib/constants/configuration.js +10 -0
- package/lib/constants/configuration.js.map +1 -0
- package/lib/constants/constants.d.ts +2 -7
- package/lib/constants/constants.js +6 -0
- package/lib/constants/constants.js.map +1 -0
- package/lib/constants/default-workspace-config.d.ts +3 -0
- package/lib/constants/default-workspace-config.js +7 -0
- package/lib/constants/default-workspace-config.js.map +1 -0
- package/lib/constants/index.d.ts +6 -0
- package/lib/constants/index.js +20 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/routes.d.ts +4 -0
- package/lib/constants/routes.js +10 -0
- package/lib/constants/routes.js.map +1 -0
- package/lib/constants/types.d.ts +19 -0
- package/lib/constants/types.js +23 -0
- package/lib/constants/types.js.map +1 -0
- package/lib/constants/urls.d.ts +3 -0
- package/lib/constants/urls.js +7 -0
- package/lib/constants/urls.js.map +1 -0
- package/lib/core/configurations/configuration.d.ts +64 -0
- package/lib/core/configurations/configuration.js +236 -0
- package/lib/core/configurations/configuration.js.map +1 -0
- package/lib/core/configurations/events/abstract-configuration-change-event.d.ts +6 -0
- package/lib/core/configurations/events/abstract-configuration-change-event.js +27 -0
- package/lib/core/configurations/events/abstract-configuration-change-event.js.map +1 -0
- package/lib/core/configurations/events/all-keys-configuration-change-event.d.ts +17 -0
- package/lib/core/configurations/events/all-keys-configuration-change-event.js +33 -0
- package/lib/core/configurations/events/all-keys-configuration-change-event.js.map +1 -0
- package/lib/core/configurations/events/configuration-change-event.d.ts +24 -0
- package/lib/core/configurations/events/configuration-change-event.js +84 -0
- package/lib/core/configurations/events/configuration-change-event.js.map +1 -0
- package/lib/core/configurations/events/index.d.ts +4 -0
- package/lib/core/configurations/events/index.js +17 -0
- package/lib/core/configurations/events/index.js.map +1 -0
- package/lib/core/configurations/events/organization-configuration-change-event.d.ts +15 -0
- package/lib/core/configurations/events/organization-configuration-change-event.js +39 -0
- package/lib/core/configurations/events/organization-configuration-change-event.js.map +1 -0
- package/lib/core/configurations/helpers/configuration.d.ts +26 -0
- package/lib/core/configurations/helpers/configuration.js +203 -0
- package/lib/core/configurations/helpers/configuration.js.map +1 -0
- package/lib/core/configurations/helpers/index.d.ts +1 -0
- package/lib/core/configurations/helpers/index.js +14 -0
- package/lib/core/configurations/helpers/index.js.map +1 -0
- package/lib/core/configurations/index.d.ts +4 -0
- package/lib/core/configurations/index.js +17 -0
- package/lib/core/configurations/index.js.map +1 -0
- package/lib/core/configurations/models/configuration-model.d.ts +24 -0
- package/lib/core/configurations/models/configuration-model.js +143 -0
- package/lib/core/configurations/models/configuration-model.js.map +1 -0
- package/lib/core/configurations/models/index.d.ts +1 -0
- package/lib/core/configurations/models/index.js +14 -0
- package/lib/core/configurations/models/index.js.map +1 -0
- package/lib/core/disposable.d.ts +28 -0
- package/lib/core/disposable.js +82 -0
- package/lib/core/disposable.js.map +1 -0
- package/lib/core/event.d.ts +76 -0
- package/lib/core/event.js +262 -0
- package/lib/core/event.js.map +1 -0
- package/lib/core/event.test.d.ts +1 -0
- package/lib/core/event.test.js +15 -0
- package/lib/core/event.test.js.map +1 -0
- package/lib/core/index.d.ts +6 -0
- package/lib/core/index.js +19 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/organization/configuration.d.ts +31 -0
- package/lib/core/organization/configuration.js +87 -0
- package/lib/core/organization/configuration.js.map +1 -0
- package/lib/core/organization/helpers/index.d.ts +1 -0
- package/lib/core/organization/helpers/index.js +14 -0
- package/lib/core/organization/helpers/index.js.map +1 -0
- package/lib/core/organization/helpers/organization-helpers.d.ts +6 -0
- package/lib/core/organization/helpers/organization-helpers.js +34 -0
- package/lib/core/organization/helpers/organization-helpers.js.map +1 -0
- package/lib/core/organization/index.d.ts +3 -0
- package/lib/core/organization/index.js +16 -0
- package/lib/core/organization/index.js.map +1 -0
- package/lib/core/organization/organization.d.ts +31 -0
- package/lib/core/organization/organization.js +135 -0
- package/lib/core/organization/organization.js.map +1 -0
- package/lib/core/path.d.ts +58 -0
- package/lib/core/path.js +189 -0
- package/lib/core/path.js.map +1 -0
- package/lib/core/path.test.d.ts +1 -0
- package/lib/core/path.test.js +205 -0
- package/lib/core/path.test.js.map +1 -0
- package/lib/core/types.d.ts +1 -0
- package/lib/core/types.js +3 -0
- package/lib/core/types.js.map +1 -0
- package/lib/core/uri.d.ts +68 -0
- package/lib/core/uri.js +158 -0
- package/lib/core/uri.js.map +1 -0
- package/lib/core/uri.test.d.ts +1 -0
- package/lib/core/uri.test.js +136 -0
- package/lib/core/uri.test.js.map +1 -0
- package/lib/enums/connection-status.d.ts +6 -0
- package/lib/enums/connection-status.js +11 -0
- package/lib/enums/connection-status.js.map +1 -0
- package/lib/enums/index.d.ts +7 -0
- package/lib/enums/index.js +20 -0
- package/lib/enums/index.js.map +1 -0
- package/lib/enums/integration-configuration-status.d.ts +5 -0
- package/lib/enums/integration-configuration-status.js +10 -0
- package/lib/enums/integration-configuration-status.js.map +1 -0
- package/lib/enums/integrations-configuration-steps.d.ts +7 -0
- package/lib/enums/integrations-configuration-steps.js +12 -0
- package/lib/enums/integrations-configuration-steps.js.map +1 -0
- package/lib/enums/integrations-connection-names.d.ts +11 -0
- package/lib/enums/integrations-connection-names.js +17 -0
- package/lib/enums/integrations-connection-names.js.map +1 -0
- package/lib/enums/integrations.d.ts +9 -0
- package/lib/enums/integrations.js +14 -0
- package/lib/enums/integrations.js.map +1 -0
- package/lib/enums/permissions.d.ts +7 -0
- package/lib/enums/permissions.js +12 -0
- package/lib/enums/permissions.js.map +1 -0
- package/lib/enums/team-member-status.d.ts +4 -0
- package/lib/enums/team-member-status.js +9 -0
- package/lib/enums/team-member-status.js.map +1 -0
- package/lib/errors/auth-error-messages.d.ts +25 -0
- package/lib/errors/auth-error-messages.js +31 -0
- package/lib/errors/auth-error-messages.js.map +1 -0
- package/lib/errors/auth-error.d.ts +8 -0
- package/lib/errors/auth-error.js +13 -0
- package/lib/errors/auth-error.js.map +1 -0
- package/lib/errors/index.d.ts +2 -0
- package/lib/errors/index.js +15 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +19 -143
- package/lib/index.js.map +1 -1
- package/lib/interfaces/apollo-context.d.ts +48 -0
- package/lib/interfaces/apollo-context.js +3 -0
- package/lib/interfaces/apollo-context.js.map +1 -0
- package/lib/interfaces/common.d.ts +7 -0
- package/lib/interfaces/common.js +3 -0
- package/lib/interfaces/common.js.map +1 -0
- package/lib/interfaces/configuration/configuration-file-service.d.ts +5 -0
- package/lib/interfaces/configuration/configuration-file-service.js +3 -0
- package/lib/interfaces/configuration/configuration-file-service.js.map +1 -0
- package/lib/interfaces/configuration/configuration-server-service.d.ts +10 -0
- package/lib/interfaces/configuration/configuration-server-service.js +3 -0
- package/lib/interfaces/configuration/configuration-server-service.js.map +1 -0
- package/lib/interfaces/configuration/configuration.d.ts +39 -0
- package/lib/interfaces/configuration/configuration.js +51 -0
- package/lib/interfaces/configuration/configuration.js.map +1 -0
- package/lib/interfaces/configuration/configuraton-service.d.ts +60 -0
- package/lib/interfaces/configuration/configuraton-service.js +3 -0
- package/lib/interfaces/configuration/configuraton-service.js.map +1 -0
- package/lib/interfaces/configuration/event.d.ts +12 -0
- package/lib/interfaces/configuration/event.js +3 -0
- package/lib/interfaces/configuration/event.js.map +1 -0
- package/lib/interfaces/configuration/index.d.ts +5 -0
- package/lib/interfaces/configuration/index.js +18 -0
- package/lib/interfaces/configuration/index.js.map +1 -0
- package/lib/interfaces/contex-key-service.d.ts +2 -0
- package/lib/interfaces/contex-key-service.js +3 -0
- package/lib/interfaces/contex-key-service.js.map +1 -0
- package/lib/interfaces/database-migration.d.ts +8 -0
- package/lib/interfaces/database-migration.js +3 -0
- package/lib/interfaces/database-migration.js.map +1 -0
- package/lib/interfaces/enum.d.ts +26 -0
- package/lib/interfaces/enum.js +71 -0
- package/lib/interfaces/enum.js.map +1 -0
- package/lib/interfaces/environment/argv.d.ts +6 -0
- package/lib/interfaces/environment/argv.js +3 -0
- package/lib/interfaces/environment/argv.js.map +1 -0
- package/lib/interfaces/environment/environment-service.d.ts +7 -0
- package/lib/interfaces/environment/environment-service.js +3 -0
- package/lib/interfaces/environment/environment-service.js.map +1 -0
- package/lib/interfaces/environment/index.d.ts +2 -0
- package/lib/interfaces/environment/index.js +15 -0
- package/lib/interfaces/environment/index.js.map +1 -0
- package/lib/interfaces/generated/generated-models.d.ts +10956 -0
- package/lib/interfaces/generated/generated-models.js +3980 -0
- package/lib/interfaces/generated/generated-models.js.map +1 -0
- package/lib/interfaces/generated/index.d.ts +1 -0
- package/lib/interfaces/generated/index.js +14 -0
- package/lib/interfaces/generated/index.js.map +1 -0
- package/lib/interfaces/index.d.ts +17 -1
- package/lib/interfaces/index.js +30 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/lifecycle-service.d.ts +1 -0
- package/lib/interfaces/lifecycle-service.js +8 -0
- package/lib/interfaces/lifecycle-service.js.map +1 -0
- package/lib/interfaces/log/index.d.ts +1 -0
- package/lib/interfaces/log/index.js +14 -0
- package/lib/interfaces/log/index.js.map +1 -0
- package/lib/interfaces/log/log-service.d.ts +16 -0
- package/lib/interfaces/log/log-service.js +3 -0
- package/lib/interfaces/log/log-service.js.map +1 -0
- package/lib/interfaces/nav-items.d.ts +5 -0
- package/lib/interfaces/nav-items.js +3 -0
- package/lib/interfaces/nav-items.js.map +1 -0
- package/lib/interfaces/organization/index.d.ts +3 -0
- package/lib/interfaces/organization/index.js +16 -0
- package/lib/interfaces/organization/index.js.map +1 -0
- package/lib/interfaces/organization/organization-context-service.d.ts +65 -0
- package/lib/interfaces/organization/organization-context-service.js +3 -0
- package/lib/interfaces/organization/organization-context-service.js.map +1 -0
- package/lib/interfaces/organization/organization-context.d.ts +39 -0
- package/lib/interfaces/organization/organization-context.js +31 -0
- package/lib/interfaces/organization/organization-context.js.map +1 -0
- package/lib/interfaces/organization/organizations-context.d.ts +35 -0
- package/lib/interfaces/organization/organizations-context.js +3 -0
- package/lib/interfaces/organization/organizations-context.js.map +1 -0
- package/lib/interfaces/page-store.d.ts +16 -0
- package/lib/interfaces/page-store.js +3 -0
- package/lib/interfaces/page-store.js.map +1 -0
- package/lib/interfaces/permissions.d.ts +2 -0
- package/lib/interfaces/permissions.js +3 -0
- package/lib/interfaces/permissions.js.map +1 -0
- package/lib/interfaces/preferences-service.d.ts +40 -0
- package/lib/interfaces/preferences-service.js +3 -0
- package/lib/interfaces/preferences-service.js.map +1 -0
- package/lib/interfaces/service.d.ts +18 -0
- package/lib/interfaces/service.js +3 -0
- package/lib/interfaces/service.js.map +1 -0
- package/lib/interfaces/workbench-exports.d.ts +5 -0
- package/lib/interfaces/workbench-exports.js +6 -0
- package/lib/interfaces/workbench-exports.js.map +1 -0
- package/lib/modules/account-api/enums/index.d.ts +51 -0
- package/lib/modules/account-api/enums/index.js +56 -0
- package/lib/modules/account-api/enums/index.js.map +1 -0
- package/lib/modules/account-api/index.d.ts +1 -0
- package/lib/modules/account-api/index.js +14 -0
- package/lib/modules/account-api/index.js.map +1 -0
- package/lib/modules/billing-api/enums/index.d.ts +22 -0
- package/lib/modules/billing-api/enums/index.js +28 -0
- package/lib/modules/billing-api/enums/index.js.map +1 -0
- package/lib/modules/billing-api/index.d.ts +1 -0
- package/lib/modules/billing-api/index.js +14 -0
- package/lib/modules/billing-api/index.js.map +1 -0
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/index.js +15 -0
- package/lib/modules/index.js.map +1 -0
- package/lib/services/abstract-configuration.d.ts +54 -0
- package/lib/services/abstract-configuration.js +80 -0
- package/lib/services/abstract-configuration.js.map +1 -0
- package/lib/services/abstract-organization-context-service.d.ts +40 -0
- package/lib/services/abstract-organization-context-service.js +115 -0
- package/lib/services/abstract-organization-context-service.js.map +1 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.js +15 -0
- package/lib/services/index.js.map +1 -0
- package/lib/utils/configuration-utils.d.ts +4 -0
- package/lib/utils/configuration-utils.js +15 -0
- package/lib/utils/configuration-utils.js.map +1 -0
- package/lib/utils/date-utils.d.ts +1 -0
- package/lib/utils/date-utils.js +9 -0
- package/lib/utils/date-utils.js.map +1 -0
- package/lib/utils/flatten-utils.d.ts +1 -0
- package/lib/utils/flatten-utils.js +20 -0
- package/lib/utils/flatten-utils.js.map +1 -0
- package/lib/utils/generate-uri.d.ts +35 -0
- package/lib/utils/generate-uri.js +49 -0
- package/lib/utils/generate-uri.js.map +1 -0
- package/lib/utils/generated-settings-id.d.ts +2 -0
- package/lib/utils/generated-settings-id.js +12 -0
- package/lib/utils/generated-settings-id.js.map +1 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +22 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/omit-deep.d.ts +1 -0
- package/lib/utils/omit-deep.js +16 -0
- package/lib/utils/omit-deep.js.map +1 -0
- package/lib/utils/roles-utils.d.ts +2 -0
- package/lib/utils/roles-utils.js +11 -0
- package/lib/utils/roles-utils.js.map +1 -0
- package/lib/utils/uri.d.ts +3 -0
- package/lib/utils/uri.js +21 -0
- package/lib/utils/uri.js.map +1 -0
- package/lib/utils/utils.d.ts +3 -0
- package/lib/utils/utils.js +37 -0
- package/lib/utils/utils.js.map +1 -0
- package/lib/utils/validations.d.ts +1 -0
- package/lib/utils/validations.js +9 -0
- package/lib/utils/validations.js.map +1 -0
- package/package.json +34 -25
- package/lib/interfaces/workspace.d.ts +0 -37
@@ -0,0 +1,24 @@
|
|
1
|
+
import { AbstractConfigurationChangeEvent } from './abstract-configuration-change-event';
|
2
|
+
import { IConfigurationChangeEvent } from '../../../interfaces';
|
3
|
+
import { ConfigurationTarget, IConfigurationModel } from '../../../interfaces';
|
4
|
+
import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
5
|
+
import { ConfigurationModel } from '../models/configuration-model';
|
6
|
+
import { ResourceMap } from '@vscode-alt/monaco-editor/esm/vs/base/common/map';
|
7
|
+
export declare class ConfigurationChangeEvent extends AbstractConfigurationChangeEvent implements IConfigurationChangeEvent {
|
8
|
+
private _changedConfiguration;
|
9
|
+
private _changedConfigurationByResource;
|
10
|
+
private _source;
|
11
|
+
private _sourceConfig;
|
12
|
+
constructor(_changedConfiguration?: ConfigurationModel, _changedConfigurationByResource?: ResourceMap<ConfigurationModel>);
|
13
|
+
get changedConfiguration(): IConfigurationModel;
|
14
|
+
get changedConfigurationByResource(): ResourceMap<IConfigurationModel>;
|
15
|
+
change(event: ConfigurationChangeEvent): ConfigurationChangeEvent;
|
16
|
+
change(keys: string[], resource?: URI): ConfigurationChangeEvent;
|
17
|
+
telemetryData(source: ConfigurationTarget, sourceConfig: any): ConfigurationChangeEvent;
|
18
|
+
get affectedKeys(): string[];
|
19
|
+
get source(): ConfigurationTarget;
|
20
|
+
get sourceConfig(): any;
|
21
|
+
affectsConfiguration(config: string, resource?: URI): boolean;
|
22
|
+
private changeWithKeys;
|
23
|
+
private getOrSetChangedConfigurationForResource;
|
24
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ConfigurationChangeEvent = void 0;
|
4
|
+
/* tslint:disable */
|
5
|
+
const abstract_configuration_change_event_1 = require("./abstract-configuration-change-event");
|
6
|
+
const configuration_model_1 = require("../models/configuration-model");
|
7
|
+
const map_1 = require("@vscode-alt/monaco-editor/esm/vs/base/common/map");
|
8
|
+
const arrays = require("@vscode-alt/monaco-editor/esm/vs/base/common/arrays");
|
9
|
+
// src/vs/platform/configuration/common/configurationModels.ts
|
10
|
+
class ConfigurationChangeEvent extends abstract_configuration_change_event_1.AbstractConfigurationChangeEvent {
|
11
|
+
constructor(_changedConfiguration = new configuration_model_1.ConfigurationModel(), _changedConfigurationByResource = new map_1.ResourceMap()) {
|
12
|
+
super();
|
13
|
+
this._changedConfiguration = _changedConfiguration;
|
14
|
+
this._changedConfigurationByResource = _changedConfigurationByResource;
|
15
|
+
}
|
16
|
+
get changedConfiguration() {
|
17
|
+
return this._changedConfiguration;
|
18
|
+
}
|
19
|
+
get changedConfigurationByResource() {
|
20
|
+
return this._changedConfigurationByResource;
|
21
|
+
}
|
22
|
+
change(arg1, arg2) {
|
23
|
+
if (arg1 instanceof ConfigurationChangeEvent) {
|
24
|
+
this._changedConfiguration = this._changedConfiguration.merge(arg1._changedConfiguration);
|
25
|
+
for (const resource of arg1._changedConfigurationByResource.keys()) {
|
26
|
+
let changedConfigurationByResource = this.getOrSetChangedConfigurationForResource(resource);
|
27
|
+
changedConfigurationByResource = changedConfigurationByResource.merge(arg1._changedConfigurationByResource.get(resource));
|
28
|
+
this._changedConfigurationByResource.set(resource, changedConfigurationByResource);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
this.changeWithKeys(arg1, arg2);
|
33
|
+
}
|
34
|
+
return this;
|
35
|
+
}
|
36
|
+
telemetryData(source, sourceConfig) {
|
37
|
+
this._source = source;
|
38
|
+
this._sourceConfig = sourceConfig;
|
39
|
+
return this;
|
40
|
+
}
|
41
|
+
get affectedKeys() {
|
42
|
+
const keys = [...this._changedConfiguration.keys];
|
43
|
+
this._changedConfigurationByResource.forEach(model => keys.push(...model.keys));
|
44
|
+
return arrays.distinct(keys);
|
45
|
+
}
|
46
|
+
get source() {
|
47
|
+
return this._source;
|
48
|
+
}
|
49
|
+
get sourceConfig() {
|
50
|
+
return this._sourceConfig;
|
51
|
+
}
|
52
|
+
affectsConfiguration(config, resource) {
|
53
|
+
let configurationModelsToSearch = [this._changedConfiguration];
|
54
|
+
if (resource) {
|
55
|
+
let model = this._changedConfigurationByResource.get(resource);
|
56
|
+
if (model) {
|
57
|
+
configurationModelsToSearch.push(model);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
else {
|
61
|
+
configurationModelsToSearch.push(...this._changedConfigurationByResource.values());
|
62
|
+
}
|
63
|
+
for (const configuration of configurationModelsToSearch) {
|
64
|
+
if (this.doesConfigurationContains(configuration, config)) {
|
65
|
+
return true;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
return false;
|
69
|
+
}
|
70
|
+
changeWithKeys(keys, resource) {
|
71
|
+
let changedConfiguration = resource ? this.getOrSetChangedConfigurationForResource(resource) : this._changedConfiguration;
|
72
|
+
this.updateKeys(changedConfiguration, keys);
|
73
|
+
}
|
74
|
+
getOrSetChangedConfigurationForResource(resource) {
|
75
|
+
let changedConfigurationByResource = this._changedConfigurationByResource.get(resource);
|
76
|
+
if (!changedConfigurationByResource) {
|
77
|
+
changedConfigurationByResource = new configuration_model_1.ConfigurationModel();
|
78
|
+
this._changedConfigurationByResource.set(resource, changedConfigurationByResource);
|
79
|
+
}
|
80
|
+
return changedConfigurationByResource;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
exports.ConfigurationChangeEvent = ConfigurationChangeEvent;
|
84
|
+
//# sourceMappingURL=configuration-change-event.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"configuration-change-event.js","sourceRoot":"","sources":["../../../../src/core/configurations/events/configuration-change-event.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,+FAAyF;AAIzF,uEAAmE;AACnE,0EAA+E;AAC/E,8EAA8E;AAE9E,8DAA8D;AAC9D,MAAa,wBAAyB,SAAQ,sEAAgC;IAK7E,YACS,wBAA4C,IAAI,wCAAkB,EAAE,EACpE,kCAAmE,IAAI,iBAAW,EAAsB;QAChH,KAAK,EAAE,CAAC;QAFA,0BAAqB,GAArB,qBAAqB,CAA+C;QACpE,oCAA+B,GAA/B,+BAA+B,CAAyE;IAEjH,CAAC;IAED,IAAI,oBAAoB;QACvB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACnC,CAAC;IAED,IAA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+1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
|
+
};
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
__exportStar(require("./abstract-configuration-change-event"), exports);
|
14
|
+
__exportStar(require("./configuration-change-event"), exports);
|
15
|
+
__exportStar(require("./organization-configuration-change-event"), exports);
|
16
|
+
__exportStar(require("./all-keys-configuration-change-event"), exports);
|
17
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/configurations/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wEAAsD;AACtD,+DAA6C;AAC7C,4EAA0D;AAC1D,wEAAsD"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IConfigurationChangeEvent } from '../../../interfaces';
|
2
|
+
import { IConfigurationModel, ConfigurationTarget, IOrganizationContext } from '../../../interfaces';
|
3
|
+
import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
4
|
+
import { ResourceMap } from '@vscode-alt/monaco-editor/esm/vs/base/common/map';
|
5
|
+
export declare class OrganizationConfigurationChangeEvent implements IConfigurationChangeEvent {
|
6
|
+
private configurationChangeEvent;
|
7
|
+
private organization;
|
8
|
+
constructor(configurationChangeEvent: IConfigurationChangeEvent, organization: IOrganizationContext | undefined);
|
9
|
+
get changedConfiguration(): IConfigurationModel;
|
10
|
+
get changedConfigurationByResource(): ResourceMap<IConfigurationModel>;
|
11
|
+
get affectedKeys(): string[];
|
12
|
+
get source(): ConfigurationTarget;
|
13
|
+
get sourceConfig(): any;
|
14
|
+
affectsConfiguration(config: string, resource?: URI): boolean;
|
15
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.OrganizationConfigurationChangeEvent = void 0;
|
4
|
+
// src/vs/workbench/services/configuration/common/configurationModels.ts
|
5
|
+
class OrganizationConfigurationChangeEvent {
|
6
|
+
constructor(configurationChangeEvent, organization) {
|
7
|
+
this.configurationChangeEvent = configurationChangeEvent;
|
8
|
+
this.organization = organization;
|
9
|
+
}
|
10
|
+
get changedConfiguration() {
|
11
|
+
return this.configurationChangeEvent.changedConfiguration;
|
12
|
+
}
|
13
|
+
get changedConfigurationByResource() {
|
14
|
+
return this.configurationChangeEvent.changedConfigurationByResource;
|
15
|
+
}
|
16
|
+
get affectedKeys() {
|
17
|
+
return this.configurationChangeEvent.affectedKeys;
|
18
|
+
}
|
19
|
+
get source() {
|
20
|
+
return this.configurationChangeEvent.source;
|
21
|
+
}
|
22
|
+
get sourceConfig() {
|
23
|
+
return this.configurationChangeEvent.sourceConfig;
|
24
|
+
}
|
25
|
+
affectsConfiguration(config, resource) {
|
26
|
+
if (this.configurationChangeEvent.affectsConfiguration(config, resource)) {
|
27
|
+
return true;
|
28
|
+
}
|
29
|
+
if (resource && this.organization) {
|
30
|
+
let organizationResource = this.organization.getResource(resource);
|
31
|
+
if (organizationResource) {
|
32
|
+
return this.configurationChangeEvent.affectsConfiguration(config, organizationResource.uri);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
return false;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.OrganizationConfigurationChangeEvent = OrganizationConfigurationChangeEvent;
|
39
|
+
//# sourceMappingURL=organization-configuration-change-event.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"organization-configuration-change-event.js","sourceRoot":"","sources":["../../../../src/core/configurations/events/organization-configuration-change-event.ts"],"names":[],"mappings":";;;AAMA,wEAAwE;AAExE,MAAa,oCAAoC;IAEhD,YAAoB,wBAAmD,EAAU,YAA8C;QAA3G,6BAAwB,GAAxB,wBAAwB,CAA2B;QAAU,iBAAY,GAAZ,YAAY,CAAkC;IAAI,CAAC;IAEpI,IAAI,oBAAoB;QACvB,OAAO,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,CAAC;IAC3D,CAAC;IAED,IAAI,8BAA8B;QACjC,OAAO,IAAI,CAAC,wBAAwB,CAAC,8BAA8B,CAAC;IACrE,CAAC;IAED,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,wBAAwB,CAAC,YAAY,CAAC;IACnD,CAAC;IAED,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;IAC7C,CAAC;IAED,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,wBAAwB,CAAC,YAAY,CAAC;IACnD,CAAC;IAED,oBAAoB,CAAC,MAAc,EAAE,QAAc;QAClD,IAAI,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE;YACzE,OAAO,IAAI,CAAC;SACZ;QAED,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;YAClC,IAAI,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACnE,IAAI,oBAAoB,EAAE;gBACzB,OAAO,IAAI,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;aAC5F;SACD;QAED,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AAtCD,oFAsCC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { IConfigurationModel, ConfigurationTarget, IConfigurationService, IConfigurationOverrides, IOverrides, ISettingsSubject } from '../../../interfaces';
|
2
|
+
export declare function isConfigurationOverrides(thing: any): thing is IConfigurationOverrides;
|
3
|
+
/**
|
4
|
+
* @SRI modified to match to the union type of graphql type Settings
|
5
|
+
*/
|
6
|
+
export declare function ConfigurationTargetToString(configurationTarget: ConfigurationTarget): ISettingsSubject['__typename'];
|
7
|
+
export declare function SettingsTypeToConfiguraitonTarget(settings: ISettingsSubject['__typename']): ConfigurationTarget;
|
8
|
+
export declare function compare(from: IConfigurationModel, to: IConfigurationModel): {
|
9
|
+
added: string[];
|
10
|
+
removed: string[];
|
11
|
+
updated: string[];
|
12
|
+
};
|
13
|
+
export declare function toOverrides(raw: any, configurationProperties: any, conflictReporter: (message: string) => void): IOverrides[];
|
14
|
+
export declare function toValuesTree(properties: {
|
15
|
+
[qualifiedKey: string]: any;
|
16
|
+
}, conflictReporter: (message: string) => void): any;
|
17
|
+
export declare function addToValueTree(settingsTreeRoot: any, key: string, value: any, conflictReporter: (message: string) => void): void;
|
18
|
+
export declare function removeFromValueTree(valueTree: any, key: string): void;
|
19
|
+
/**
|
20
|
+
* A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)
|
21
|
+
*/
|
22
|
+
export declare function getConfigurationValue<T>(config: any, settingPath: string, defaultValue?: T): T;
|
23
|
+
export declare function merge(base: any, add: any, overwrite: boolean): void;
|
24
|
+
export declare function overrideIdentifierFromKey(key: string): string;
|
25
|
+
export declare function keyFromOverrideIdentifier(overrideIdentifier: string): string;
|
26
|
+
export declare function getMigratedSettingValue<T>(configurationService: IConfigurationService, currentSettingName: string, legacySettingName: string): T;
|
@@ -0,0 +1,203 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getMigratedSettingValue = exports.keyFromOverrideIdentifier = exports.overrideIdentifierFromKey = exports.merge = exports.getConfigurationValue = exports.removeFromValueTree = exports.addToValueTree = exports.toValuesTree = exports.toOverrides = exports.compare = exports.SettingsTypeToConfiguraitonTarget = exports.ConfigurationTargetToString = exports.isConfigurationOverrides = void 0;
|
4
|
+
/* tslint:disable */
|
5
|
+
const objects = require("@vscode-alt/monaco-editor/esm/vs/base/common/objects");
|
6
|
+
const types = require("@vscode-alt/monaco-editor/esm/vs/base/common/types");
|
7
|
+
const constants_1 = require("../../../constants");
|
8
|
+
const uri_1 = require("@vscode-alt/monaco-editor/esm/vs/base/common/uri");
|
9
|
+
// src/vs/platform/configuration/common/configuration.ts
|
10
|
+
function isConfigurationOverrides(thing) {
|
11
|
+
return thing
|
12
|
+
&& typeof thing === 'object'
|
13
|
+
&& (!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string')
|
14
|
+
&& (!thing.resource || (thing.resource instanceof uri_1.URI || uri_1.URI.isUri(thing.resource))); //@sri added isURI
|
15
|
+
}
|
16
|
+
exports.isConfigurationOverrides = isConfigurationOverrides;
|
17
|
+
/**
|
18
|
+
* @SRI modified to match to the union type of graphql type Settings
|
19
|
+
*/
|
20
|
+
function ConfigurationTargetToString(configurationTarget) {
|
21
|
+
switch (configurationTarget) {
|
22
|
+
case 1 /* USER */: return 'UserSettings';
|
23
|
+
case 2 /* APPLICATION */: return 'ApplicationSettings';
|
24
|
+
case 3 /* MACHINE */: return 'MachineSettings';
|
25
|
+
case 4 /* ORGANIZATION */: return 'OrganizationSettings';
|
26
|
+
case 5 /* ORGANIZATION_RESOURCE */: return 'OrganizationResourceSettings';
|
27
|
+
case 6 /* DEFAULT */: return 'GlobalSettings';
|
28
|
+
case 7 /* MEMORY */: return 'MemorySettings';
|
29
|
+
}
|
30
|
+
}
|
31
|
+
exports.ConfigurationTargetToString = ConfigurationTargetToString;
|
32
|
+
function SettingsTypeToConfiguraitonTarget(settings) {
|
33
|
+
switch (settings) {
|
34
|
+
case 'UserSettings': return 1 /* USER */;
|
35
|
+
case 'ApplicationSettings': return 2 /* APPLICATION */;
|
36
|
+
case 'MachineSettings': return 3 /* MACHINE */;
|
37
|
+
case 'OrganizationSettings': return 4 /* ORGANIZATION */;
|
38
|
+
case 'OrganizationResourceSettings': return 5 /* ORGANIZATION_RESOURCE */;
|
39
|
+
case 'DefaultSettings': return 6 /* DEFAULT */;
|
40
|
+
case 'MemorySettings': return 7 /* MEMORY */;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
exports.SettingsTypeToConfiguraitonTarget = SettingsTypeToConfiguraitonTarget;
|
44
|
+
function compare(from, to) {
|
45
|
+
const added = to.keys.filter(key => from.keys.indexOf(key) === -1);
|
46
|
+
const removed = from.keys.filter(key => to.keys.indexOf(key) === -1);
|
47
|
+
const updated = [];
|
48
|
+
for (const key of from.keys) {
|
49
|
+
const value1 = getConfigurationValue(from.contents, key);
|
50
|
+
const value2 = getConfigurationValue(to.contents, key);
|
51
|
+
if (!objects.equals(value1, value2)) {
|
52
|
+
updated.push(key);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
return { added, removed, updated };
|
56
|
+
}
|
57
|
+
exports.compare = compare;
|
58
|
+
// not using currently but stays here for future reference
|
59
|
+
//@sri modified function to take ConfigurationRegistry as second argument input
|
60
|
+
function toOverrides(raw, configurationProperties, conflictReporter) {
|
61
|
+
const overrides = [];
|
62
|
+
// const configurationProperties = Registry.Instance.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties();
|
63
|
+
for (const key of Object.keys(raw)) {
|
64
|
+
if (constants_1.OVERRIDE_PROPERTY_PATTERN.test(key)) {
|
65
|
+
const overrideRaw = {};
|
66
|
+
for (const keyInOverrideRaw in raw[key]) {
|
67
|
+
if (configurationProperties[keyInOverrideRaw] && configurationProperties[keyInOverrideRaw].overridable) {
|
68
|
+
overrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];
|
69
|
+
}
|
70
|
+
}
|
71
|
+
overrides.push({
|
72
|
+
identifiers: [overrideIdentifierFromKey(key).trim()],
|
73
|
+
contents: toValuesTree(overrideRaw, conflictReporter)
|
74
|
+
});
|
75
|
+
}
|
76
|
+
}
|
77
|
+
return overrides;
|
78
|
+
}
|
79
|
+
exports.toOverrides = toOverrides;
|
80
|
+
function toValuesTree(properties, conflictReporter) {
|
81
|
+
const root = Object.create(null);
|
82
|
+
for (let key in properties) {
|
83
|
+
addToValueTree(root, key, properties[key], conflictReporter);
|
84
|
+
}
|
85
|
+
return root;
|
86
|
+
}
|
87
|
+
exports.toValuesTree = toValuesTree;
|
88
|
+
function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {
|
89
|
+
const segments = key.split('.');
|
90
|
+
const last = segments.pop();
|
91
|
+
let curr = settingsTreeRoot;
|
92
|
+
for (let i = 0; i < segments.length; i++) {
|
93
|
+
let s = segments[i];
|
94
|
+
let obj = curr[s];
|
95
|
+
switch (typeof obj) {
|
96
|
+
case 'undefined':
|
97
|
+
obj = curr[s] = Object.create(null);
|
98
|
+
break;
|
99
|
+
case 'object':
|
100
|
+
break;
|
101
|
+
default:
|
102
|
+
conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is ${JSON.stringify(obj)}`);
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
curr = obj;
|
106
|
+
}
|
107
|
+
if (typeof curr === 'object') {
|
108
|
+
curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606
|
109
|
+
}
|
110
|
+
else {
|
111
|
+
conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);
|
112
|
+
}
|
113
|
+
}
|
114
|
+
exports.addToValueTree = addToValueTree;
|
115
|
+
function removeFromValueTree(valueTree, key) {
|
116
|
+
const segments = key.split('.');
|
117
|
+
doRemoveFromValueTree(valueTree, segments);
|
118
|
+
}
|
119
|
+
exports.removeFromValueTree = removeFromValueTree;
|
120
|
+
function doRemoveFromValueTree(valueTree, segments) {
|
121
|
+
const first = segments.shift();
|
122
|
+
if (segments.length === 0) {
|
123
|
+
// Reached last segment
|
124
|
+
delete valueTree[first];
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
if (Object.keys(valueTree).indexOf(first) !== -1) {
|
128
|
+
const value = valueTree[first];
|
129
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
130
|
+
doRemoveFromValueTree(value, segments);
|
131
|
+
if (Object.keys(value).length === 0) {
|
132
|
+
delete valueTree[first];
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
/**
|
138
|
+
* A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)
|
139
|
+
*/
|
140
|
+
function getConfigurationValue(config, settingPath, defaultValue) {
|
141
|
+
function accessSetting(config, path) {
|
142
|
+
let current = config;
|
143
|
+
for (const component of path) {
|
144
|
+
if (typeof current !== 'object' || current === null) {
|
145
|
+
return undefined;
|
146
|
+
}
|
147
|
+
current = current[component];
|
148
|
+
}
|
149
|
+
return current;
|
150
|
+
}
|
151
|
+
//@ sri: customized to prevent from failing due to numberic value from settingPath
|
152
|
+
let result;
|
153
|
+
try {
|
154
|
+
const path = settingPath.split('.');
|
155
|
+
result = accessSetting(config, path);
|
156
|
+
}
|
157
|
+
catch (err) {
|
158
|
+
console.warn('received path as number', settingPath);
|
159
|
+
}
|
160
|
+
return typeof result === 'undefined' ? defaultValue : result;
|
161
|
+
}
|
162
|
+
exports.getConfigurationValue = getConfigurationValue;
|
163
|
+
function merge(base, add, overwrite) {
|
164
|
+
Object.keys(add).forEach(key => {
|
165
|
+
if (key in base) {
|
166
|
+
if (types.isObject(base[key]) && types.isObject(add[key])) {
|
167
|
+
merge(base[key], add[key], overwrite);
|
168
|
+
}
|
169
|
+
else if (overwrite) {
|
170
|
+
base[key] = add[key];
|
171
|
+
}
|
172
|
+
}
|
173
|
+
else {
|
174
|
+
base[key] = add[key];
|
175
|
+
}
|
176
|
+
});
|
177
|
+
}
|
178
|
+
exports.merge = merge;
|
179
|
+
// getConfigurationKeys() exist in the server-core
|
180
|
+
// getDefaultValues() exist in the server core
|
181
|
+
function overrideIdentifierFromKey(key) {
|
182
|
+
return key.substring(1, key.length - 1);
|
183
|
+
}
|
184
|
+
exports.overrideIdentifierFromKey = overrideIdentifierFromKey;
|
185
|
+
function keyFromOverrideIdentifier(overrideIdentifier) {
|
186
|
+
return `[${overrideIdentifier}]`;
|
187
|
+
}
|
188
|
+
exports.keyFromOverrideIdentifier = keyFromOverrideIdentifier;
|
189
|
+
function getMigratedSettingValue(configurationService, currentSettingName, legacySettingName) {
|
190
|
+
const setting = configurationService.inspect(currentSettingName);
|
191
|
+
const legacySetting = configurationService.inspect(legacySettingName);
|
192
|
+
if (typeof setting.user !== 'undefined' || typeof setting.organization !== 'undefined' || typeof setting.organizationResource !== 'undefined') {
|
193
|
+
return setting.value;
|
194
|
+
}
|
195
|
+
else if (typeof legacySetting.user !== 'undefined' || typeof legacySetting.organization !== 'undefined' || typeof legacySetting.organizationResource !== 'undefined') {
|
196
|
+
return legacySetting.value;
|
197
|
+
}
|
198
|
+
else {
|
199
|
+
return setting.default;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
exports.getMigratedSettingValue = getMigratedSettingValue;
|
203
|
+
//# sourceMappingURL=configuration.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../src/core/configurations/helpers/configuration.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,gFAAgF;AAChF,4EAA4E;AAE5E,kDAA+D;AAC/D,0EAAuE;AACvE,wDAAwD;AAGxD,SAAgB,wBAAwB,CAAC,KAAU;IAC/C,OAAO,KAAK;WACL,OAAO,KAAK,KAAK,QAAQ;WACzB,CAAC,CAAC,KAAK,CAAC,kBAAkB,IAAI,OAAO,KAAK,CAAC,kBAAkB,KAAK,QAAQ,CAAC;WAC3E,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,YAAY,SAAG,IAAI,SAAG,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB;AAChH,CAAC;AALD,4DAKC;AAGD;;GAEG;AACH,SAAgB,2BAA2B,CAA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BAYC;AAED,kDAAkD;AAElD,8CAA8C;AAE9C,SAAgB,yBAAyB,CAAC,GAAW;IACpD,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAFD,8DAEC;AAED,SAAgB,yBAAyB,CAAC,kBAA0B;IACnE,OAAO,IAAI,kBAAkB,GAAG,CAAC;AAClC,CAAC;AAFD,8DAEC;AAGD,SAAgB,uBAAuB,CAAI,oBAA2C,EAAE,kBAA0B,EAAE,iBAAyB;IAC5I,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAI,kBAAkB,CAAC,CAAC;IACpE,MAAM,aAAa,GAAG,oBAAoB,CAAC,OAAO,CAAI,iBAAiB,CAAC,CAAC;IAEzE,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,OAAO,CAAC,YAAY,KAAK,WAAW,IAAI,OAAO,OAAO,CAAC,oBAAoB,KAAK,WAAW,EAAE;QAC9I,OAAO,OAAO,CAAC,KAAK,CAAC;KACrB;SAAM,IAAI,OAAO,aAAa,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,aAAa,CAAC,YAAY,KAAK,WAAW,IAAI,OAAO,aAAa,CAAC,oBAAoB,KAAK,WAAW,EAAE;QACvK,OAAO,aAAa,CAAC,KAAK,CAAC;KAC3B;SAAM;QACN,OAAO,OAAO,CAAC,OAAO,CAAC;KACvB;AACF,CAAC;AAXD,0DAWC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './configuration';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
|
+
};
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
__exportStar(require("./configuration"), exports);
|
14
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/configurations/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
|
+
};
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
+
__exportStar(require("./helpers"), exports);
|
14
|
+
__exportStar(require("./models"), exports);
|
15
|
+
__exportStar(require("./configuration"), exports);
|
16
|
+
__exportStar(require("./events"), exports);
|
17
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/configurations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { IOverrides, IIConfigurationModel as IConfigurationModel } from '../../../interfaces';
|
2
|
+
export declare class ConfigurationModel implements IConfigurationModel {
|
3
|
+
private _contents;
|
4
|
+
private _keys;
|
5
|
+
private _overrides;
|
6
|
+
private isFrozen;
|
7
|
+
constructor(_contents?: any, _keys?: string[], _overrides?: IOverrides[]);
|
8
|
+
get contents(): any;
|
9
|
+
get overrides(): IOverrides[];
|
10
|
+
get keys(): string[];
|
11
|
+
isEmpty(): boolean;
|
12
|
+
getValue<V>(section: string | undefined): V;
|
13
|
+
override(identifier: string): ConfigurationModel;
|
14
|
+
merge(...others: ConfigurationModel[]): ConfigurationModel;
|
15
|
+
freeze(): ConfigurationModel;
|
16
|
+
private mergeContents;
|
17
|
+
private checkAndFreeze;
|
18
|
+
private getContentsForOverrideIdentifer;
|
19
|
+
toJSON(): IConfigurationModel;
|
20
|
+
setValue(key: string, value: any): void;
|
21
|
+
removeValue(key: string): void;
|
22
|
+
private addKey;
|
23
|
+
private removeKey;
|
24
|
+
}
|