@adminide-stack/core 12.0.4-alpha.323 → 12.0.4-alpha.326

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.
@@ -3,3 +3,4 @@ export * from './models';
3
3
  export * from './configuration';
4
4
  export * from './events';
5
5
  export * from './parser';
6
+ export * from './utils';
@@ -1,3 +1,4 @@
1
+ import { ConfigurationModel } from '../models/ConfigurationModel';
1
2
  /**
2
3
  * Utility to extract overrides and keys from configuration data
3
4
  *
@@ -180,3 +181,44 @@ export declare function hasOverrides(settings: any): boolean;
180
181
  * ```
181
182
  */
182
183
  export declare function getOverrideByIdentifier(settings: any, identifier: string): any | undefined;
184
+ /**
185
+ * Convert extracted configuration directly into a ConfigurationModel
186
+ *
187
+ * @param settings - Configuration object with bracket-notation overrides
188
+ * @returns ConfigurationModel instance ready to use
189
+ *
190
+ * @example
191
+ * ```typescript
192
+ * const settings = {
193
+ * theme: "light",
194
+ * "[desktop]": { theme: "dark" },
195
+ * "[/o/:orgName/vault]": { navTheme: "realDark" }
196
+ * };
197
+ *
198
+ * const model = createConfigurationModel(settings);
199
+ * // Now you can use: model.getValue(), model.override('desktop'), etc.
200
+ * ```
201
+ */
202
+ export declare function createConfigurationModel(settings: any): ConfigurationModel;
203
+ /**
204
+ * Extract configuration and return both the extracted data and ConfigurationModel
205
+ *
206
+ * @param settings - Configuration object with bracket-notation overrides
207
+ * @returns Both extracted configuration and ConfigurationModel
208
+ *
209
+ * @example
210
+ * ```typescript
211
+ * const settings = {
212
+ * theme: "light",
213
+ * "[desktop]": { theme: "dark" }
214
+ * };
215
+ *
216
+ * const { extracted, model } = extractConfigurationWithModel(settings);
217
+ * // extracted: { baseContents, baseKeys, overrides }
218
+ * // model: ConfigurationModel instance
219
+ * ```
220
+ */
221
+ export declare function extractConfigurationWithModel(settings: any): {
222
+ extracted: ExtractedConfiguration;
223
+ model: ConfigurationModel;
224
+ };
@@ -0,0 +1,315 @@
1
+ import {OVERRIDE_PROPERTY_REGEX,overrideIdentifiersFromKey}from'../configuration.js';import {ConfigurationModel}from'../models/ConfigurationModel.js';/* eslint-disable @typescript-eslint/no-explicit-any */
2
+ // ============================================================================
3
+ // Core Utility Functions (Reusing existing utilities)
4
+ // ============================================================================
5
+ /**
6
+ * Check if a key is a bracket-notation override identifier
7
+ * Uses OVERRIDE_PROPERTY_REGEX from configuration.ts
8
+ *
9
+ * @param key - The key to check
10
+ * @returns True if the key matches the override pattern
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * isBracketKey('[desktop]') // true
15
+ * isBracketKey('[/o/:orgName/vault]') // true
16
+ * isBracketKey('[/route][desktop]') // true
17
+ * isBracketKey('headerBgColor') // false
18
+ * ```
19
+ */
20
+ function isBracketKey(key) {
21
+ return OVERRIDE_PROPERTY_REGEX.test(key);
22
+ }
23
+ /**
24
+ * Extract individual identifiers from a bracket key
25
+ * Reuses overrideIdentifiersFromKey from configuration.ts
26
+ * Handles compound identifiers like [/route][desktop]
27
+ *
28
+ * @param key - The bracket key to parse
29
+ * @returns Array of identifiers without brackets
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * extractIdentifiersFromKey('[desktop]')
34
+ * // Returns: ['desktop']
35
+ *
36
+ * extractIdentifiersFromKey('[/o/:orgName/vault]')
37
+ * // Returns: ['/o/:orgName/vault']
38
+ *
39
+ * extractIdentifiersFromKey('[/o/:orgName/vault][desktop]')
40
+ * // Returns: ['/o/:orgName/vault', 'desktop']
41
+ * ```
42
+ */
43
+ function extractIdentifiersFromKey(key) {
44
+ return overrideIdentifiersFromKey(key);
45
+ }
46
+ /**
47
+ * Extract overrides and base configuration from settings object
48
+ *
49
+ * @param settings - Configuration object that may contain bracket-notation overrides
50
+ * @returns Extracted base contents, keys, and overrides array
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * const settings = {
55
+ * headerBgColor: "#000000",
56
+ * textColor: "#a19c9c",
57
+ * "[/o/:orgName/vault]": {
58
+ * navTheme: "realDark",
59
+ * primaryColor: "#1890ff"
60
+ * },
61
+ * "[/o/:orgName/pref/settings]": {
62
+ * header: { menuHeaderRender: false }
63
+ * }
64
+ * };
65
+ *
66
+ * const { baseContents, baseKeys, overrides } = extractConfiguration(settings);
67
+ * // baseContents: { headerBgColor: "#000000", textColor: "#a19c9c" }
68
+ * // baseKeys: ["headerBgColor", "textColor"]
69
+ * // overrides: [
70
+ * // { identifiers: ["/o/:orgName/vault"], contents: {...}, keys: [...] },
71
+ * // { identifiers: ["/o/:orgName/pref/settings"], contents: {...}, keys: [...] }
72
+ * // ]
73
+ * ```
74
+ */
75
+ function extractConfiguration(settings) {
76
+ const baseContents = {};
77
+ const overrides = [];
78
+ if (!settings || typeof settings !== 'object') {
79
+ return {
80
+ baseContents: {},
81
+ baseKeys: [],
82
+ overrides: []
83
+ };
84
+ }
85
+ // Iterate through all keys in the settings object
86
+ Object.keys(settings).forEach(key => {
87
+ if (isBracketKey(key)) {
88
+ // This is a bracket override: [device] or [/route][device]
89
+ const overrideData = settings[key];
90
+ const identifiers = extractIdentifiersFromKey(key);
91
+ overrides.push({
92
+ identifiers,
93
+ contents: overrideData,
94
+ keys: Object.keys(overrideData || {})
95
+ });
96
+ } else {
97
+ // Base settings (flat, no wrapper)
98
+ baseContents[key] = settings[key];
99
+ }
100
+ });
101
+ const baseKeys = Object.keys(baseContents);
102
+ return {
103
+ baseContents,
104
+ baseKeys,
105
+ overrides
106
+ };
107
+ }
108
+ // ============================================================================
109
+ // Additional Helper Functions
110
+ // ============================================================================
111
+ /**
112
+ * Get only the override keys (bracket-notation keys) from settings
113
+ *
114
+ * @param settings - Configuration object
115
+ * @returns Array of bracket keys
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * const settings = {
120
+ * headerBgColor: "#000000",
121
+ * "[/o/:orgName/vault]": {...},
122
+ * "[desktop]": {...}
123
+ * };
124
+ *
125
+ * getOverrideKeys(settings)
126
+ * // Returns: ['[/o/:orgName/vault]', '[desktop]']
127
+ * ```
128
+ */
129
+ function getOverrideKeys(settings) {
130
+ if (!settings || typeof settings !== 'object') {
131
+ return [];
132
+ }
133
+ return Object.keys(settings).filter(isBracketKey);
134
+ }
135
+ /**
136
+ * Get only the base keys (non-bracket keys) from settings
137
+ *
138
+ * @param settings - Configuration object
139
+ * @returns Array of base keys
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * const settings = {
144
+ * headerBgColor: "#000000",
145
+ * textColor: "#a19c9c",
146
+ * "[/o/:orgName/vault]": {...}
147
+ * };
148
+ *
149
+ * getBaseKeys(settings)
150
+ * // Returns: ['headerBgColor', 'textColor']
151
+ * ```
152
+ */
153
+ function getBaseKeys(settings) {
154
+ if (!settings || typeof settings !== 'object') {
155
+ return [];
156
+ }
157
+ return Object.keys(settings).filter(key => !isBracketKey(key));
158
+ }
159
+ /**
160
+ * Remove all bracket-notation keys from an object
161
+ * Returns a new object with only base properties
162
+ *
163
+ * @param settings - Configuration object
164
+ * @returns New object without bracket keys
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * const settings = {
169
+ * headerBgColor: "#000000",
170
+ * "[/o/:orgName/vault]": {...},
171
+ * textColor: "#a19c9c"
172
+ * };
173
+ *
174
+ * removeOverrideKeys(settings)
175
+ * // Returns: { headerBgColor: "#000000", textColor: "#a19c9c" }
176
+ * ```
177
+ */
178
+ function removeOverrideKeys(settings) {
179
+ if (!settings || typeof settings !== 'object') {
180
+ return {};
181
+ }
182
+ const result = {};
183
+ Object.keys(settings).forEach(key => {
184
+ if (!isBracketKey(key)) {
185
+ result[key] = settings[key];
186
+ }
187
+ });
188
+ return result;
189
+ }
190
+ /**
191
+ * Check if settings object has any override identifiers
192
+ *
193
+ * @param settings - Configuration object
194
+ * @returns True if any bracket keys exist
195
+ *
196
+ * @example
197
+ * ```typescript
198
+ * hasOverrides({ headerBgColor: "#000" }) // false
199
+ * hasOverrides({ "[desktop]": {...} }) // true
200
+ * ```
201
+ */
202
+ function hasOverrides(settings) {
203
+ if (!settings || typeof settings !== 'object') {
204
+ return false;
205
+ }
206
+ return Object.keys(settings).some(isBracketKey);
207
+ }
208
+ /**
209
+ * Get a specific override by identifier
210
+ *
211
+ * @param settings - Configuration object
212
+ * @param identifier - The identifier to search for (without brackets)
213
+ * @returns The override contents or undefined if not found
214
+ *
215
+ * @example
216
+ * ```typescript
217
+ * const settings = {
218
+ * "[/o/:orgName/vault]": { navTheme: "realDark" },
219
+ * "[desktop]": { theme: "dark" }
220
+ * };
221
+ *
222
+ * getOverrideByIdentifier(settings, '/o/:orgName/vault')
223
+ * // Returns: { navTheme: "realDark" }
224
+ *
225
+ * getOverrideByIdentifier(settings, 'desktop')
226
+ * // Returns: { theme: "dark" }
227
+ * ```
228
+ */
229
+ function getOverrideByIdentifier(settings, identifier) {
230
+ if (!settings || typeof settings !== 'object' || !identifier) {
231
+ return undefined;
232
+ }
233
+ // Try exact match with brackets
234
+ const exactKey = `[${identifier}]`;
235
+ if (settings[exactKey]) {
236
+ return settings[exactKey];
237
+ }
238
+ // Try finding in compound keys
239
+ for (const key of Object.keys(settings)) {
240
+ if (isBracketKey(key)) {
241
+ const identifiers = extractIdentifiersFromKey(key);
242
+ if (identifiers.includes(identifier)) {
243
+ return settings[key];
244
+ }
245
+ }
246
+ }
247
+ return undefined;
248
+ }
249
+ // ============================================================================
250
+ // ConfigurationModel Creation
251
+ // ============================================================================
252
+ /**
253
+ * Convert extracted configuration directly into a ConfigurationModel
254
+ *
255
+ * @param settings - Configuration object with bracket-notation overrides
256
+ * @returns ConfigurationModel instance ready to use
257
+ *
258
+ * @example
259
+ * ```typescript
260
+ * const settings = {
261
+ * theme: "light",
262
+ * "[desktop]": { theme: "dark" },
263
+ * "[/o/:orgName/vault]": { navTheme: "realDark" }
264
+ * };
265
+ *
266
+ * const model = createConfigurationModel(settings);
267
+ * // Now you can use: model.getValue(), model.override('desktop'), etc.
268
+ * ```
269
+ */
270
+ function createConfigurationModel(settings) {
271
+ const {
272
+ baseContents,
273
+ baseKeys,
274
+ overrides
275
+ } = extractConfiguration(settings);
276
+ // Convert our ConfigurationOverride format to IOverrides format
277
+ const iOverrides = overrides.map(override => ({
278
+ identifiers: override.identifiers,
279
+ keys: override.keys,
280
+ contents: override.contents
281
+ }));
282
+ // Create and return ConfigurationModel
283
+ return new ConfigurationModel(baseContents, baseKeys, iOverrides);
284
+ }
285
+ /**
286
+ * Extract configuration and return both the extracted data and ConfigurationModel
287
+ *
288
+ * @param settings - Configuration object with bracket-notation overrides
289
+ * @returns Both extracted configuration and ConfigurationModel
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * const settings = {
294
+ * theme: "light",
295
+ * "[desktop]": { theme: "dark" }
296
+ * };
297
+ *
298
+ * const { extracted, model } = extractConfigurationWithModel(settings);
299
+ * // extracted: { baseContents, baseKeys, overrides }
300
+ * // model: ConfigurationModel instance
301
+ * ```
302
+ */
303
+ function extractConfigurationWithModel(settings) {
304
+ const extracted = extractConfiguration(settings);
305
+ const iOverrides = extracted.overrides.map(override => ({
306
+ identifiers: override.identifiers,
307
+ keys: override.keys,
308
+ contents: override.contents
309
+ }));
310
+ const model = new ConfigurationModel(extracted.baseContents, extracted.baseKeys, iOverrides);
311
+ return {
312
+ extracted,
313
+ model
314
+ };
315
+ }export{createConfigurationModel,extractConfiguration,extractConfigurationWithModel,extractIdentifiersFromKey,getBaseKeys,getOverrideByIdentifier,getOverrideKeys,hasOverrides,isBracketKey,removeOverrideKeys};//# sourceMappingURL=configurationExtractor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configurationExtractor.js","sources":["../../../../src/core/configurations/utils/configurationExtractor.ts"],"sourcesContent":[null],"names":[],"mappings":"sJAAA;AA+BA;AACA;AACA;AAEA;;;;;;;;;;;;;;AAcG;AACG,SAAU,YAAY,CAAC,GAAW,EAAA;AACpC,EAAA,OAAA,4BAA+B,CAAA,GAAK,CAAA;AACxC;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;AACG,SAAU,yBAAyB,CAAC,GAAW,EAAA;AACjD,EAAA,OAAA,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A;AACpB,QAAA,OAAA,YAAe,CAAC;AACZ,MAAA;;;SAGX,SAAA;AAED;AACJ;AAEA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;AAiBG,SAAA,wBAAA,CAAA,QAAA,EAAA;AACH,EAAA,MAAM;AACF,IAAA,YAAQ;IAER,QAAA;IACA;0BACiB,CAAA,QAAS,CAAA;;QAEtB,UAAU,GAAA,SAAS,CAAA,GAAA,CAAQ,QAAA,KAAA;AAC9B,IAAA,WAAG,EAAA,QAAA,CAAA,WAAA;IAEJ,IAAA,EAAA,QAAA,CAAA,IAAA;IACA,QAAO,EAAA;AACX,GAAC,CAAA,CAAA;AAED;;;;;;;;;;;;;;;;;AAiBG;AACH;AAII;AAEA;SACI,6BAAiC,CAAA,QAAA,EAAA;QACjC,SAAM,GAAA,oBAAa,CAAA,QAAA,CAAA;QACnB,UAAU,GAAA,SAAS,CAAA,SAAQ,CAAA,GAAA,CAAA,QAAA,KAAA;AAC9B,IAAA,WAAG,EAAA,QAAA,CAAA,WAAA;AAEJ,IAAA,IAAA,EAAM,QAAQ,CAAA,IAAI;AAElB,IAAA,QAAO,EAAE,QAAS,CAAA;AACtB,GAAC,CAAA,CAAA;;;;;;"}
@@ -2,4 +2,4 @@
2
2
  * Configuration utilities index
