@fgv/ts-res 5.1.0-0 → 5.1.0-2

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.
Files changed (49) hide show
  1. package/package.json +24 -24
  2. package/dist/packlets/config/common.js +0 -78
  3. package/dist/packlets/config/configInitFactory.js +0 -258
  4. package/dist/packlets/config/convert.js +0 -56
  5. package/dist/packlets/config/index.browser.js +0 -34
  6. package/dist/packlets/config/index.js +0 -28
  7. package/dist/packlets/config/json.js +0 -23
  8. package/dist/packlets/config/predefined/default.js +0 -138
  9. package/dist/packlets/config/predefined/extended.js +0 -190
  10. package/dist/packlets/config/predefined/index.js +0 -25
  11. package/dist/packlets/config/systemConfiguration.js +0 -147
  12. package/dist/packlets/qualifier-types/config/convert.js +0 -124
  13. package/dist/packlets/qualifier-types/config/index.js +0 -25
  14. package/dist/packlets/qualifier-types/config/json.js +0 -32
  15. package/dist/packlets/resource-types/config/convert.js +0 -35
  16. package/dist/packlets/resource-types/config/index.js +0 -25
  17. package/dist/packlets/resource-types/config/json.js +0 -23
  18. package/lib/packlets/config/common.d.ts +0 -35
  19. package/lib/packlets/config/common.js +0 -97
  20. package/lib/packlets/config/configInitFactory.d.ts +0 -217
  21. package/lib/packlets/config/configInitFactory.js +0 -303
  22. package/lib/packlets/config/convert.d.ts +0 -23
  23. package/lib/packlets/config/convert.js +0 -93
  24. package/lib/packlets/config/index.browser.d.ts +0 -7
  25. package/lib/packlets/config/index.browser.js +0 -74
  26. package/lib/packlets/config/index.d.ts +0 -7
  27. package/lib/packlets/config/index.js +0 -68
  28. package/lib/packlets/config/json.d.ts +0 -20
  29. package/lib/packlets/config/json.js +0 -24
  30. package/lib/packlets/config/predefined/default.d.ts +0 -57
  31. package/lib/packlets/config/predefined/default.js +0 -141
  32. package/lib/packlets/config/predefined/extended.d.ts +0 -25
  33. package/lib/packlets/config/predefined/extended.js +0 -193
  34. package/lib/packlets/config/predefined/index.d.ts +0 -4
  35. package/lib/packlets/config/predefined/index.js +0 -62
  36. package/lib/packlets/config/systemConfiguration.d.ts +0 -94
  37. package/lib/packlets/config/systemConfiguration.js +0 -152
  38. package/lib/packlets/qualifier-types/config/convert.d.ts +0 -65
  39. package/lib/packlets/qualifier-types/config/convert.js +0 -161
  40. package/lib/packlets/qualifier-types/config/index.d.ts +0 -4
  41. package/lib/packlets/qualifier-types/config/index.js +0 -64
  42. package/lib/packlets/qualifier-types/config/json.d.ts +0 -91
  43. package/lib/packlets/qualifier-types/config/json.js +0 -35
  44. package/lib/packlets/resource-types/config/convert.d.ts +0 -8
  45. package/lib/packlets/resource-types/config/convert.js +0 -38
  46. package/lib/packlets/resource-types/config/index.d.ts +0 -4
  47. package/lib/packlets/resource-types/config/index.js +0 -64
  48. package/lib/packlets/resource-types/config/json.d.ts +0 -11
  49. package/lib/packlets/resource-types/config/json.js +0 -24
