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

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,303 +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.ValidatingResourceTypeFactory = exports.ResourceTypeFactory = exports.BuiltInResourceTypeFactory = exports.ValidatingQualifierTypeFactory = exports.QualifierTypeFactory = exports.BuiltInQualifierTypeFactory = exports.ChainedConfigInitFactory = void 0;
58
- exports.createQualifierTypeFactory = createQualifierTypeFactory;
59
- exports.createResourceTypeFactory = createResourceTypeFactory;
60
- const ts_utils_1 = require("@fgv/ts-utils");
61
- const QualifierTypes = __importStar(require("../qualifier-types"));
62
- const ResourceTypes = __importStar(require("../resource-types"));
63
- /**
64
- * Creates a {@link Config.IConfigInitFactory | IConfigInitFactory} from a factory function.
65
- * @param fn - The factory function to wrap.
66
- * @returns An `IConfigInitFactory` instance that delegates to the function.
67
- * @public
68
- */
69
- function createQualifierTypeFactory(fn) {
70
- return {
71
- create: fn
72
- };
73
- }
74
- /**
75
- * Creates a {@link Config.IConfigInitFactory | IConfigInitFactory} from a resource type factory function.
76
- * @param fn - The factory function to wrap.
77
- * @returns An `IConfigInitFactory` instance that delegates to the function.
78
- * @public
79
- */
80
- function createResourceTypeFactory(fn) {
81
- return {
82
- create: fn
83
- };
84
- }
85
- /**
86
- * A factory that chains multiple factories together.
87
- * @public
88
- */
89
- class ChainedConfigInitFactory {
90
- /**
91
- * Constructor for a chained config init factory.
92
- * @param factories - The factories to chain.
93
- */
94
- constructor(factories) {
95
- this.factories = factories;
96
- }
97
- /**
98
- * Creates a new instance of a configuration object.
99
- * @param config - The configuration object to create.
100
- * @returns A result containing the new instance of the configuration object.
101
- */
102
- create(config) {
103
- for (const factory of this.factories) {
104
- const result = factory.create(config);
105
- if (result.isSuccess()) {
106
- return result;
107
- }
108
- }
109
- return (0, ts_utils_1.fail)('No factory was able to create the configuration object');
110
- }
111
- }
112
- exports.ChainedConfigInitFactory = ChainedConfigInitFactory;
113
- /**
114
- * A factory that creates a {@link QualifierTypes.SystemQualifierType | SystemQualifierType} from
115
- * {@link QualifierTypes.Config.IAnyQualifierTypeConfig | any qualifier type configuration}.
116
- * @returns `Success` with the new {@link QualifierTypes.SystemQualifierType | SystemQualifierType}
117
- * if successful, `Failure` with an error message otherwise.
118
- * @public
119
- */
120
- class BuiltInQualifierTypeFactory {
121
- /** {@inheritDoc Config.IConfigInitFactory.create} */
122
- create(config) {
123
- if (QualifierTypes.Config.isSystemQualifierTypeConfig(config)) {
124
- return QualifierTypes.createQualifierTypeFromSystemConfig(config);
125
- }
126
- /* c8 ignore next 2 - functional code tested but coverage intermittently missed */
127
- return (0, ts_utils_1.fail)(`${config.name}: unknown built-in qualifier type (${config.systemType})`);
128
- }
129
- }
130
- exports.BuiltInQualifierTypeFactory = BuiltInQualifierTypeFactory;
131
- /**
132
- * A factory that creates {@link QualifierTypes.QualifierType | QualifierType} instances from configuration,
133
- * supporting both built-in system types and custom external types.
134
- *
135
- * This factory allows external consumers to extend the qualifier type system with their own custom types
136
- * while maintaining support for all built-in types (Language, Territory, Literal).
137
- *
138
- * @typeParam T - The custom qualifier type(s) to support. Defaults to {@link QualifierTypes.SystemQualifierType | SystemQualifierType}.
139
- *
140
- * @example Creating a factory with custom qualifier types
141
- * ```typescript
142
- * // Define a custom qualifier type
143
- * class CustomQualifierType extends QualifierType {
144
- * // ... implementation
145
- * }
146
- *
147
- * // Define a discriminated union of all types
148
- * type AppQualifierType = SystemQualifierType | CustomQualifierType;
149
- *
150
- * // Create a factory that handles custom types
151
- * const customFactory: IConfigInitFactory<IAnyQualifierTypeConfig, CustomQualifierType> = {
152
- * create(config) {
153
- * // ... handle custom type creation
154
- * }
155
- * };
156
- *
157
- * // Create the combined factory
158
- * const qualifierTypeFactory = new QualifierTypeFactory<AppQualifierType>([customFactory]);
159
- *
160
- * // The factory returns T | SystemQualifierType, supporting all types
161
- * const result = qualifierTypeFactory.create(config); // Result<AppQualifierType | SystemQualifierType>
162
- * ```
163
- *
164
- * @remarks
165
- * - The factory chains custom factories with the built-in factory
166
- * - Custom factories are tried first, falling back to built-in types
167
- * - The return type is a union of custom types (T) and system types
168
- *
169
- * @public
170
- */
171
- class QualifierTypeFactory extends ChainedConfigInitFactory {
172
- /**
173
- * Constructor for a {@link Config.QualifierTypeFactory | qualifier type factory}.
174
- * @param factories - Array of factories for custom qualifier types. Can be:
175
- * - {@link Config.IConfigInitFactory | IConfigInitFactory} instances
176
- * - {@link Config.QualifierTypeFactoryFunction | Factory functions}
177
- * - A mix of both
178
- * These are tried in order before falling back to built-in types.
179
- * @remarks The {@link Config.BuiltInQualifierTypeFactory | built-in factory} is always appended to handle
180
- * system qualifier types (Language, Territory, Literal).
181
- */
182
- constructor(factories) {
183
- const normalizedFactories = factories.map((f) => typeof f === 'function' ? createQualifierTypeFactory(f) : f);
184
- super([...normalizedFactories, new BuiltInQualifierTypeFactory()]);
185
- }
186
- }
187
- exports.QualifierTypeFactory = QualifierTypeFactory;
188
- /**
189
- * A factory that validates and creates {@link QualifierTypes.QualifierType | QualifierType} instances
190
- * from weakly-typed configuration objects. This factory accepts configurations with unvalidated
191
- * string properties and validates them before delegating to the underlying factory chain.
192
- *
193
- * This pattern is useful at package boundaries where type identity issues may occur with
194
- * branded types across different package instances.
195
- *
196
- * @example
197
- * ```typescript
198
- * // Accept weakly-typed config from external source
199
- * const validatingFactory = new ValidatingQualifierTypeFactory([customFactory]);
200
- *
201
- * // Config can have plain string types instead of branded types
202
- * const config = {
203
- * name: 'my-qualifier', // plain string, not QualifierTypeName
204
- * systemType: 'custom', // plain string
205
- * configuration: { ... }
206
- * };
207
- *
208
- * const result = validatingFactory.create(config); // Validates and converts internally
209
- * ```
210
- *
211
- * @public
212
- */
213
- class ValidatingQualifierTypeFactory {
214
- /**
215
- * Constructor for a validating qualifier type factory.
216
- * @param factories - Array of factories for custom qualifier types. Can be:
217
- * - {@link Config.IConfigInitFactory | IConfigInitFactory} instances
218
- * - {@link Config.QualifierTypeFactoryFunction | Factory functions}
219
- * - A mix of both
220
- */
221
- constructor(factories) {
222
- this._innerFactory = new QualifierTypeFactory(factories);
223
- }
224
- /**
225
- * Creates a qualifier type from a weakly-typed configuration object.
226
- * @param config - The configuration object to validate and use for creation.
227
- * @returns A result containing the new qualifier type if successful.
228
- */
229
- create(config) {
230
- return QualifierTypes.Config.Convert.anyQualifierTypeConfig
231
- .convert(config)
232
- .onSuccess((validatedConfig) => {
233
- return this._innerFactory.create(validatedConfig);
234
- });
235
- }
236
- }
237
- exports.ValidatingQualifierTypeFactory = ValidatingQualifierTypeFactory;
238
- /**
239
- * A factory that creates a {@link ResourceTypes.ResourceType | ResourceType} from a {@link ResourceTypes.Config.IResourceTypeConfig | resource type configuration}.
240
- * @public
241
- */
242
- class BuiltInResourceTypeFactory {
243
- /** {@inheritDoc Config.IConfigInitFactory.create} */
244
- create(config) {
245
- return ResourceTypes.createResourceTypeFromConfig(config);
246
- }
247
- }
248
- exports.BuiltInResourceTypeFactory = BuiltInResourceTypeFactory;
249
- /**
250
- * A factory that creates a {@link ResourceTypes.ResourceType | ResourceType} from a {@link ResourceTypes.Config.IResourceTypeConfig | resource type configuration}
251
- * by chaining a supplied factory with a {@link Config.BuiltInResourceTypeFactory | built-in factory} that handles built-in resource types.
252
- * @public
253
- */
254
- class ResourceTypeFactory extends ChainedConfigInitFactory {
255
- /**
256
- * Constructor for a resource type factory.
257
- * @param factories - Array of factories for resource types. Can be:
258
- * - {@link Config.IConfigInitFactory | IConfigInitFactory} instances
259
- * - {@link Config.ResourceTypeFactoryFunction | Factory functions}
260
- * - A mix of both
261
- * @remarks The {@link Config.BuiltInResourceTypeFactory | built-in factory} is always added to the end of the chain.
262
- */
263
- constructor(factories) {
264
- factories = factories !== null && factories !== void 0 ? factories : [];
265
- const normalizedFactories = factories.map((f) => typeof f === 'function' ? createResourceTypeFactory(f) : f);
266
- super([...normalizedFactories, new BuiltInResourceTypeFactory()]);
267
- }
268
- }
269
- exports.ResourceTypeFactory = ResourceTypeFactory;
270
- /**
271
- * A factory that validates and creates {@link ResourceTypes.ResourceType | ResourceType} instances
272
- * from weakly-typed configuration objects. This factory accepts configurations with unvalidated
273
- * string properties and validates them before delegating to the underlying factory chain.
274
- *
275
- * This pattern is useful at package boundaries where type identity issues may occur with
276
- * branded types across different package instances.
277
- *
278
- * @public
279
- */
280
- class ValidatingResourceTypeFactory {
281
- /**
282
- * Constructor for a validating resource type factory.
283
- * @param factories - Array of factories for resource types. Can be:
284
- * - {@link Config.IConfigInitFactory | IConfigInitFactory} instances
285
- * - {@link Config.ResourceTypeFactoryFunction | Factory functions}
286
- * - A mix of both
287
- */
288
- constructor(factories) {
289
- this._innerFactory = new ResourceTypeFactory(factories);
290
- }
291
- /**
292
- * Creates a resource type from a weakly-typed configuration object.
293
- * @param config - The configuration object to validate and use for creation.
294
- * @returns A result containing the new resource type if successful.
295
- */
296
- create(config) {
297
- return ResourceTypes.Config.Convert.resourceTypeConfig.convert(config).onSuccess((validatedConfig) => {
298
- return this._innerFactory.create(validatedConfig);
299
- });
300
- }
301
- }
302
- exports.ValidatingResourceTypeFactory = ValidatingResourceTypeFactory;
303
- //# sourceMappingURL=configInitFactory.js.map
@@ -1,23 +0,0 @@
1
- import { Result } from '@fgv/ts-utils';
2
- import { ISystemConfiguration } from './json';
3
- /**
4
- * A `Converter` for {@link Config.Model.ISystemConfiguration | ISystemConfiguration} objects.
5
- * @returns A `Converter` for {@link Config.Model.ISystemConfiguration | ISystemConfiguration} objects.
6
- * @public
7
- */
8
- export declare const systemConfiguration: import("@fgv/ts-utils").ObjectConverter<ISystemConfiguration, unknown>;
9
- /**
10
- * A `Converter` for {@link Config.PredefinedSystemConfiguration | PredefinedSystemConfiguration} values.
11
- * @returns A `Converter` for {@link Config.PredefinedSystemConfiguration | PredefinedSystemConfiguration} values.
12
- * @public
13
- */
14
- export declare const predefinedSystemConfiguration: import("@fgv/ts-utils").Converter<import("./common").PredefinedSystemConfiguration, readonly import("./common").PredefinedSystemConfiguration[]>;
15
- /**
16
- * Validate a {@link Config.Model.ISystemConfiguration | ISystemConfiguration} object.
17
- * @param config - The system configuration to validate
18
- * @returns `Success` with the validated system configuration if successful,
19
- * or `Failure` with an error message if validation fails.
20
- * @public
21
- */
22
- export declare function validateSystemConfiguration(config: unknown): Result<ISystemConfiguration>;
23
- //# sourceMappingURL=convert.d.ts.map
@@ -1,93 +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.predefinedSystemConfiguration = exports.systemConfiguration = void 0;
58
- exports.validateSystemConfiguration = validateSystemConfiguration;
59
- /* eslint-disable @rushstack/typedef-var */
60
- const ts_utils_1 = require("@fgv/ts-utils");
61
- const QualifierTypes = __importStar(require("../qualifier-types"));
62
- const Qualifiers = __importStar(require("../qualifiers"));
63
- const ResourceTypes = __importStar(require("../resource-types"));
64
- const common_1 = require("./common");
65
- /**
66
- * A `Converter` for {@link Config.Model.ISystemConfiguration | ISystemConfiguration} objects.
67
- * @returns A `Converter` for {@link Config.Model.ISystemConfiguration | ISystemConfiguration} objects.
68
- * @public
69
- */
70
- exports.systemConfiguration = ts_utils_1.Converters.strictObject({
71
- name: ts_utils_1.Converters.optionalString,
72
- description: ts_utils_1.Converters.optionalString,
73
- qualifierTypes: ts_utils_1.Converters.arrayOf(QualifierTypes.Config.Convert.anyQualifierTypeConfig),
74
- qualifiers: ts_utils_1.Converters.arrayOf(Qualifiers.Convert.qualifierDecl),
75
- resourceTypes: ts_utils_1.Converters.arrayOf(ResourceTypes.Config.Convert.resourceTypeConfig)
76
- });
77
- /**
78
- * A `Converter` for {@link Config.PredefinedSystemConfiguration | PredefinedSystemConfiguration} values.
79
- * @returns A `Converter` for {@link Config.PredefinedSystemConfiguration | PredefinedSystemConfiguration} values.
80
- * @public
81
- */
82
- exports.predefinedSystemConfiguration = ts_utils_1.Converters.enumeratedValue(common_1.allPredefinedSystemConfigurations);
83
- /**
84
- * Validate a {@link Config.Model.ISystemConfiguration | ISystemConfiguration} object.
85
- * @param config - The system configuration to validate
86
- * @returns `Success` with the validated system configuration if successful,
87
- * or `Failure` with an error message if validation fails.
88
- * @public
89
- */
90
- function validateSystemConfiguration(config) {
91
- return exports.systemConfiguration.convert(config);
92
- }
93
- //# sourceMappingURL=convert.js.map
@@ -1,7 +0,0 @@
1
- import * as Model from './json';
2
- import * as Convert from './convert';
3
- export * from './configInitFactory';
4
- export * from './common';
5
- export { SystemConfiguration } from './systemConfiguration';
6
- export { Model, Convert };
7
- //# sourceMappingURL=index.browser.d.ts.map
@@ -1,74 +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
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
57
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- exports.Convert = exports.Model = exports.SystemConfiguration = void 0;
61
- // Browser-safe config exports - excludes Node.js filesystem dependencies
62
- const Model = __importStar(require("./json"));
63
- exports.Model = Model;
64
- const Convert = __importStar(require("./convert"));
65
- exports.Convert = Convert;
66
- // Export all modules
67
- __exportStar(require("./configInitFactory"), exports);
68
- __exportStar(require("./common"), exports);
69
- // Export SystemConfiguration class but not as wildcard to avoid pulling in loadFromFile
70
- var systemConfiguration_1 = require("./systemConfiguration");
71
- Object.defineProperty(exports, "SystemConfiguration", { enumerable: true, get: function () { return systemConfiguration_1.SystemConfiguration; } });
72
- // Excluded from browser:
73
- // - SystemConfiguration.loadFromFile() method (requires Node.js fs via JsonFile)
74
- //# sourceMappingURL=index.browser.js.map
@@ -1,7 +0,0 @@
1
- import * as Model from './json';
2
- import * as Convert from './convert';
3
- export * from './configInitFactory';
4
- export * from './systemConfiguration';
5
- export * from './common';
6
- export { Model, Convert };
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,68 +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
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
57
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
58
- };
59
- Object.defineProperty(exports, "__esModule", { value: true });
60
- exports.Convert = exports.Model = void 0;
61
- const Model = __importStar(require("./json"));
62
- exports.Model = Model;
63
- const Convert = __importStar(require("./convert"));
64
- exports.Convert = Convert;
65
- __exportStar(require("./configInitFactory"), exports);
66
- __exportStar(require("./systemConfiguration"), exports);
67
- __exportStar(require("./common"), exports);
68
- //# sourceMappingURL=index.js.map
@@ -1,20 +0,0 @@
1
- import * as QualifierTypes from '../qualifier-types';
2
- import * as Qualifiers from '../qualifiers';
3
- import * as ResourceTypes from '../resource-types';
4
- /**
5
- * System configuration for both runtime or build.
6
- * @public
7
- */
8
- export interface ISystemConfiguration {
9
- /** Optional human-readable name for the configuration. */
10
- name?: string;
11
- /** Optional description explaining the purpose and use case of the configuration. */
12
- description?: string;
13
- /** Qualifier type configurations that define the available qualifier types in the system. */
14
- qualifierTypes: QualifierTypes.Config.IAnyQualifierTypeConfig[];
15
- /** Qualifier declarations that define the available qualifiers in the system. */
16
- qualifiers: Qualifiers.IQualifierDecl[];
17
- /** Resource type configurations that define the available resource types in the system. */
18
- resourceTypes: ResourceTypes.Config.IResourceTypeConfig[];
19
- }
20
- //# sourceMappingURL=json.d.ts.map
@@ -1,24 +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
- //# sourceMappingURL=json.js.map