3
3
  * Exports all utility functions for working with configuration data
4
4
  */
5
- export { ConfigurationOverride, ExtractedConfiguration, extractConfiguration, isBracketKey, extractIdentifiersFromKey, getOverrideKeys, getBaseKeys, removeOverrideKeys, hasOverrides, getOverrideByIdentifier, } from './configurationExtractor';
5
+ export { ConfigurationOverride, ExtractedConfiguration, extractConfiguration, isBracketKey, extractIdentifiersFromKey, getOverrideKeys, getBaseKeys, removeOverrideKeys, hasOverrides, getOverrideByIdentifier, createConfigurationModel, extractConfigurationWithModel, } from './configurationExtractor';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Usage Examples: ConfigurationModel Creation Functions
3
+ *
4
+ * Demonstrates how to use createConfigurationModel() and extractConfigurationWithModel()
5
+ * to work with ConfigurationModel from raw settings data.
6
+ */
7
+ /**
8
+ * The simplest way to create a ConfigurationModel from settings.
9
+ * Use this when you just need a model and don't care about raw extraction data.
10
+ */
11
+ declare function example1_quickModelCreation(): void;
12
+ /**
13
+ * Convert server configuration response to ConfigurationModel
14
+ * for client-side configuration management.
15
+ */
16
+ declare function example2_serverResponseProcessing(): Promise<void>;
17
+ /**
18
+ * Use extractConfigurationWithModel when you need both:
19
+ * - Raw extraction data (for inspection, logging, debugging)
20
+ * - ConfigurationModel (for application logic)
21
+ */
22
+ declare function example3_dualPurpose(): void;
23
+ /**
24
+ * Validate configuration structure and apply business logic.
25
+ */
26
+ declare function example4_configurationValidation(): void;
27
+ /**
28
+ * Merge multiple configuration sources using ConfigurationModel.
29
+ */
30
+ declare function example5_configurationMerging(): void;
31
+ /**
32
+ * Handle dynamic route-based configuration in a web application.
33
+ */
34
+ declare function example6_dynamicRouteConfiguration(): void;
35
+ declare function example7_typeSafeConfiguration(): void;
36
+ export { example1_quickModelCreation, example2_serverResponseProcessing, example3_dualPurpose, example4_configurationValidation, example5_configurationMerging, example6_dynamicRouteConfiguration, example7_typeSafeConfiguration, };
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export{NATS_HEMERA_ADMINIDE_WORKSPACE,NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER}from'./constants/constants.js';export{DEFAULT_CPU,DEFAULT_HDD,DEFAULT_RAM}from'./constants/default-workspace-config.js';export{DEFAULT_CONTRIBUTION_TENANT_ID,DEFAULT_TENANT_ID,GLOBAL_CONFIGURATION_FILE,OVERRIDE_IDENTIFIER_PATTERN,OVERRIDE_PATTERN_WITH_SUBSTITUTION,OVERRIDE_PROPERTY,OVERRIDE_PROPERTY_PATTERN,SETTINGS_OVERRRIDE_NODE_ID,USER_CONFIGURATION_FILE}from'./constants/configuration.js';export{ASANA_WEBHOOK_ENDPOINT,ORG_BASE_PATH,ORG_STD_ROUTES}from'./constants/urls.js';export{IntegrationConfigurationRoute,hasOrganizationContext}from'./constants/routes.js';export{BillingPlan}from'./constants/billing-plan.js';export{DEFAULT_APP_ID,DEFAULT_APP_TENANT_ID}from'./constants/defaultIds.js';export{LOCAL_MACHINE_SCOPES,ORGANIZATION_SCOPES,REMOTE_MACHINE_SCOPES,RESOURCE_SCOPES,USER_SCOPES}from'./interfaces/configuration/configuration.js';export{ApplicationState,IOrganizationContext,IOrganizationResource}from'./interfaces/organization/organization-context.js';export{Extensions}from'@workbench-stack/core/lib/constants/extensions.js';export{LifecyclePhase,ShutdownReason,StartupKind}from'@workbench-stack/core/lib/interfaces/lifecycle/lifecycle.js';export{PermissionBehavior}from'./interfaces/permissions.js';export*from'common/lib/generated/generated-models.js';export{getFilteredRoutes,getFilteredTabs,getTtl}from'./utils/utils.js';export{configureForCurrentBranch,configureForUpcomingBranch,convertToResourceUri,createDirectResourceUri,createStandardResourceUri,generateHashId,normalizeResourceUri,resourcePath,setupResourceUriConfiguration,strictConvertToResourceUri}from'./utils/resourceUriConversion.js';export{generateApplicationUri,generateMachineUri,generateOrgUri,generateOrgUriById,generateProxyUserUri,generateResourceUri,generateUri,generateUserUri}from'./utils/generate-uri.js';export{RESERVED_CDECODE_PARAMS,determineConfigurationTarget,generateCdecodeUri,isReservedCdecodeParam,parseCdecodeUri,validateUserQueryParams}from'./utils/cdecodeUri.js';export{generateApplicationRoleResource,generateRegisteredRoleURI}from'./utils/roles-utils.js';export{getScopes}from'./utils/configuration-utils.js';export{omitDeep}from'./utils/omit-deep.js';export{generateSettingsId}from'./utils/generated-settings-id.js';export{validateEmail}from'./utils/validations.js';export{toMilliSeconds}from'./utils/date-utils.js';export{expand,flatten,flattenObject}from'./utils/flatten-utils.js';export{generateUserAlias}from'./utils/generateUserAlias.js';export{getUserAlias}from'./utils/getUserAlias.js';export{getLogger}from'./utils/getLogger.js';export{getDefaultSettingsURI,getEditableSettingsURI,getOpenSettings,parseExtensionFromDefaultSettingsUri}from'./utils/preferenceUri.js';export{reviveUri}from'./utils/reviveUri.js';export{buildExtensionNodeContext,buildExtensionSettingsNodeContext,buildNodeContext,buildPermissionNodeContext,buildPolicyNodeContext,buildRoleNodeContext,buildUiLayoutNodeContext,isSystemContribution}from'./utils/nodeContext.js';export{splitCdecodeUri,splitOrgUri}from'./utils/splitCdecodeUri.js';export{generatePath}from'./utils/generatePath.js';export{Disposable,DisposableCollection}from'./core/disposable.js';export{BaseDisposable}from'./core/BaseDisposable.js';export{Emitter,Event,WaitUntilEvent}from'./core/event.js';export{Path}from'./core/path.js';export{OrganizationContext,OrganizationResource,toOrganizationResource,toOrganizationResources,toUri}from'./core/organization/organization.js';export{OrganizationConfiguration}from'./core/organization/configuration.js';export{isOrganizationIdentifier,isRawFileOrganizationResource,isRawUriOrganizationResource,isSingleResourceOrganizationIdentifier,isSingleResourceOrganizationInitializationPayload}from'./core/organization/helpers/organization-helpers.js';export{ConfigurationTargetConfigurationMapper,ConfigurationTargetToString,SettingsTypeToConfiguraitonTarget,addToValueTree,getConfigurationValue,getMigratedSettingValue,isConfigurationOverrides,keyFromOverrideIdentifier,merge,overrideIdentifierFromKey,removeFromValueTree,toValuesTree}from'./core/configurations/helpers/configuration.js';export{ConfigurationModel}from'./core/configurations/models/ConfigurationModel.js';export{EnhancedConfigurationModel}from'./core/configurations/models/ConfigurationModelWrapper.js';export{Configuration,OVERRIDE_PROPERTY_REGEX,compare,overrideIdentifiersFromKey}from'./core/configurations/configuration.js';export{ConfigurationChangeEvent}from'./core/configurations/events/ConfigurationChangeEvent.js';export{parseConfiguration}from'./core/configurations/parser/configurationParser.js';export{CdeCodeProvider}from'./core/in-memory-providers/cde-code-provider.js';export{AuthError}from'./errors/auth-error.js';export{AbstractOrganizationContextService}from'./services/abstract-organization-context-service.js';export{AbstractOrganizationConfigurationClientService}from'./services/abstract-configuration.js';export{PreDefineAccountPermissions}from'./modules/account-api/enums/index.js';export{BillingModules,PreDefineBillingPermissions}from'./modules/billing-api/enums/index.js';export{URI,uriToFsPath}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';export{ConfigurationScope}from'common';//# sourceMappingURL=index.js.map
1
+ export{NATS_HEMERA_ADMINIDE_WORKSPACE,NATS_HEMERA_ADMINIDE_WORKSPACE_UPDATER}from'./constants/constants.js';export{DEFAULT_CPU,DEFAULT_HDD,DEFAULT_RAM}from'./constants/default-workspace-config.js';export{DEFAULT_CONTRIBUTION_TENANT_ID,DEFAULT_TENANT_ID,GLOBAL_CONFIGURATION_FILE,OVERRIDE_IDENTIFIER_PATTERN,OVERRIDE_PATTERN_WITH_SUBSTITUTION,OVERRIDE_PROPERTY,OVERRIDE_PROPERTY_PATTERN,SETTINGS_OVERRRIDE_NODE_ID,USER_CONFIGURATION_FILE}from'./constants/configuration.js';export{ASANA_WEBHOOK_ENDPOINT,ORG_BASE_PATH,ORG_STD_ROUTES}from'./constants/urls.js';export{IntegrationConfigurationRoute,hasOrganizationContext}from'./constants/routes.js';export{BillingPlan}from'./constants/billing-plan.js';export{DEFAULT_APP_ID,DEFAULT_APP_TENANT_ID}from'./constants/defaultIds.js';export{LOCAL_MACHINE_SCOPES,ORGANIZATION_SCOPES,REMOTE_MACHINE_SCOPES,RESOURCE_SCOPES,USER_SCOPES}from'./interfaces/configuration/configuration.js';export{ApplicationState,IOrganizationContext,IOrganizationResource}from'./interfaces/organization/organization-context.js';export{Extensions}from'@workbench-stack/core/lib/constants/extensions.js';export{LifecyclePhase,ShutdownReason,StartupKind}from'@workbench-stack/core/lib/interfaces/lifecycle/lifecycle.js';export{PermissionBehavior}from'./interfaces/permissions.js';export*from'common/lib/generated/generated-models.js';export{getFilteredRoutes,getFilteredTabs,getTtl}from'./utils/utils.js';export{configureForCurrentBranch,configureForUpcomingBranch,convertToResourceUri,createDirectResourceUri,createStandardResourceUri,generateHashId,normalizeResourceUri,resourcePath,setupResourceUriConfiguration,strictConvertToResourceUri}from'./utils/resourceUriConversion.js';export{generateApplicationUri,generateMachineUri,generateOrgUri,generateOrgUriById,generateProxyUserUri,generateResourceUri,generateUri,generateUserUri}from'./utils/generate-uri.js';export{RESERVED_CDECODE_PARAMS,determineConfigurationTarget,generateCdecodeUri,isReservedCdecodeParam,parseCdecodeUri,validateUserQueryParams}from'./utils/cdecodeUri.js';export{generateApplicationRoleResource,generateRegisteredRoleURI}from'./utils/roles-utils.js';export{getScopes}from'./utils/configuration-utils.js';export{omitDeep}from'./utils/omit-deep.js';export{generateSettingsId}from'./utils/generated-settings-id.js';export{validateEmail}from'./utils/validations.js';export{toMilliSeconds}from'./utils/date-utils.js';export{expand,flatten,flattenObject}from'./utils/flatten-utils.js';export{generateUserAlias}from'./utils/generateUserAlias.js';export{getUserAlias}from'./utils/getUserAlias.js';export{getLogger}from'./utils/getLogger.js';export{getDefaultSettingsURI,getEditableSettingsURI,getOpenSettings,parseExtensionFromDefaultSettingsUri}from'./utils/preferenceUri.js';export{reviveUri}from'./utils/reviveUri.js';export{buildExtensionNodeContext,buildExtensionSettingsNodeContext,buildNodeContext,buildPermissionNodeContext,buildPolicyNodeContext,buildRoleNodeContext,buildUiLayoutNodeContext,isSystemContribution}from'./utils/nodeContext.js';export{splitCdecodeUri,splitOrgUri}from'./utils/splitCdecodeUri.js';export{generatePath}from'./utils/generatePath.js';export{Disposable,DisposableCollection}from'./core/disposable.js';export{BaseDisposable}from'./core/BaseDisposable.js';export{Emitter,Event,WaitUntilEvent}from'./core/event.js';export{Path}from'./core/path.js';export{OrganizationContext,OrganizationResource,toOrganizationResource,toOrganizationResources,toUri}from'./core/organization/organization.js';export{OrganizationConfiguration}from'./core/organization/configuration.js';export{isOrganizationIdentifier,isRawFileOrganizationResource,isRawUriOrganizationResource,isSingleResourceOrganizationIdentifier,isSingleResourceOrganizationInitializationPayload}from'./core/organization/helpers/organization-helpers.js';export{ConfigurationTargetConfigurationMapper,ConfigurationTargetToString,SettingsTypeToConfiguraitonTarget,addToValueTree,getConfigurationValue,getMigratedSettingValue,isConfigurationOverrides,keyFromOverrideIdentifier,merge,overrideIdentifierFromKey,removeFromValueTree,toValuesTree}from'./core/configurations/helpers/configuration.js';export{ConfigurationModel}from'./core/configurations/models/ConfigurationModel.js';export{EnhancedConfigurationModel}from'./core/configurations/models/ConfigurationModelWrapper.js';export{Configuration,OVERRIDE_PROPERTY_REGEX,compare,overrideIdentifiersFromKey}from'./core/configurations/configuration.js';export{ConfigurationChangeEvent}from'./core/configurations/events/ConfigurationChangeEvent.js';export{parseConfiguration}from'./core/configurations/parser/configurationParser.js';export{createConfigurationModel,extractConfiguration,extractConfigurationWithModel,extractIdentifiersFromKey,getBaseKeys,getOverrideByIdentifier,getOverrideKeys,hasOverrides,isBracketKey,removeOverrideKeys}from'./core/configurations/utils/configurationExtractor.js';export{CdeCodeProvider}from'./core/in-memory-providers/cde-code-provider.js';export{AuthError}from'./errors/auth-error.js';export{AbstractOrganizationContextService}from'./services/abstract-organization-context-service.js';export{AbstractOrganizationConfigurationClientService}from'./services/abstract-configuration.js';export{PreDefineAccountPermissions}from'./modules/account-api/enums/index.js';export{BillingModules,PreDefineBillingPermissions}from'./modules/billing-api/enums/index.js';export{URI,uriToFsPath}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';export{ConfigurationScope}from'common';//# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminide-stack/core",
3
- "version": "12.0.4-alpha.323",
3
+ "version": "12.0.4-alpha.326",
4
4
  "description": "AdminIDE core for higher packages to depend on",
5
5
  "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
@@ -42,5 +42,5 @@
42
42
  "typescript": {
43
43
  "definition": "lib/index.d.ts"
44
44
  },
45
- "gitHead": "c3c92d99e2df79121726c9c201b31226d17ca19d"
45
+ "gitHead": "abccad1ef8d93a1f579545447252c4b08bf16aa7"
46
46
  }