@@ -1,57 +0,0 @@
1
- import { ISystemConfiguration } from '../json';
2
- import * as QualifierTypes from '../../qualifier-types';
3
- import * as Qualifiers from '../../qualifiers';
4
- import * as ResourceTypes from '../../resource-types';
5
- /**
6
- * Default qualifier types.
7
- * @remarks
8
- * The default qualifier types are:
9
- * - language: recognizes BCP 47 language tags, accepts a comma-separated list of language tags in the context
10
- * - territory: recognizes ISO 3166-1 alpha-2 territory codes, accepts a single code in the context
11
- * @public
12
- */
13
- export declare const DefaultQualifierTypes: ReadonlyArray<QualifierTypes.Config.ISystemQualifierTypeConfig>;
14
- /**
15
- * Qualifier definitions in which territory is the primary qualifier, with
16
- * language as a secondary qualifier.
17
- * @remarks
18
- * The default qualifiers are:
19
- * - currentTerritory(token: geo): territory qualifier, priority 850
20
- * - language(token: lang): language qualifier, priority 800
21
- * @public
22
- */
23
- export declare const TerritoryPriorityQualifiers: ReadonlyArray<Qualifiers.IQualifierDecl>;
24
- /**
25
- * Qualifier definitions in which language is the primary qualifier, with
26
- * territory as a secondary qualifier.
27
- * @remarks
28
- * The default qualifiers are:
29
- * - language(token: lang): language qualifier, priority 850
30
- * - currentTerritory(token: geo): territory qualifier, priority 800
31
- * @public
32
- */
33
- export declare const LanguagePriorityQualifiers: ReadonlyArray<Qualifiers.IQualifierDecl>;
34
- /**
35
- * Default resource types.
36
- * @public
37
- */
38
- export declare const DefaultResourceTypes: ReadonlyArray<ResourceTypes.Config.IResourceTypeConfig>;
39
- /**
40
- * System configuration with territory as the primary qualifier, and
41
- * language as a secondary qualifier.
42
- * @public
43
- */
44
- export declare const TerritoryPrioritySystemConfiguration: ISystemConfiguration;
45
- /**
46
- * System configuration with language as the primary qualifier, and
47
- * territory as a secondary qualifier.
48
- * @public
49
- */
50
- export declare const LanguagePrioritySystemConfiguration: ISystemConfiguration;
51
- /**
52
- * The default system configuration gives priority to territory as the primary qualifier,
53
- * with language as a secondary qualifier.
54
- * @public
55
- */
56
- export declare const DefaultSystemConfiguration: ISystemConfiguration;
57
- //# sourceMappingURL=default.d.ts.map
@@ -1,141 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2025 Erik Fortune
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in all
13
- * copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.DefaultSystemConfiguration = exports.LanguagePrioritySystemConfiguration = exports.TerritoryPrioritySystemConfiguration = exports.DefaultResourceTypes = exports.LanguagePriorityQualifiers = exports.TerritoryPriorityQualifiers = exports.DefaultQualifierTypes = void 0;
25
- /**
26
- * Default qualifier types.
27
- * @remarks
28
- * The default qualifier types are:
29
- * - language: recognizes BCP 47 language tags, accepts a comma-separated list of language tags in the context
30
- * - territory: recognizes ISO 3166-1 alpha-2 territory codes, accepts a single code in the context
31
- * @public
32
- */
33
- exports.DefaultQualifierTypes = [
34
- {
35
- name: 'language',
36
- systemType: 'language',
37
- configuration: {
38
- allowContextList: true
39
- }
40
- },
41
- {
42
- name: 'territory',
43
- systemType: 'territory',
44
- configuration: {
45
- allowContextList: false
46
- }
47
- }
48
- ];
49
- /**
50
- * Qualifier definitions in which territory is the primary qualifier, with
51
- * language as a secondary qualifier.
52
- * @remarks
53
- * The default qualifiers are:
54
- * - currentTerritory(token: geo): territory qualifier, priority 850
55
- * - language(token: lang): language qualifier, priority 800
56
- * @public
57
- */
58
- exports.TerritoryPriorityQualifiers = [
59
- {
60
- name: 'currentTerritory',
61
- token: 'geo',
62
- typeName: 'territory',
63
- defaultPriority: 850
64
- },
65
- {
66
- name: 'language',
67
- token: 'lang',
68
- typeName: 'language',
69
- defaultPriority: 800
70
- }
71
- ];
72
- /**
73
- * Qualifier definitions in which language is the primary qualifier, with
74
- * territory as a secondary qualifier.
75
- * @remarks
76
- * The default qualifiers are:
77
- * - language(token: lang): language qualifier, priority 850
78
- * - currentTerritory(token: geo): territory qualifier, priority 800
79
- * @public
80
- */
81
- exports.LanguagePriorityQualifiers = [
82
- {
83
- name: 'language',
84
- token: 'lang',
85
- typeName: 'language',
86
- defaultPriority: 850
87
- },
88
- {
89
- name: 'currentTerritory',
90
- token: 'geo',
91
- typeName: 'territory',
92
- defaultPriority: 800
93
- }
94
- ];
95
- /**
96
- * Default resource types.
97
- * @public
98
- */
99
- exports.DefaultResourceTypes = [
100
- {
101
- name: 'json',
102
- typeName: 'json'
103
- }
104
- ];
105
- /**
106
- * System configuration with territory as the primary qualifier, and
107
- * language as a secondary qualifier.
108
- * @public
109
- */
110
- exports.TerritoryPrioritySystemConfiguration = {
111
- name: 'territory-priority',
112
- description: 'Territory priority system configuration',
113
- qualifierTypes: [...exports.DefaultQualifierTypes],
114
- qualifiers: [...exports.TerritoryPriorityQualifiers],
115
- resourceTypes: [...exports.DefaultResourceTypes]
116
- };
117
- /**
118
- * System configuration with language as the primary qualifier, and
119
- * territory as a secondary qualifier.
120
- * @public
121
- */
122
- exports.LanguagePrioritySystemConfiguration = {
123
- name: 'language-priority',
124
- description: 'Language priority system configuration',
125
- qualifierTypes: [...exports.DefaultQualifierTypes],
126
- qualifiers: [...exports.LanguagePriorityQualifiers],
127
- resourceTypes: [...exports.DefaultResourceTypes]
128
- };
129
- /**
130
- * The default system configuration gives priority to territory as the primary qualifier,
131
- * with language as a secondary qualifier.
132
- * @public
133
- */
134
- exports.DefaultSystemConfiguration = {
135
- name: 'default',
136
- description: 'Default system configuration',
137
- qualifierTypes: [...exports.DefaultQualifierTypes],
138
- qualifiers: [...exports.TerritoryPriorityQualifiers],
139
- resourceTypes: [...exports.DefaultResourceTypes]
140
- };
141
- //# sourceMappingURL=default.js.map
@@ -1,25 +0,0 @@
1
- import * as ResourceTypes from '../../resource-types';
2
- import * as QualifierTypes from '../../qualifier-types';
3
- import * as Qualifiers from '../../qualifiers';
4
- import { ISystemConfiguration } from '../json';
5
- /**
6
- * Example extended qualifier types.
7
- * @public
8
- */
9
- export declare const ExtendedQualifierTypes: ReadonlyArray<QualifierTypes.Config.ISystemQualifierTypeConfig>;
10
- /**
11
- * Example extended qualifiers.
12
- * @public
13
- */
14
- export declare const ExtendedQualifiers: ReadonlyArray<Qualifiers.IQualifierDecl>;
15
- /**
16
- * Example resource types.
17
- * @public
18
- */
19
- export declare const ExtendedResourceTypes: ReadonlyArray<ResourceTypes.Config.IResourceTypeConfig>;
20
- /**
21
- * An example system configuration demonstrating various configuration options.
22
- * @public
23
- */
24
- export declare const ExtendedSystemConfiguration: ISystemConfiguration;
25
- //# sourceMappingURL=extended.d.ts.map
@@ -1,193 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2025 Erik Fortune
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in all
13
- * copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ExtendedSystemConfiguration = exports.ExtendedResourceTypes = exports.ExtendedQualifiers = exports.ExtendedQualifierTypes = void 0;
25
- /**
26
- * Example extended qualifier types.
27
- * @public
28
- */
29
- exports.ExtendedQualifierTypes = [
30
- {
31
- name: 'language',
32
- systemType: 'language',
33
- configuration: {
34
- allowContextList: true
35
- }
36
- },
37
- {
38
- name: 'territory',
39
- systemType: 'territory',
40
- configuration: {
41
- allowContextList: false,
42
- acceptLowercase: false
43
- }
44
- },
45
- {
46
- name: 'role',
47
- systemType: 'literal',
48
- configuration: {
49
- enumeratedValues: ['admin', 'agent', 'user', 'guest']
50
- }
51
- },
52
- {
53
- name: 'environment',
54
- systemType: 'literal',
55
- configuration: {
56
- enumeratedValues: ['production', 'integration', 'development', 'test', 'ephemeral']
57
- }
58
- },
59
- {
60
- name: 'currency',
61
- systemType: 'literal',
62
- configuration: {
63
- caseSensitive: true,
64
- enumeratedValues: ['USD', 'EUR', 'GBP', 'JPY', 'CNY']
65
- }
66
- },
67
- {
68
- name: 'market',
69
- systemType: 'literal',
70
- configuration: {
71
- enumeratedValues: [
72
- 'world',
73
- 'americas',
74
- 'europe',
75
- 'asia',
76
- 'oceania',
77
- 'africa',
78
- 'middle-east',
79
- 'latin-america',
80
- 'caribbean',
81
- 'central-america',
82
- 'south-america',
83
- 'north-america',
84
- 'nordics',
85
- 'baltic',
86
- 'balkans',
87
- 'eastern-europe',
88
- 'western-europe',
89
- 'central-europe',
90
- 'eastern-africa',
91
- 'western-africa',
92
- 'central-africa',
93
- 'north-africa',
94
- 'south-africa',
95
- 'middle-africa',
96
- 'southeast-asia'
97
- ],
98
- hierarchy: {
99
- americas: 'world',
100
- europe: 'world',
101
- asia: 'world',
102
- oceania: 'world',
103
- africa: 'world',
104
- 'middle-east': 'world',
105
- 'latin-america': 'americas',
106
- caribbean: 'americas',
107
- 'central-america': 'americas',
108
- 'south-america': 'americas',
109
- 'north-america': 'americas',
110
- nordics: 'europe',
111
- baltic: 'europe',
112
- balkans: 'europe',
113
- 'eastern-europe': 'europe',
114
- 'western-europe': 'europe',
115
- 'central-europe': 'europe',
116
- 'eastern-africa': 'africa',
117
- 'western-africa': 'africa',
118
- 'central-africa': 'africa',
119
- 'north-africa': 'africa',
120
- 'south-africa': 'africa',
121
- 'middle-africa': 'africa',
122
- 'southeast-asia': 'asia'
123
- }
124
- }
125
- }
126
- ];
127
- /**
128
- * Example extended qualifiers.
129
- * @public
130
- */
131
- exports.ExtendedQualifiers = [
132
- {
133
- name: 'homeTerritory',
134
- token: 'home',
135
- typeName: 'territory',
136
- defaultPriority: 900
137
- },
138
- {
139
- name: 'currentTerritory',
140
- token: 'geo',
141
- typeName: 'territory',
142
- defaultPriority: 850
143
- },
144
- {
145
- name: 'language',
146
- token: 'lang',
147
- typeName: 'language',
148
- defaultPriority: 800
149
- },
150
- {
151
- name: 'market',
152
- typeName: 'market',
153
- defaultPriority: 750
154
- },
155
- {
156
- name: 'role',
157
- typeName: 'role',
158
- defaultPriority: 700
159
- },
160
- {
161
- name: 'environment',
162
- token: 'env',
163
- typeName: 'environment',
164
- defaultPriority: 650
165
- },
166
- {
167
- name: 'currency',
168
- typeName: 'currency',
169
- defaultPriority: 600
170
- }
171
- ];
172
- /**
173
- * Example resource types.
174
- * @public
175
- */
176
- exports.ExtendedResourceTypes = [
177
- {
178
- name: 'json',
179
- typeName: 'json'
180
- }
181
- ];
182
- /**
183
- * An example system configuration demonstrating various configuration options.
184
- * @public
185
- */
186
- exports.ExtendedSystemConfiguration = {
187
- name: 'extended-example',
188
- description: 'An example system configuration demonstrating various configuration options',
189
- qualifierTypes: [...exports.ExtendedQualifierTypes],
190
- qualifiers: [...exports.ExtendedQualifiers],
191
- resourceTypes: [...exports.ExtendedResourceTypes]
192
- };
193
- //# sourceMappingURL=extended.js.map
@@ -1,4 +0,0 @@
1
- import * as Default from './default';
2
- import * as Example from './extended';
3
- export { Default, Example };
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,62 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2025 Erik Fortune
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in all
13
- * copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- * SOFTWARE.
22
- */
23
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
24
- if (k2 === undefined) k2 = k;
25
- var desc = Object.getOwnPropertyDescriptor(m, k);
26
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
27
- desc = { enumerable: true, get: function() { return m[k]; } };
28
- }
29
- Object.defineProperty(o, k2, desc);
30
- }) : (function(o, m, k, k2) {
31
- if (k2 === undefined) k2 = k;
32
- o[k2] = m[k];
33
- }));
34
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
35
- Object.defineProperty(o, "default", { enumerable: true, value: v });
36
- }) : function(o, v) {
37
- o["default"] = v;
38
- });
39
- var __importStar = (this && this.__importStar) || (function () {
40
- var ownKeys = function(o) {
41
- ownKeys = Object.getOwnPropertyNames || function (o) {
42
- var ar = [];
43
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
44
- return ar;
45
- };
46
- return ownKeys(o);
47
- };
48
- return function (mod) {
49
- if (mod && mod.__esModule) return mod;
50
- var result = {};
51
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
52
- __setModuleDefault(result, mod);
53
- return result;
54
- };
55
- })();
56
- Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.Example = exports.Default = void 0;
58
- const Default = __importStar(require("./default"));
59
- exports.Default = Default;
60
- const Example = __importStar(require("./extended"));
61
- exports.Example = Example;
62
- //# sourceMappingURL=index.js.map
@@ -1,94 +0,0 @@
1
- import { Result } from '@fgv/ts-utils';
2
- import * as QualifierTypes from '../qualifier-types';
3
- import * as ResourceTypes from '../resource-types';
4
- import { QualifierType, ReadOnlyQualifierTypeCollector } from '../qualifier-types';
5
- import { IReadOnlyQualifierCollector } from '../qualifiers';
6
- import { ReadOnlyResourceTypeCollector, ResourceType } from '../resource-types';
7
- import { ISystemConfiguration } from './json';
8
- import { IConfigInitFactory } from './configInitFactory';
9
- /**
10
- * Parameters used to initialize a {@link Config.SystemConfiguration | SystemConfiguration}.
11
- * @public
12
- */
13
- export interface ISystemConfigurationInitParams {
14
- /**
15
- * Optional map of qualifier names to default values. If provided, qualifiers
16
- * in the system configuration will be updated with these default values.
17
- * Use `null` as the value to remove an existing default value.
18
- */
19
- qualifierDefaultValues?: Record<string, string | null>;
20
- qualifierTypeFactory?: IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierType>;
21
- resourceTypeFactory?: IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceType>;
22
- }
23
- /**
24
- * Creates a copy of the provided {@link Config.Model.ISystemConfiguration | system configuration}
25
- * with updated qualifier default values.
26
- * @param config - The base {@link Config.Model.ISystemConfiguration | system configuration} to copy.
27
- * @param qualifierDefaultValues - Map of qualifier names to default values. Use `null` to remove existing values.
28
- * @returns `Success` with the updated {@link Config.Model.ISystemConfiguration | system configuration}
29
- * if successful, `Failure` with an error message otherwise.
30
- * @public
31
- */
32
- export declare function updateSystemConfigurationQualifierDefaultValues(config: ISystemConfiguration, qualifierDefaultValues: Record<string, string | null>): Result<ISystemConfiguration>;
33
- /**
34
- * A system configuration for both runtime or build.
35
- * @public
36
- */
37
- export declare class SystemConfiguration {
38
- /**
39
- * The name of this system configuration.
40
- */
41
- get name(): string | undefined;
42
- /**
43
- * The description of this system configuration.
44
- */
45
- get description(): string | undefined;
46
- /**
47
- * The {@link QualifierTypes.QualifierTypeCollector | qualifier types} that this system configuration uses.
48
- */
49
- readonly qualifierTypes: ReadOnlyQualifierTypeCollector;
50
- /**
51
- * The {@link QualifierTypes.QualifierTypeCollector | qualifier types} that this system configuration uses.
52
- * @public
53
- */
54
- readonly qualifiers: IReadOnlyQualifierCollector;
55
- /**
56
- * The {@link ResourceTypes.ResourceTypeCollector | resource types} that this system configuration uses.
57
- */
58
- readonly resourceTypes: ReadOnlyResourceTypeCollector;
59
- private readonly _config;
60
- /**
61
- * Constructs a new instance of a {@link Config.SystemConfiguration | SystemConfiguration} from the
62
- * supplied {@link Config.Model.ISystemConfiguration | system configuration}.
63
- * @param config - The {@link Config.Model.ISystemConfiguration | system configuration} to use.
64
- * @public
65
- */
66
- protected constructor(config: ISystemConfiguration, initParams?: ISystemConfigurationInitParams);
67
- /**
68
- * Creates a new {@link Config.SystemConfiguration | SystemConfiguration} from the supplied
69
- * {@link Config.Model.ISystemConfiguration | system configuration}.
70
- * @param config - The {@link Config.Model.ISystemConfiguration | system configuration} to use.
71
- * @param initParams - Optional {@link Config.ISystemConfigurationInitParams | initialization parameters}.
72
- * @returns `Success` with the new {@link Config.SystemConfiguration | SystemConfiguration}
73
- * if successful, `Failure` with an error message otherwise.
74
- * @public
75
- */
76
- static create(config: ISystemConfiguration, initParams?: ISystemConfigurationInitParams): Result<SystemConfiguration>;
77
- /**
78
- * Loads a {@link Config.SystemConfiguration | SystemConfiguration} from a file.
79
- * @param path - The path to the file to load.
80
- * @returns `Success` with the {@link Config.SystemConfiguration | SystemConfiguration}
81
- * if successful, `Failure` with an error message otherwise.
82
- * @public
83
- */
84
- static loadFromFile(path: string, initParams?: ISystemConfigurationInitParams): Result<SystemConfiguration>;
85
- /**
86
- * Returns the {@link Config.Model.ISystemConfiguration | system configuration} that this
87
- * {@link Config.SystemConfiguration | SystemConfiguration} was created from.
88
- * @returns `Success` with the {@link Config.Model.ISystemConfiguration | system configuration}
89
- * if successful, `Failure` with an error message otherwise.
90
- * @public
91
- */
92
- getConfig(): Result<ISystemConfiguration>;
93
- }
94
- //# sourceMappingURL=systemConfiguration.d.ts.map