@adminide-stack/core 5.0.1-alpha.0 → 5.0.1-alpha.12
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/billing-plan.js +1 -5
- package/lib/constants/configuration.js +7 -11
- package/lib/constants/constants.js +2 -6
- package/lib/constants/default-workspace-config.js +3 -7
- package/lib/constants/routes.js +2 -7
- package/lib/constants/types.js +6 -10
- package/lib/constants/urls.js +2 -6
- package/lib/core/configurations/configuration.js +19 -34
- package/lib/core/configurations/events/ConfigurationChangeEvent.js +6 -18
- package/lib/core/configurations/helpers/configuration.js +10 -29
- package/lib/core/configurations/models/ConfigurationModel.js +6 -15
- package/lib/core/disposable.js +4 -10
- package/lib/core/event.js +2 -7
- package/lib/core/organization/configuration.js +3 -9
- package/lib/core/organization/helpers/organization-helpers.js +4 -15
- package/lib/core/organization/organization.js +10 -24
- package/lib/core/path.js +1 -6
- package/lib/enums/connection-status.js +1 -5
- package/lib/enums/integration-configuration-status.js +1 -5
- package/lib/enums/integrations-configuration-steps.js +1 -5
- package/lib/enums/integrations-connection-names.js +1 -5
- package/lib/enums/integrations.js +1 -5
- package/lib/enums/permissions.js +1 -5
- package/lib/enums/team-member-status.js +1 -5
- package/lib/errors/auth-error-messages.js +3 -7
- package/lib/errors/auth-error.js +3 -9
- package/lib/index.js +1 -26
- package/lib/interfaces/apollo-context.d.ts +2 -1
- package/lib/interfaces/configuration/configuration.js +6 -12
- package/lib/interfaces/generated/generated-models.d.ts +4877 -3007
- package/lib/interfaces/generated/generated-models.js +844 -783
- package/lib/interfaces/organization/organization-context.js +5 -10
- package/lib/interfaces/platform.d.ts +1 -0
- package/lib/modules/account-api/enums/index.js +1 -5
- package/lib/modules/billing-api/enums/index.js +2 -6
- package/lib/modules/inbox/enums/index.js +1 -5
- package/lib/services/abstract-configuration.d.ts +1 -1
- package/lib/services/abstract-configuration.js +19 -43
- package/lib/services/abstract-organization-context-service.js +15 -43
- package/lib/utils/configuration-utils.js +1 -6
- package/lib/utils/date-utils.js +1 -6
- package/lib/utils/flatten-utils.js +3 -43
- package/lib/utils/generate-uri.js +10 -27
- package/lib/utils/generated-settings-id.js +4 -10
- package/lib/utils/omit-deep.js +3 -9
- package/lib/utils/roles-utils.js +3 -11
- package/lib/utils/uri.js +5 -12
- package/lib/utils/utils.js +2 -20
- package/lib/utils/validations.js +1 -6
- package/package.json +9 -6
- package/lib/constants/billing-plan.js.map +0 -1
- package/lib/constants/configuration.js.map +0 -1
- package/lib/constants/constants.js.map +0 -1
- package/lib/constants/default-workspace-config.js.map +0 -1
- package/lib/constants/index.js +0 -24
- package/lib/constants/index.js.map +0 -1
- package/lib/constants/routes.js.map +0 -1
- package/lib/constants/types.js.map +0 -1
- package/lib/constants/urls.js.map +0 -1
- package/lib/core/configurations/configuration.js.map +0 -1
- package/lib/core/configurations/configuration.test.js +0 -20
- package/lib/core/configurations/configuration.test.js.map +0 -1
- package/lib/core/configurations/events/AbstractConfigurationChangEvent.d.ts +0 -0
- package/lib/core/configurations/events/AbstractConfigurationChangEvent.js +0 -25
- package/lib/core/configurations/events/AbstractConfigurationChangEvent.js.map +0 -1
- package/lib/core/configurations/events/AllKeysConfigurationChangeEvent.d.ts +0 -0
- package/lib/core/configurations/events/AllKeysConfigurationChangeEvent.js +0 -27
- package/lib/core/configurations/events/AllKeysConfigurationChangeEvent.js.map +0 -1
- package/lib/core/configurations/events/ConfigurationChangeEvent.js.map +0 -1
- package/lib/core/configurations/events/OrganizationConfigurationChangeEvent.d.ts +0 -0
- package/lib/core/configurations/events/OrganizationConfigurationChangeEvent.js +0 -37
- package/lib/core/configurations/events/OrganizationConfigurationChangeEvent.js.map +0 -1
- package/lib/core/configurations/events/index.js +0 -21
- package/lib/core/configurations/events/index.js.map +0 -1
- package/lib/core/configurations/helpers/configuration.js.map +0 -1
- package/lib/core/configurations/helpers/index.js +0 -18
- package/lib/core/configurations/helpers/index.js.map +0 -1
- package/lib/core/configurations/index.js +0 -21
- package/lib/core/configurations/index.js.map +0 -1
- package/lib/core/configurations/models/ConfigurationModel.js.map +0 -1
- package/lib/core/configurations/models/ConfigurationModel.test.js +0 -172
- package/lib/core/configurations/models/ConfigurationModel.test.js.map +0 -1
- package/lib/core/configurations/models/index.js +0 -18
- package/lib/core/configurations/models/index.js.map +0 -1
- package/lib/core/disposable.js.map +0 -1
- package/lib/core/event.js.map +0 -1
- package/lib/core/event.test.js +0 -15
- package/lib/core/event.test.js.map +0 -1
- package/lib/core/index.js +0 -23
- package/lib/core/index.js.map +0 -1
- package/lib/core/organization/configuration.js.map +0 -1
- package/lib/core/organization/helpers/index.js +0 -18
- package/lib/core/organization/helpers/index.js.map +0 -1
- package/lib/core/organization/helpers/organization-helpers.js.map +0 -1
- package/lib/core/organization/index.js +0 -20
- package/lib/core/organization/index.js.map +0 -1
- package/lib/core/organization/organization.js.map +0 -1
- package/lib/core/path.js.map +0 -1
- package/lib/core/path.test.js +0 -205
- package/lib/core/path.test.js.map +0 -1
- package/lib/core/types.js +0 -3
- package/lib/core/types.js.map +0 -1
- package/lib/core/uri.js +0 -158
- package/lib/core/uri.js.map +0 -1
- package/lib/core/uri.test.js +0 -136
- package/lib/core/uri.test.js.map +0 -1
- package/lib/enums/connection-status.js.map +0 -1
- package/lib/enums/index.js +0 -24
- package/lib/enums/index.js.map +0 -1
- package/lib/enums/integration-configuration-status.js.map +0 -1
- package/lib/enums/integrations-configuration-steps.js.map +0 -1
- package/lib/enums/integrations-connection-names.js.map +0 -1
- package/lib/enums/integrations.js.map +0 -1
- package/lib/enums/permissions.js.map +0 -1
- package/lib/enums/team-member-status.js.map +0 -1
- package/lib/errors/auth-error-messages.js.map +0 -1
- package/lib/errors/auth-error.js.map +0 -1
- package/lib/errors/index.js +0 -19
- package/lib/errors/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/interfaces/apollo-context.js +0 -3
- package/lib/interfaces/apollo-context.js.map +0 -1
- package/lib/interfaces/common.js +0 -3
- package/lib/interfaces/common.js.map +0 -1
- package/lib/interfaces/configuration/configuration-file-service.js +0 -3
- package/lib/interfaces/configuration/configuration-file-service.js.map +0 -1
- package/lib/interfaces/configuration/configuration-server-service.js +0 -3
- package/lib/interfaces/configuration/configuration-server-service.js.map +0 -1
- package/lib/interfaces/configuration/configuration.js.map +0 -1
- package/lib/interfaces/configuration/configurationRegistry.js +0 -3
- package/lib/interfaces/configuration/configurationRegistry.js.map +0 -1
- package/lib/interfaces/configuration/configuraton-service.js +0 -3
- package/lib/interfaces/configuration/configuraton-service.js.map +0 -1
- package/lib/interfaces/configuration/event.js +0 -3
- package/lib/interfaces/configuration/event.js.map +0 -1
- package/lib/interfaces/configuration/index.js +0 -23
- package/lib/interfaces/configuration/index.js.map +0 -1
- package/lib/interfaces/contex-key-service.js +0 -3
- package/lib/interfaces/contex-key-service.js.map +0 -1
- package/lib/interfaces/database-migration.js +0 -3
- package/lib/interfaces/database-migration.js.map +0 -1
- package/lib/interfaces/enum.js +0 -71
- package/lib/interfaces/enum.js.map +0 -1
- package/lib/interfaces/environment/argv.js +0 -3
- package/lib/interfaces/environment/argv.js.map +0 -1
- package/lib/interfaces/environment/environment-service.js +0 -3
- package/lib/interfaces/environment/environment-service.js.map +0 -1
- package/lib/interfaces/environment/index.js +0 -19
- package/lib/interfaces/environment/index.js.map +0 -1
- package/lib/interfaces/generated/generated-models.js.map +0 -1
- package/lib/interfaces/generated/index.js +0 -18
- package/lib/interfaces/generated/index.js.map +0 -1
- package/lib/interfaces/index.js +0 -36
- package/lib/interfaces/index.js.map +0 -1
- package/lib/interfaces/lifecycle-service.js +0 -8
- package/lib/interfaces/lifecycle-service.js.map +0 -1
- package/lib/interfaces/log/index.js +0 -18
- package/lib/interfaces/log/index.js.map +0 -1
- package/lib/interfaces/log/log-service.js +0 -3
- package/lib/interfaces/log/log-service.js.map +0 -1
- package/lib/interfaces/nav-items.js +0 -3
- package/lib/interfaces/nav-items.js.map +0 -1
- package/lib/interfaces/organization/index.js +0 -20
- package/lib/interfaces/organization/index.js.map +0 -1
- package/lib/interfaces/organization/organization-context-service.js +0 -3
- package/lib/interfaces/organization/organization-context-service.js.map +0 -1
- package/lib/interfaces/organization/organization-context.js.map +0 -1
- package/lib/interfaces/organization/organizations-context.js +0 -3
- package/lib/interfaces/organization/organizations-context.js.map +0 -1
- package/lib/interfaces/page-store.js +0 -3
- package/lib/interfaces/page-store.js.map +0 -1
- package/lib/interfaces/permissions.js +0 -3
- package/lib/interfaces/permissions.js.map +0 -1
- package/lib/interfaces/platform.js +0 -3
- package/lib/interfaces/platform.js.map +0 -1
- package/lib/interfaces/preferences-service.js +0 -3
- package/lib/interfaces/preferences-service.js.map +0 -1
- package/lib/interfaces/service.js +0 -3
- package/lib/interfaces/service.js.map +0 -1
- package/lib/interfaces/workbench-exports.js +0 -9
- package/lib/interfaces/workbench-exports.js.map +0 -1
- package/lib/modules/account-api/enums/index.js.map +0 -1
- package/lib/modules/account-api/index.js +0 -18
- package/lib/modules/account-api/index.js.map +0 -1
- package/lib/modules/billing-api/enums/index.js.map +0 -1
- package/lib/modules/billing-api/index.js +0 -18
- package/lib/modules/billing-api/index.js.map +0 -1
- package/lib/modules/inbox/enums/index.js.map +0 -1
- package/lib/modules/inbox/index.js +0 -18
- package/lib/modules/inbox/index.js.map +0 -1
- package/lib/modules/index.js +0 -20
- package/lib/modules/index.js.map +0 -1
- package/lib/services/abstract-configuration.js.map +0 -1
- package/lib/services/abstract-organization-context-service.js.map +0 -1
- package/lib/services/index.js +0 -19
- package/lib/services/index.js.map +0 -1
- package/lib/utils/configuration-utils.js.map +0 -1
- package/lib/utils/date-utils.js.map +0 -1
- package/lib/utils/flatten-utils.js.map +0 -1
- package/lib/utils/generate-uri.js.map +0 -1
- package/lib/utils/generated-settings-id.js.map +0 -1
- package/lib/utils/index.js +0 -26
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/omit-deep.js.map +0 -1
- package/lib/utils/roles-utils.js.map +0 -1
- package/lib/utils/uri.js.map +0 -1
- package/lib/utils/utils.js.map +0 -1
- package/lib/utils/validations.js.map +0 -1
@@ -1,5 +1 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.BillingPlan = void 0;
|
4
|
-
exports.BillingPlan = 'application.billingPlan';
|
5
|
-
//# sourceMappingURL=billing-plan.js.map
|
1
|
+
const BillingPlan = 'application.billingPlan';export{BillingPlan};
|
@@ -1,11 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
exports.OVERRIDE_PROPERTY_PATTERN = `^(${exports.OVERRIDE_IDENTIFIER_PATTERN})+$`;
|
9
|
-
exports.GLOBAL_CONFIGURATION_FILE = '.cdecode.json';
|
10
|
-
exports.USER_CONFIGURATION_FILE = 'user.cdecode.json';
|
11
|
-
//# sourceMappingURL=configuration.js.map
|
1
|
+
const SETTINGS_OVERRRIDE_NODE_ID = 'override';
|
2
|
+
const OVERRIDE_PROPERTY = '\\[.*\\]$';
|
3
|
+
const OVERRIDE_PATTERN_WITH_SUBSTITUTION = '\\[(${0})\\]$';
|
4
|
+
const OVERRIDE_IDENTIFIER_PATTERN = `\\[([^\\]]+)\\]`;
|
5
|
+
const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;
|
6
|
+
const GLOBAL_CONFIGURATION_FILE = '.cdecode.json';
|
7
|
+
const USER_CONFIGURATION_FILE = 'user.cdecode.json';export{GLOBAL_CONFIGURATION_FILE,OVERRIDE_IDENTIFIER_PATTERN,OVERRIDE_PATTERN_WITH_SUBSTITUTION,OVERRIDE_PROPERTY,OVERRIDE_PROPERTY_PATTERN,SETTINGS_OVERRRIDE_NODE_ID,USER_CONFIGURATION_FILE};
|
@@ -1,6 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
exports.NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER = exports.NATS_HEMERA_ADMINIDE_WORKSPACE = void 0;
|
4
|
-
exports.NATS_HEMERA_ADMINIDE_WORKSPACE = 'NATS_HEMERA_ADMINIDE_WORKSPACE';
|
5
|
-
exports.NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER = 'NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER';
|
6
|
-
//# sourceMappingURL=constants.js.map
|
1
|
+
const NATS_HEMERA_ADMINIDE_WORKSPACE = 'NATS_HEMERA_ADMINIDE_WORKSPACE';
|
2
|
+
const NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER = 'NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER';export{NATS_HEMERA_ADMINIDE_WORKSPACE,NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER};
|
@@ -1,7 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
exports.DEFAULT_RAM = 536870912;
|
5
|
-
exports.DEFAULT_HDD = 1073741824;
|
6
|
-
exports.DEFAULT_CPU = 1;
|
7
|
-
//# sourceMappingURL=default-workspace-config.js.map
|
1
|
+
const DEFAULT_RAM = 536870912;
|
2
|
+
const DEFAULT_HDD = 1073741824;
|
3
|
+
const DEFAULT_CPU = 1;export{DEFAULT_CPU,DEFAULT_HDD,DEFAULT_RAM};
|
package/lib/constants/routes.js
CHANGED
@@ -1,10 +1,5 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.IntegrationConfigurationRoute = void 0;
|
4
|
-
const urls_1 = require("./urls");
|
5
|
-
/**
|
1
|
+
import {ORG_BASE_PATH}from'./urls.js';/**
|
6
2
|
* Define all the routes here that are common
|
7
3
|
*/
|
8
4
|
// Integration related common routes
|
9
|
-
|
10
|
-
//# sourceMappingURL=routes.js.map
|
5
|
+
const IntegrationConfigurationRoute = `${ORG_BASE_PATH}/integration-configuration/:integrationName?/:integrationId?`;export{IntegrationConfigurationRoute};
|
package/lib/constants/types.js
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ServerTypes = exports.ClientTypes = exports.CommonTypes = void 0;
|
4
|
-
exports.CommonTypes = {
|
1
|
+
const CommonTypes = {
|
5
2
|
ILifecycleService: Symbol.for('ILifecycleService'),
|
6
3
|
};
|
7
|
-
|
8
|
-
ILifecycleService:
|
4
|
+
const ClientTypes = {
|
5
|
+
ILifecycleService: CommonTypes.ILifecycleService,
|
9
6
|
};
|
10
|
-
|
11
|
-
ILifecycleService:
|
7
|
+
const ServerTypes = {
|
8
|
+
ILifecycleService: CommonTypes.ILifecycleService,
|
12
9
|
IRegistry: Symbol.for('IRegistry'),
|
13
10
|
IAccessRoleService: Symbol.for('IAccessRoleService'),
|
14
11
|
IPreferenceEditorService: Symbol.for('IPreferenceEditorService'),
|
@@ -19,5 +16,4 @@ exports.ServerTypes = {
|
|
19
16
|
IFileService: Symbol.for('IFileService'),
|
20
17
|
ITextFileService: Symbol.for('ITextFileService'),
|
21
18
|
IEnvironmentService: Symbol.for('IEnvironmentService'),
|
22
|
-
};
|
23
|
-
//# sourceMappingURL=types.js.map
|
19
|
+
};export{ClientTypes,CommonTypes,ServerTypes};
|
package/lib/constants/urls.js
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
"use strict";
|
2
1
|
/** ------------------ Webhooks endpoinst --------------------------- */
|
3
|
-
|
4
|
-
|
5
|
-
exports.ASANA_WEBHOOK_ENDPOINT = '/webhook/asana';
|
6
|
-
exports.ORG_BASE_PATH = '/o/:orgName';
|
7
|
-
//# sourceMappingURL=urls.js.map
|
2
|
+
const ASANA_WEBHOOK_ENDPOINT = '/webhook/asana';
|
3
|
+
const ORG_BASE_PATH = '/o/:orgName';export{ASANA_WEBHOOK_ENDPOINT,ORG_BASE_PATH};
|
@@ -1,15 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.overrideIdentifiersFromKey = exports.OVERRIDE_PROPERTY_REGEX = exports.compare = exports.Configuration = void 0;
|
4
|
-
const uri_1 = require("@vscode-alt/monaco-editor/esm/vs/base/common/uri");
|
5
|
-
const map_1 = require("@vscode-alt/monaco-editor/esm/vs/base/common/map");
|
6
|
-
const types = require("@vscode-alt/monaco-editor/esm/vs/base/common/types");
|
7
|
-
const objects = require("@vscode-alt/monaco-editor/esm/vs/base/common/objects");
|
8
|
-
const arrays = require("@vscode-alt/monaco-editor/esm/vs/base/common/arrays");
|
9
|
-
const models_1 = require("./models");
|
10
|
-
const helpers_1 = require("./helpers");
|
11
|
-
const constants_1 = require("../../constants");
|
12
|
-
/**
|
1
|
+
import {URI}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';import {ResourceMap}from'@vscode-alt/monaco-editor/esm/vs/base/common/map.js';import*as types from'@vscode-alt/monaco-editor/esm/vs/base/common/types.js';import*as objects from'@vscode-alt/monaco-editor/esm/vs/base/common/objects.js';import*as arrays from'@vscode-alt/monaco-editor/esm/vs/base/common/arrays.js';import {ConfigurationModel}from'./models/ConfigurationModel.js';import {getConfigurationValue}from'./helpers/configuration.js';import {OVERRIDE_PROPERTY_PATTERN,OVERRIDE_IDENTIFIER_PATTERN}from'../../constants/configuration.js';import'../../constants/types.js';/**
|
13
2
|
* Configuration that merges all the hierarchial configuration model.
|
14
3
|
*
|
15
4
|
* We using `IOrganizationContext` rather than `OrganizationContext` for abstraction.
|
@@ -18,7 +7,7 @@ const constants_1 = require("../../constants");
|
|
18
7
|
* 09/18/2021: We converted `localUser` -> `application`; `remoteUser` => `machine`
|
19
8
|
*/
|
20
9
|
class Configuration {
|
21
|
-
constructor(_defaultConfiguration, _policyConfiguration = new
|
10
|
+
constructor(_defaultConfiguration, _policyConfiguration = new ConfigurationModel(), _applicationConfiguration = new ConfigurationModel(), _userConfiguration = new ConfigurationModel(), _machineConfiguration = new ConfigurationModel(), _organizationConfiguration = new ConfigurationModel(), _resourceConfigurations = new ResourceMap(), _memoryConfiguration = new ConfigurationModel(), _memoryConfigurationByResource = new ResourceMap(), _freeze = true) {
|
22
11
|
this._defaultConfiguration = _defaultConfiguration;
|
23
12
|
this._policyConfiguration = _policyConfiguration;
|
24
13
|
this._applicationConfiguration = _applicationConfiguration;
|
@@ -30,7 +19,7 @@ class Configuration {
|
|
30
19
|
this._memoryConfigurationByResource = _memoryConfigurationByResource;
|
31
20
|
this._freeze = _freeze;
|
32
21
|
this._organizationConsolidatedConfiguration = null;
|
33
|
-
this._resourcesConsolidatedConfigurations = new
|
22
|
+
this._resourcesConsolidatedConfigurations = new ResourceMap();
|
34
23
|
}
|
35
24
|
getValue(section, overrides, organization, externalConfiguration) {
|
36
25
|
const consolidateConfigurationModel = this.getConsolidateConfigurationModel(section, overrides, organization);
|
@@ -47,7 +36,7 @@ class Configuration {
|
|
47
36
|
if (overrides.resource) {
|
48
37
|
memoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);
|
49
38
|
if (!memoryConfiguration) {
|
50
|
-
memoryConfiguration = new
|
39
|
+
memoryConfiguration = new ConfigurationModel();
|
51
40
|
this._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);
|
52
41
|
}
|
53
42
|
}
|
@@ -95,7 +84,7 @@ class Configuration {
|
|
95
84
|
user: userValue !== undefined ? { value: this.userConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.userConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
96
85
|
machine: machineValue !== undefined ? { value: this.machineConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this.machineConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
97
86
|
organization: organizationValue !== undefined ? { value: this._organizationConfiguration.freeze().getValue(key), override: overrides.overrideIdentifier ? this._organizationConfiguration.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
98
|
-
organizationResource: organizationResourceValue !== undefined ? { value: resourceConfigurationModel
|
87
|
+
organizationResource: organizationResourceValue !== undefined ? { value: resourceConfigurationModel?.freeze().getValue(key), override: overrides.overrideIdentifier ? resourceConfigurationModel?.freeze().getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
99
88
|
memory: memoryValue !== undefined ? { value: memoryConfigurationModel.getValue(key), override: overrides.overrideIdentifier ? memoryConfigurationModel.getOverrideValue(key, overrides.overrideIdentifier) : undefined } : undefined,
|
100
89
|
overrideIdentifiers: overrideIdentifiers.length ? overrideIdentifiers : undefined
|
101
90
|
};
|
@@ -275,7 +264,7 @@ class Configuration {
|
|
275
264
|
}
|
276
265
|
else {
|
277
266
|
// if not organization resource
|
278
|
-
consolidateConfiguration = this.getResourceConsolidatedConfiguration(resource) || new
|
267
|
+
consolidateConfiguration = this.getResourceConsolidatedConfiguration(resource) || new ConfigurationModel();
|
279
268
|
}
|
280
269
|
const memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);
|
281
270
|
if (memoryConfigurationForResource) {
|
@@ -390,21 +379,20 @@ class Configuration {
|
|
390
379
|
const userConfiguration = this.parseConfigurationModel(data.user);
|
391
380
|
const organizationConfiguration = this.parseConfigurationModel(data.organization);
|
392
381
|
const resources = data.resources.reduce((result, value) => {
|
393
|
-
result.set(
|
382
|
+
result.set(URI.revive(value[0]), this.parseConfigurationModel(value[1]));
|
394
383
|
return result;
|
395
|
-
}, new
|
396
|
-
return new Configuration(defaultConfiguration, policyConfiguration, applicationConfiguration, userConfiguration, new
|
384
|
+
}, new ResourceMap());
|
385
|
+
return new Configuration(defaultConfiguration, policyConfiguration, applicationConfiguration, userConfiguration, new ConfigurationModel(), organizationConfiguration, resources, new ConfigurationModel(), new ResourceMap(), false);
|
397
386
|
}
|
398
387
|
static parseConfigurationModel(model) {
|
399
|
-
return new
|
388
|
+
return new ConfigurationModel(model.contents, model.keys, model.overrides).freeze();
|
400
389
|
}
|
401
390
|
}
|
402
|
-
exports.Configuration = Configuration;
|
403
391
|
function compare(from, to) {
|
404
392
|
const { added, removed, updated } = compareConfigurationContents(to, from);
|
405
393
|
const overrides = [];
|
406
|
-
const fromOverrideIdentifiers =
|
407
|
-
const toOverrideIdentifiers =
|
394
|
+
const fromOverrideIdentifiers = from?.getAllOverrideIdentifiers() || [];
|
395
|
+
const toOverrideIdentifiers = to?.getAllOverrideIdentifiers() || [];
|
408
396
|
if (to) {
|
409
397
|
const addedOverrideIdentifiers = toOverrideIdentifiers.filter(key => !fromOverrideIdentifiers.includes(key));
|
410
398
|
for (const identifier of addedOverrideIdentifiers) {
|
@@ -427,7 +415,6 @@ function compare(from, to) {
|
|
427
415
|
}
|
428
416
|
return { added, removed, updated, overrides };
|
429
417
|
}
|
430
|
-
exports.compare = compare;
|
431
418
|
function compareConfigurationContents(to, from) {
|
432
419
|
const added = to
|
433
420
|
? from ? to.keys.filter(key => from.keys.indexOf(key) === -1) : [...to.keys]
|
@@ -439,8 +426,8 @@ function compareConfigurationContents(to, from) {
|
|
439
426
|
if (to && from) {
|
440
427
|
for (const key of from.keys) {
|
441
428
|
if (to.keys.indexOf(key) !== -1) {
|
442
|
-
const value1 =
|
443
|
-
const value2 =
|
429
|
+
const value1 = getConfigurationValue(from.contents, key);
|
430
|
+
const value2 = getConfigurationValue(to.contents, key);
|
444
431
|
if (!objects.equals(value1, value2)) {
|
445
432
|
updated.push(key);
|
446
433
|
}
|
@@ -449,13 +436,13 @@ function compareConfigurationContents(to, from) {
|
|
449
436
|
}
|
450
437
|
return { added, removed, updated };
|
451
438
|
}
|
452
|
-
const OVERRIDE_IDENTIFIER_REGEX = new RegExp(
|
453
|
-
|
439
|
+
const OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');
|
440
|
+
const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);
|
454
441
|
function overrideIdentifiersFromKey(key) {
|
455
442
|
const identifiers = [];
|
456
|
-
if (
|
443
|
+
if (OVERRIDE_PROPERTY_REGEX.test(key)) {
|
457
444
|
let matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);
|
458
|
-
while (matches
|
445
|
+
while (matches?.length) {
|
459
446
|
const identifier = matches[1].trim();
|
460
447
|
if (identifier) {
|
461
448
|
identifiers.push(identifier);
|
@@ -464,6 +451,4 @@ function overrideIdentifiersFromKey(key) {
|
|
464
451
|
}
|
465
452
|
}
|
466
453
|
return arrays.distinct(identifiers);
|
467
|
-
}
|
468
|
-
exports.overrideIdentifiersFromKey = overrideIdentifiersFromKey;
|
469
|
-
//# sourceMappingURL=configuration.js.map
|
454
|
+
}export{Configuration,OVERRIDE_PROPERTY_REGEX,compare,overrideIdentifiersFromKey};
|
@@ -1,13 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ConfigurationChangeEvent = void 0;
|
4
|
-
/* tslint:disable */
|
5
|
-
const objects = require("@vscode-alt/monaco-editor/esm/vs/base/common/objects");
|
6
|
-
const interfaces_1 = require("../../../interfaces");
|
7
|
-
const configuration_1 = require("../configuration");
|
8
|
-
const helpers_1 = require("../helpers");
|
9
|
-
const models_1 = require("../models");
|
10
|
-
organization: interfaces_1.IOrganizationContext;
|
1
|
+
import*as objects from'@vscode-alt/monaco-editor/esm/vs/base/common/objects.js';import'../../../interfaces/generated/generated-models.js';import'../../../interfaces/configuration/configuration.js';import'../../../interfaces/organization/organization-context.js';import'@workbench-stack/core';import {Configuration}from'../configuration.js';import {toValuesTree}from'../helpers/configuration.js';import {ConfigurationModel}from'../models/ConfigurationModel.js';/* tslint:disable */
|
11
2
|
// https://github.com/microsoft/vscode/blob/1562a35c863c312eec35c161b9ceac9921afa50e/src/vs/platform/configuration/common/configurationModels.ts
|
12
3
|
class ConfigurationChangeEvent {
|
13
4
|
constructor(change, previous, currentConfiguraiton, currentOrganization) {
|
@@ -20,21 +11,20 @@ class ConfigurationChangeEvent {
|
|
20
11
|
change.keys.forEach(key => keysSet.add(key));
|
21
12
|
change.overrides.forEach(([, keys]) => keys.forEach(key => keysSet.add(key)));
|
22
13
|
this.affectedKeys = [...keysSet.values()];
|
23
|
-
const configurationModel = new
|
14
|
+
const configurationModel = new ConfigurationModel();
|
24
15
|
this.affectedKeys.forEach(key => configurationModel.setValue(key, {}));
|
25
16
|
this.affectedKeysTree = configurationModel.contents;
|
26
17
|
}
|
27
18
|
get previousConfiguration() {
|
28
19
|
if (!this._previousConfiguration && this.previous) {
|
29
|
-
this._previousConfiguration =
|
20
|
+
this._previousConfiguration = Configuration.parse(this.previous.data);
|
30
21
|
}
|
31
22
|
return this._previousConfiguration;
|
32
23
|
}
|
33
24
|
affectsConfiguration(section, overrides) {
|
34
|
-
var _a;
|
35
25
|
if (this.doesAffectedKeysTreeContains(this.affectedKeysTree, section)) {
|
36
26
|
if (overrides) {
|
37
|
-
const value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides,
|
27
|
+
const value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, this.previous?.organization) : undefined;
|
38
28
|
const value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentOrganization);
|
39
29
|
return !objects.equals(value1, value2);
|
40
30
|
}
|
@@ -43,7 +33,7 @@ class ConfigurationChangeEvent {
|
|
43
33
|
return false;
|
44
34
|
}
|
45
35
|
doesAffectedKeysTreeContains(affectedKeysTree, section) {
|
46
|
-
let requestedTree =
|
36
|
+
let requestedTree = toValuesTree({ [section]: true }, () => { });
|
47
37
|
let key;
|
48
38
|
while (typeof requestedTree === 'object' && (key = Object.keys(requestedTree)[0])) { // Only one key should present, since we added only one property
|
49
39
|
affectedKeysTree = affectedKeysTree[key];
|
@@ -54,6 +44,4 @@ class ConfigurationChangeEvent {
|
|
54
44
|
}
|
55
45
|
return true;
|
56
46
|
}
|
57
|
-
}
|
58
|
-
exports.ConfigurationChangeEvent = ConfigurationChangeEvent;
|
59
|
-
//# sourceMappingURL=ConfigurationChangeEvent.js.map
|
47
|
+
}export{ConfigurationChangeEvent};
|
@@ -1,18 +1,11 @@
|
|
1
|
-
|
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.SettingsTypeToConfiguraitonTarget = exports.ConfigurationTargetConfigurationMapper = exports.ConfigurationTargetToString = exports.isConfigurationOverrides = void 0;
|
4
|
-
/* tslint:disable */
|
5
|
-
const types = require("@vscode-alt/monaco-editor/esm/vs/base/common/types");
|
6
|
-
const uri_1 = require("@vscode-alt/monaco-editor/esm/vs/base/common/uri");
|
7
|
-
const interfaces_1 = require("../../../interfaces");
|
1
|
+
import*as types from'@vscode-alt/monaco-editor/esm/vs/base/common/types.js';import {URI}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';import {IClientCacheTypeNames}from'../../../interfaces/generated/generated-models.js';import'../../../interfaces/configuration/configuration.js';import'../../../interfaces/organization/organization-context.js';import'@workbench-stack/core';/* tslint:disable */
|
8
2
|
// src/vs/platform/configuration/common/configuration.ts
|
9
3
|
function isConfigurationOverrides(thing) {
|
10
4
|
return (thing &&
|
11
5
|
typeof thing === 'object' &&
|
12
6
|
(!thing.overrideIdentifier || typeof thing.overrideIdentifier === 'string') &&
|
13
|
-
(!thing.resource || thing.resource instanceof
|
7
|
+
(!thing.resource || thing.resource instanceof URI || URI.isUri(thing.resource))); // @sri added isURI
|
14
8
|
}
|
15
|
-
exports.isConfigurationOverrides = isConfigurationOverrides;
|
16
9
|
/**
|
17
10
|
* @SRI modified to match to the union type of graphql type Settings
|
18
11
|
*/
|
@@ -36,28 +29,26 @@ function ConfigurationTargetToString(configurationTarget) {
|
|
36
29
|
return 'OrganizationSettings';
|
37
30
|
}
|
38
31
|
}
|
39
|
-
exports.ConfigurationTargetToString = ConfigurationTargetToString;
|
40
32
|
function ConfigurationTargetConfigurationMapper(configurationTarget) {
|
41
33
|
switch (configurationTarget) {
|
42
34
|
case 1 /* ConfigurationTarget.USER */:
|
43
|
-
return
|
35
|
+
return IClientCacheTypeNames.UserConfiguration;
|
44
36
|
case 2 /* ConfigurationTarget.APPLICATION */:
|
45
|
-
return
|
37
|
+
return IClientCacheTypeNames.ApplicationConfiguration;
|
46
38
|
case 3 /* ConfigurationTarget.MACHINE */:
|
47
|
-
return
|
39
|
+
return IClientCacheTypeNames.MachineConfiguration;
|
48
40
|
case 4 /* ConfigurationTarget.ORGANIZATION */:
|
49
|
-
return
|
41
|
+
return IClientCacheTypeNames.OrganizationConfiguration;
|
50
42
|
case 5 /* ConfigurationTarget.ORGANIZATION_RESOURCE */:
|
51
|
-
return
|
43
|
+
return IClientCacheTypeNames.OrganizationResourceConfiguration;
|
52
44
|
case 6 /* ConfigurationTarget.DEFAULT */:
|
53
|
-
return
|
45
|
+
return IClientCacheTypeNames.DefaultConfiguration;
|
54
46
|
// case ConfigurationTarget.MEMORY:
|
55
47
|
// return 'MemorySettings';
|
56
48
|
default:
|
57
|
-
return
|
49
|
+
return IClientCacheTypeNames.OrganizationConfiguration;
|
58
50
|
}
|
59
51
|
}
|
60
|
-
exports.ConfigurationTargetConfigurationMapper = ConfigurationTargetConfigurationMapper;
|
61
52
|
function SettingsTypeToConfiguraitonTarget(settings) {
|
62
53
|
switch (settings) {
|
63
54
|
case 'UserSettings':
|
@@ -78,7 +69,6 @@ function SettingsTypeToConfiguraitonTarget(settings) {
|
|
78
69
|
return 4 /* ConfigurationTarget.ORGANIZATION */;
|
79
70
|
}
|
80
71
|
}
|
81
|
-
exports.SettingsTypeToConfiguraitonTarget = SettingsTypeToConfiguraitonTarget;
|
82
72
|
// not using currently but stays here for future reference
|
83
73
|
// @sri modified function to take ConfigurationRegistry as second argument input
|
84
74
|
// export function toOverrides(raw: any, configurationProperties, conflictReporter: (message: string) => void): IOverrides[] {
|
@@ -107,7 +97,6 @@ function toValuesTree(properties, conflictReporter) {
|
|
107
97
|
}
|
108
98
|
return root;
|
109
99
|
}
|
110
|
-
exports.toValuesTree = toValuesTree;
|
111
100
|
function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {
|
112
101
|
const segments = key.split('.');
|
113
102
|
const last = segments.pop();
|
@@ -134,12 +123,10 @@ function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {
|
|
134
123
|
conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);
|
135
124
|
}
|
136
125
|
}
|
137
|
-
exports.addToValueTree = addToValueTree;
|
138
126
|
function removeFromValueTree(valueTree, key) {
|
139
127
|
const segments = key.split('.');
|
140
128
|
doRemoveFromValueTree(valueTree, segments);
|
141
129
|
}
|
142
|
-
exports.removeFromValueTree = removeFromValueTree;
|
143
130
|
function doRemoveFromValueTree(valueTree, segments) {
|
144
131
|
const first = segments.shift();
|
145
132
|
if (segments.length === 0) {
|
@@ -182,7 +169,6 @@ function getConfigurationValue(config, settingPath, defaultValue) {
|
|
182
169
|
}
|
183
170
|
return typeof result === 'undefined' ? defaultValue : result;
|
184
171
|
}
|
185
|
-
exports.getConfigurationValue = getConfigurationValue;
|
186
172
|
function merge(base, add, overwrite) {
|
187
173
|
Object.keys(add).forEach((key) => {
|
188
174
|
if (key in base) {
|
@@ -198,17 +184,14 @@ function merge(base, add, overwrite) {
|
|
198
184
|
}
|
199
185
|
});
|
200
186
|
}
|
201
|
-
exports.merge = merge;
|
202
187
|
// getConfigurationKeys() exist in the server-core
|
203
188
|
// getDefaultValues() exist in the server core
|
204
189
|
function overrideIdentifierFromKey(key) {
|
205
190
|
return key.substring(1, key.length - 1);
|
206
191
|
}
|
207
|
-
exports.overrideIdentifierFromKey = overrideIdentifierFromKey;
|
208
192
|
function keyFromOverrideIdentifier(overrideIdentifier) {
|
209
193
|
return `[${overrideIdentifier}]`;
|
210
194
|
}
|
211
|
-
exports.keyFromOverrideIdentifier = keyFromOverrideIdentifier;
|
212
195
|
function getMigratedSettingValue(configurationService, currentSettingName, legacySettingName) {
|
213
196
|
const setting = configurationService.inspect(currentSettingName);
|
214
197
|
const legacySetting = configurationService.inspect(legacySettingName);
|
@@ -223,6 +206,4 @@ function getMigratedSettingValue(configurationService, currentSettingName, legac
|
|
223
206
|
return legacySetting.value;
|
224
207
|
}
|
225
208
|
return setting.defaultValue;
|
226
|
-
}
|
227
|
-
exports.getMigratedSettingValue = getMigratedSettingValue;
|
228
|
-
//# sourceMappingURL=configuration.js.map
|
209
|
+
}export{ConfigurationTargetConfigurationMapper,ConfigurationTargetToString,SettingsTypeToConfiguraitonTarget,addToValueTree,getConfigurationValue,getMigratedSettingValue,isConfigurationOverrides,keyFromOverrideIdentifier,merge,overrideIdentifierFromKey,removeFromValueTree,toValuesTree};
|
@@ -1,11 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ConfigurationModel = void 0;
|
4
|
-
const objects = require("@vscode-alt/monaco-editor/esm/vs/base/common/objects");
|
5
|
-
const arrays = require("@vscode-alt/monaco-editor/esm/vs/base/common/arrays");
|
6
|
-
const types = require("@vscode-alt/monaco-editor/esm/vs/base/common/types");
|
7
|
-
const configuration_1 = require("../helpers/configuration");
|
8
|
-
// https://github.com/microsoft/vscode/blob/1562a35c863c312eec35c161b9ceac9921afa50e/src/vs/platform/configuration/common/configurationModels.ts
|
1
|
+
import*as objects from'@vscode-alt/monaco-editor/esm/vs/base/common/objects.js';import*as arrays from'@vscode-alt/monaco-editor/esm/vs/base/common/arrays.js';import*as types from'@vscode-alt/monaco-editor/esm/vs/base/common/types.js';import {getConfigurationValue,addToValueTree,removeFromValueTree}from'../helpers/configuration.js';// https://github.com/microsoft/vscode/blob/1562a35c863c312eec35c161b9ceac9921afa50e/src/vs/platform/configuration/common/configurationModels.ts
|
9
2
|
class ConfigurationModel {
|
10
3
|
constructor(_contents = {}, _keys = [], _overrides = []) {
|
11
4
|
this._contents = _contents;
|
@@ -30,12 +23,12 @@ class ConfigurationModel {
|
|
30
23
|
return this.frozen;
|
31
24
|
}
|
32
25
|
getValue(section) {
|
33
|
-
return section ?
|
26
|
+
return section ? getConfigurationValue(this.contents, section) : this.contents;
|
34
27
|
}
|
35
28
|
getOverrideValue(section, overrideIdentifier) {
|
36
29
|
const overrideContents = this.getContentsForOverrideIdentifer(overrideIdentifier);
|
37
30
|
return overrideContents
|
38
|
-
? section ?
|
31
|
+
? section ? getConfigurationValue(overrideContents, section) : overrideContents
|
39
32
|
: undefined;
|
40
33
|
}
|
41
34
|
getKeysForOverrideIdentifier(identifier) {
|
@@ -174,11 +167,11 @@ class ConfigurationModel {
|
|
174
167
|
// Update methods
|
175
168
|
setValue(key, value) {
|
176
169
|
this.addKey(key);
|
177
|
-
|
170
|
+
addToValueTree(this.contents, key, value, e => { throw new Error(e); });
|
178
171
|
}
|
179
172
|
removeValue(key) {
|
180
173
|
if (this.removeKey(key)) {
|
181
|
-
|
174
|
+
removeFromValueTree(this.contents, key);
|
182
175
|
}
|
183
176
|
}
|
184
177
|
addKey(key) {
|
@@ -198,6 +191,4 @@ class ConfigurationModel {
|
|
198
191
|
}
|
199
192
|
return false;
|
200
193
|
}
|
201
|
-
}
|
202
|
-
exports.ConfigurationModel = ConfigurationModel;
|
203
|
-
//# sourceMappingURL=ConfigurationModel.js.map
|
194
|
+
}export{ConfigurationModel};
|
package/lib/core/disposable.js
CHANGED
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.DisposableCollection = exports.Disposable = void 0;
|
4
|
-
/* tslint:disable */
|
5
|
-
const event_1 = require("./event");
|
1
|
+
import {Emitter}from'./event.js';/* tslint:disable */
|
6
2
|
var Disposable;
|
7
3
|
(function (Disposable) {
|
8
4
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -17,11 +13,11 @@ var Disposable;
|
|
17
13
|
}
|
18
14
|
Disposable.create = create;
|
19
15
|
Disposable.NULL = create(() => { });
|
20
|
-
})(Disposable
|
16
|
+
})(Disposable || (Disposable = {}));
|
21
17
|
class DisposableCollection {
|
22
18
|
constructor(...toDispose) {
|
23
19
|
this.disposables = [];
|
24
|
-
this.onDisposeEmitter = new
|
20
|
+
this.onDisposeEmitter = new Emitter();
|
25
21
|
this.disposingElements = false;
|
26
22
|
toDispose.forEach(d => this.push(d));
|
27
23
|
}
|
@@ -77,6 +73,4 @@ class DisposableCollection {
|
|
77
73
|
pushAll(disposables) {
|
78
74
|
return disposables.map(disposable => this.push(disposable));
|
79
75
|
}
|
80
|
-
}
|
81
|
-
exports.DisposableCollection = DisposableCollection;
|
82
|
-
//# sourceMappingURL=disposable.js.map
|
76
|
+
}export{Disposable,DisposableCollection};
|
package/lib/core/event.js
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
"use strict";
|
2
1
|
/* tslint:disable */
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.WaitUntilEvent = exports.Emitter = exports.Event = void 0;
|
5
2
|
var Event;
|
6
3
|
(function (Event) {
|
7
4
|
const _disposable = { dispose() { } };
|
@@ -19,7 +16,7 @@ var Event;
|
|
19
16
|
});
|
20
17
|
}
|
21
18
|
Event.map = map;
|
22
|
-
})(Event
|
19
|
+
})(Event || (Event = {}));
|
23
20
|
class CallbackList {
|
24
21
|
get length() {
|
25
22
|
return this._callbacks && this._callbacks.length || 0;
|
@@ -210,7 +207,6 @@ class Emitter {
|
|
210
207
|
this._disposed = true;
|
211
208
|
}
|
212
209
|
}
|
213
|
-
exports.Emitter = Emitter;
|
214
210
|
Emitter.LEAK_WARNING_THRESHHOLD = 175;
|
215
211
|
Emitter._noop = function () { };
|
216
212
|
var WaitUntilEvent;
|
@@ -245,5 +241,4 @@ var WaitUntilEvent;
|
|
245
241
|
}
|
246
242
|
}
|
247
243
|
WaitUntilEvent.fire = fire;
|
248
|
-
})(WaitUntilEvent
|
249
|
-
//# sourceMappingURL=event.js.map
|
244
|
+
})(WaitUntilEvent || (WaitUntilEvent = {}));export{Emitter,Event,WaitUntilEvent};
|
@@ -1,13 +1,9 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.OrganizationConfiguration = void 0;
|
4
|
-
const configurations_1 = require("../configurations");
|
5
|
-
class OrganizationConfiguration extends configurations_1.Configuration {
|
1
|
+
import'@vscode-alt/monaco-editor/esm/vs/base/common/types.js';import'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';import'../../interfaces/generated/generated-models.js';import'../../interfaces/configuration/configuration.js';import'../../interfaces/organization/organization-context.js';import'@workbench-stack/core';import'@vscode-alt/monaco-editor/esm/vs/base/common/objects.js';import'@vscode-alt/monaco-editor/esm/vs/base/common/arrays.js';import {Configuration}from'../configurations/configuration.js';class OrganizationConfiguration extends Configuration {
|
6
2
|
constructor(defaults, policy, application, user, machine, organizationConfiguration, resources, memoryConfiguration, memoryConfigurationByResource, _organization) {
|
7
3
|
super(defaults, policy, application, user, machine, organizationConfiguration, resources, memoryConfiguration, memoryConfigurationByResource);
|
8
4
|
this._organization = _organization;
|
9
5
|
}
|
10
|
-
getValue(key, overrides, undefined, externalConfiguration) {
|
6
|
+
getValue(key, overrides, undefined$1, externalConfiguration) {
|
11
7
|
return super.getValue(key, overrides, this._organization, externalConfiguration);
|
12
8
|
}
|
13
9
|
inspect(key, overrides = {}) {
|
@@ -16,6 +12,4 @@ class OrganizationConfiguration extends configurations_1.Configuration {
|
|
16
12
|
keys() {
|
17
13
|
return super.keys(this._organization);
|
18
14
|
}
|
19
|
-
}
|
20
|
-
exports.OrganizationConfiguration = OrganizationConfiguration;
|
21
|
-
//# sourceMappingURL=configuration.js.map
|
15
|
+
}export{OrganizationConfiguration};
|
@@ -1,34 +1,23 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.isOrganizationIdentifier = exports.isSingleResourceOrganizationInitializationPayload = exports.isSingleResourceOrganizationIdentifier = exports.isRawUriOrganizationResource = exports.isRawFileOrganizationResource = void 0;
|
4
|
-
const uri_1 = require("@vscode-alt/monaco-editor/esm/vs/base/common/uri");
|
5
|
-
function isRawFileOrganizationResource(thing) {
|
1
|
+
import {URI}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';function isRawFileOrganizationResource(thing) {
|
6
2
|
return thing
|
7
3
|
&& typeof thing === 'object'
|
8
4
|
&& typeof thing.path === 'string'
|
9
5
|
&& (!thing.name || typeof thing.name === 'string');
|
10
6
|
}
|
11
|
-
exports.isRawFileOrganizationResource = isRawFileOrganizationResource;
|
12
7
|
function isRawUriOrganizationResource(thing) {
|
13
8
|
return thing
|
14
9
|
&& typeof thing === 'object'
|
15
10
|
&& typeof thing.uri === 'string'
|
16
11
|
&& (!thing.name || typeof thing.name === 'string');
|
17
12
|
}
|
18
|
-
exports.isRawUriOrganizationResource = isRawUriOrganizationResource;
|
19
13
|
function isSingleResourceOrganizationIdentifier(obj) {
|
20
|
-
return obj instanceof
|
14
|
+
return obj instanceof URI || URI.isUri(obj); //@sri added optional isURI
|
21
15
|
}
|
22
|
-
exports.isSingleResourceOrganizationIdentifier = isSingleResourceOrganizationIdentifier;
|
23
16
|
function isSingleResourceOrganizationInitializationPayload(obj) {
|
24
17
|
return isSingleResourceOrganizationIdentifier(obj.resource);
|
25
18
|
}
|
26
|
-
exports.isSingleResourceOrganizationInitializationPayload = isSingleResourceOrganizationInitializationPayload;
|
27
|
-
;
|
28
19
|
function isOrganizationIdentifier(obj) {
|
29
20
|
const workspaceIdentifier = obj;
|
30
21
|
return workspaceIdentifier && typeof workspaceIdentifier.id === 'string' &&
|
31
|
-
(workspaceIdentifier.configPath instanceof
|
32
|
-
}
|
33
|
-
exports.isOrganizationIdentifier = isOrganizationIdentifier;
|
34
|
-
//# sourceMappingURL=organization-helpers.js.map
|
22
|
+
(workspaceIdentifier.configPath instanceof URI || URI.isUri(workspaceIdentifier.configPath)); //@sri added isURI
|
23
|
+
}export{isOrganizationIdentifier,isRawFileOrganizationResource,isRawUriOrganizationResource,isSingleResourceOrganizationIdentifier,isSingleResourceOrganizationInitializationPayload};
|