@fgv/ts-res 5.1.0-39 → 5.1.0-40

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 (97) hide show
  1. package/dist/packlets/config/common.js +78 -0
  2. package/dist/packlets/config/common.js.map +1 -0
  3. package/dist/packlets/config/configInitFactory.js +258 -0
  4. package/dist/packlets/config/configInitFactory.js.map +1 -0
  5. package/dist/packlets/config/convert.js +56 -0
  6. package/dist/packlets/config/convert.js.map +1 -0
  7. package/dist/packlets/config/index.browser.js +34 -0
  8. package/dist/packlets/config/index.browser.js.map +1 -0
  9. package/dist/packlets/config/index.js +28 -0
  10. package/dist/packlets/config/index.js.map +1 -0
  11. package/dist/packlets/config/json.js +23 -0
  12. package/dist/packlets/config/json.js.map +1 -0
  13. package/dist/packlets/config/predefined/default.js +138 -0
  14. package/dist/packlets/config/predefined/default.js.map +1 -0
  15. package/dist/packlets/config/predefined/extended.js +190 -0
  16. package/dist/packlets/config/predefined/extended.js.map +1 -0
  17. package/dist/packlets/config/predefined/index.js +25 -0
  18. package/dist/packlets/config/predefined/index.js.map +1 -0
  19. package/dist/packlets/config/systemConfiguration.js +147 -0
  20. package/dist/packlets/config/systemConfiguration.js.map +1 -0
  21. package/dist/packlets/qualifier-types/config/convert.js +124 -0
  22. package/dist/packlets/qualifier-types/config/convert.js.map +1 -0
  23. package/dist/packlets/qualifier-types/config/index.js +25 -0
  24. package/dist/packlets/qualifier-types/config/index.js.map +1 -0
  25. package/dist/packlets/qualifier-types/config/json.js +32 -0
  26. package/dist/packlets/qualifier-types/config/json.js.map +1 -0
  27. package/dist/packlets/resource-types/config/convert.js +35 -0
  28. package/dist/packlets/resource-types/config/convert.js.map +1 -0
  29. package/dist/packlets/resource-types/config/index.js +25 -0
  30. package/dist/packlets/resource-types/config/index.js.map +1 -0
  31. package/dist/packlets/resource-types/config/json.js +23 -0
  32. package/dist/packlets/resource-types/config/json.js.map +1 -0
  33. package/lib/packlets/config/common.d.ts +35 -0
  34. package/lib/packlets/config/common.d.ts.map +1 -0
  35. package/lib/packlets/config/common.js +97 -0
  36. package/lib/packlets/config/common.js.map +1 -0
  37. package/lib/packlets/config/configInitFactory.d.ts +217 -0
  38. package/lib/packlets/config/configInitFactory.d.ts.map +1 -0
  39. package/lib/packlets/config/configInitFactory.js +303 -0
  40. package/lib/packlets/config/configInitFactory.js.map +1 -0
  41. package/lib/packlets/config/convert.d.ts +23 -0
  42. package/lib/packlets/config/convert.d.ts.map +1 -0
  43. package/lib/packlets/config/convert.js +93 -0
  44. package/lib/packlets/config/convert.js.map +1 -0
  45. package/lib/packlets/config/index.browser.d.ts +7 -0
  46. package/lib/packlets/config/index.browser.d.ts.map +1 -0
  47. package/lib/packlets/config/index.browser.js +74 -0
  48. package/lib/packlets/config/index.browser.js.map +1 -0
  49. package/lib/packlets/config/index.d.ts +7 -0
  50. package/lib/packlets/config/index.d.ts.map +1 -0
  51. package/lib/packlets/config/index.js +68 -0
  52. package/lib/packlets/config/index.js.map +1 -0
  53. package/lib/packlets/config/json.d.ts +20 -0
  54. package/lib/packlets/config/json.d.ts.map +1 -0
  55. package/lib/packlets/config/json.js +24 -0
  56. package/lib/packlets/config/json.js.map +1 -0
  57. package/lib/packlets/config/predefined/default.d.ts +57 -0
  58. package/lib/packlets/config/predefined/default.d.ts.map +1 -0
  59. package/lib/packlets/config/predefined/default.js +141 -0
  60. package/lib/packlets/config/predefined/default.js.map +1 -0
  61. package/lib/packlets/config/predefined/extended.d.ts +25 -0
  62. package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
  63. package/lib/packlets/config/predefined/extended.js +193 -0
  64. package/lib/packlets/config/predefined/extended.js.map +1 -0
  65. package/lib/packlets/config/predefined/index.d.ts +4 -0
  66. package/lib/packlets/config/predefined/index.d.ts.map +1 -0
  67. package/lib/packlets/config/predefined/index.js +62 -0
  68. package/lib/packlets/config/predefined/index.js.map +1 -0
  69. package/lib/packlets/config/systemConfiguration.d.ts +94 -0
  70. package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
  71. package/lib/packlets/config/systemConfiguration.js +152 -0
  72. package/lib/packlets/config/systemConfiguration.js.map +1 -0
  73. package/lib/packlets/qualifier-types/config/convert.d.ts +65 -0
  74. package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
  75. package/lib/packlets/qualifier-types/config/convert.js +161 -0
  76. package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
  77. package/lib/packlets/qualifier-types/config/index.d.ts +4 -0
  78. package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
  79. package/lib/packlets/qualifier-types/config/index.js +64 -0
  80. package/lib/packlets/qualifier-types/config/index.js.map +1 -0
  81. package/lib/packlets/qualifier-types/config/json.d.ts +91 -0
  82. package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
  83. package/lib/packlets/qualifier-types/config/json.js +35 -0
  84. package/lib/packlets/qualifier-types/config/json.js.map +1 -0
  85. package/lib/packlets/resource-types/config/convert.d.ts +8 -0
  86. package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
  87. package/lib/packlets/resource-types/config/convert.js +38 -0
  88. package/lib/packlets/resource-types/config/convert.js.map +1 -0
  89. package/lib/packlets/resource-types/config/index.d.ts +4 -0
  90. package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
  91. package/lib/packlets/resource-types/config/index.js +64 -0
  92. package/lib/packlets/resource-types/config/index.js.map +1 -0
  93. package/lib/packlets/resource-types/config/json.d.ts +11 -0
  94. package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
  95. package/lib/packlets/resource-types/config/json.js +24 -0
  96. package/lib/packlets/resource-types/config/json.js.map +1 -0
  97. package/package.json +9 -9
@@ -0,0 +1,93 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../src/packlets/config/convert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCH,kEAEC;AAtCD,2CAA2C;AAE3C,4CAAmD;AAEnD,mEAAqD;AACrD,0DAA4C;AAC5C,iEAAmD;AACnD,qCAA6D;AAE7D;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,qBAAU,CAAC,YAAY,CAAuB;IAC/E,IAAI,EAAE,qBAAU,CAAC,cAAc;IAC/B,WAAW,EAAE,qBAAU,CAAC,cAAc;IACtC,cAAc,EAAE,qBAAU,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC;IACxF,UAAU,EAAE,qBAAU,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,aAAa,CAAC;IAChE,aAAa,EAAE,qBAAU,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC;CACnF,CAAC,CAAC;AAEH;;;;GAIG;AACU,QAAA,6BAA6B,GAAG,qBAAU,CAAC,eAAe,CAAC,0CAAiC,CAAC,CAAC;AAE3G;;;;;;GAMG;AACH,SAAgB,2BAA2B,CAAC,MAAe;IACzD,OAAO,2BAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint-disable @rushstack/typedef-var */\n\nimport { Converters, Result } from '@fgv/ts-utils';\nimport { ISystemConfiguration } from './json';\nimport * as QualifierTypes from '../qualifier-types';\nimport * as Qualifiers from '../qualifiers';\nimport * as ResourceTypes from '../resource-types';\nimport { allPredefinedSystemConfigurations } from './common';\n\n/**\n * A `Converter` for {@link Config.Model.ISystemConfiguration | ISystemConfiguration} objects.\n * @returns A `Converter` for {@link Config.Model.ISystemConfiguration | ISystemConfiguration} objects.\n * @public\n */\nexport const systemConfiguration = Converters.strictObject<ISystemConfiguration>({\n name: Converters.optionalString,\n description: Converters.optionalString,\n qualifierTypes: Converters.arrayOf(QualifierTypes.Config.Convert.anyQualifierTypeConfig),\n qualifiers: Converters.arrayOf(Qualifiers.Convert.qualifierDecl),\n resourceTypes: Converters.arrayOf(ResourceTypes.Config.Convert.resourceTypeConfig)\n});\n\n/**\n * A `Converter` for {@link Config.PredefinedSystemConfiguration | PredefinedSystemConfiguration} values.\n * @returns A `Converter` for {@link Config.PredefinedSystemConfiguration | PredefinedSystemConfiguration} values.\n * @public\n */\nexport const predefinedSystemConfiguration = Converters.enumeratedValue(allPredefinedSystemConfigurations);\n\n/**\n * Validate a {@link Config.Model.ISystemConfiguration | ISystemConfiguration} object.\n * @param config - The system configuration to validate\n * @returns `Success` with the validated system configuration if successful,\n * or `Failure` with an error message if validation fails.\n * @public\n */\nexport function validateSystemConfiguration(config: unknown): Result<ISystemConfiguration> {\n return systemConfiguration.convert(config);\n}\n"]}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../../src/packlets/config/index.browser.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAGrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,74 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../src/packlets/config/index.browser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yEAAyE;AAEzE,8CAAgC;AAWvB,sBAAK;AAVd,mDAAqC;AAUrB,0BAAO;AARvB,qBAAqB;AACrB,sDAAoC;AACpC,2CAAyB;AAEzB,wFAAwF;AACxF,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAK5B,yBAAyB;AACzB,iFAAiF","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n// Browser-safe config exports - excludes Node.js filesystem dependencies\n\nimport * as Model from './json';\nimport * as Convert from './convert';\n\n// Export all modules\nexport * from './configInitFactory';\nexport * from './common';\n\n// Export SystemConfiguration class but not as wildcard to avoid pulling in loadFromFile\nexport { SystemConfiguration } from './systemConfiguration';\n\n// Export namespaces\nexport { Model, Convert };\n\n// Excluded from browser:\n// - SystemConfiguration.loadFromFile() method (requires Node.js fs via JsonFile)\n"]}
@@ -0,0 +1,7 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packlets/config/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,68 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/packlets/config/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8CAAgC;AAOvB,sBAAK;AANd,mDAAqC;AAMrB,0BAAO;AAJvB,sDAAoC;AACpC,wDAAsC;AACtC,2CAAyB","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Model from './json';\nimport * as Convert from './convert';\n\nexport * from './configInitFactory';\nexport * from './systemConfiguration';\nexport * from './common';\n\nexport { Model, Convert };\n"]}
@@ -0,0 +1,20 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/packlets/config/json.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAE1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6FAA6F;IAC7F,cAAc,EAAE,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAChE,iFAAiF;IACjF,UAAU,EAAE,UAAU,CAAC,cAAc,EAAE,CAAC;IACxC,2FAA2F;IAC3F,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;CAC3D"}
@@ -0,0 +1,24 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/packlets/config/json.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as QualifierTypes from '../qualifier-types';\nimport * as Qualifiers from '../qualifiers';\nimport * as ResourceTypes from '../resource-types';\n\n/**\n * System configuration for both runtime or build.\n * @public\n */\nexport interface ISystemConfiguration {\n /** Optional human-readable name for the configuration. */\n\n name?: string;\n /** Optional description explaining the purpose and use case of the configuration. */\n description?: string;\n /** Qualifier type configurations that define the available qualifier types in the system. */\n qualifierTypes: QualifierTypes.Config.IAnyQualifierTypeConfig[];\n /** Qualifier declarations that define the available qualifiers in the system. */\n qualifiers: Qualifiers.IQualifierDecl[];\n /** Resource type configurations that define the available resource types in the system. */\n resourceTypes: ResourceTypes.Config.IResourceTypeConfig[];\n}\n"]}
@@ -0,0 +1,57 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/packlets/config/predefined/default.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,0BAA0B,CAejG,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,EAAE,aAAa,CAAC,UAAU,CAAC,cAAc,CAahF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,aAAa,CAAC,UAAU,CAAC,cAAc,CAa/E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,mBAAmB,CAKxF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,EAAE,oBAMlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,EAAE,oBAMjD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,oBAMxC,CAAC"}
@@ -0,0 +1,141 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../src/packlets/config/predefined/default.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAQH;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAoE;IACpG;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,UAAU;QACtB,aAAa,EAAE;YACb,gBAAgB,EAAE,IAAI;SACvB;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE,WAAW;QACvB,aAAa,EAAE;YACb,gBAAgB,EAAE,KAAK;SACxB;KACF;CACF,CAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,2BAA2B,GAA6C;IACnF;QACE,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,WAAW;QACrB,eAAe,EAAE,GAAG;KACrB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,UAAU;QACpB,eAAe,EAAE,GAAG;KACrB;CACF,CAAC;AAEF;;;;;;;;GAQG;AACU,QAAA,0BAA0B,GAA6C;IAClF;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,UAAU;QACpB,eAAe,EAAE,GAAG;KACrB;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,WAAW;QACrB,eAAe,EAAE,GAAG;KACrB;CACF,CAAC;AAEF;;;GAGG;AACU,QAAA,oBAAoB,GAA4D;IAC3F;QACE,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC;AAEF;;;;GAIG;AACU,QAAA,oCAAoC,GAAyB;IACxE,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,yCAAyC;IACtD,cAAc,EAAE,CAAC,GAAG,6BAAqB,CAAC;IAC1C,UAAU,EAAE,CAAC,GAAG,mCAA2B,CAAC;IAC5C,aAAa,EAAE,CAAC,GAAG,4BAAoB,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACU,QAAA,mCAAmC,GAAyB;IACvE,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,wCAAwC;IACrD,cAAc,EAAE,CAAC,GAAG,6BAAqB,CAAC;IAC1C,UAAU,EAAE,CAAC,GAAG,kCAA0B,CAAC;IAC3C,aAAa,EAAE,CAAC,GAAG,4BAAoB,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACU,QAAA,0BAA0B,GAAyB;IAC9D,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,8BAA8B;IAC3C,cAAc,EAAE,CAAC,GAAG,6BAAqB,CAAC;IAC1C,UAAU,EAAE,CAAC,GAAG,mCAA2B,CAAC;IAC5C,aAAa,EAAE,CAAC,GAAG,4BAAoB,CAAC;CACzC,CAAC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { ISystemConfiguration } from '../json';\n\nimport * as QualifierTypes from '../../qualifier-types';\nimport * as Qualifiers from '../../qualifiers';\nimport * as ResourceTypes from '../../resource-types';\n\n/**\n * Default qualifier types.\n * @remarks\n * The default qualifier types are:\n * - language: recognizes BCP 47 language tags, accepts a comma-separated list of language tags in the context\n * - territory: recognizes ISO 3166-1 alpha-2 territory codes, accepts a single code in the context\n * @public\n */\nexport const DefaultQualifierTypes: ReadonlyArray<QualifierTypes.Config.ISystemQualifierTypeConfig> = [\n {\n name: 'language',\n systemType: 'language',\n configuration: {\n allowContextList: true\n }\n },\n {\n name: 'territory',\n systemType: 'territory',\n configuration: {\n allowContextList: false\n }\n }\n];\n\n/**\n * Qualifier definitions in which territory is the primary qualifier, with\n * language as a secondary qualifier.\n * @remarks\n * The default qualifiers are:\n * - currentTerritory(token: geo): territory qualifier, priority 850\n * - language(token: lang): language qualifier, priority 800\n * @public\n */\nexport const TerritoryPriorityQualifiers: ReadonlyArray<Qualifiers.IQualifierDecl> = [\n {\n name: 'currentTerritory',\n token: 'geo',\n typeName: 'territory',\n defaultPriority: 850\n },\n {\n name: 'language',\n token: 'lang',\n typeName: 'language',\n defaultPriority: 800\n }\n];\n\n/**\n * Qualifier definitions in which language is the primary qualifier, with\n * territory as a secondary qualifier.\n * @remarks\n * The default qualifiers are:\n * - language(token: lang): language qualifier, priority 850\n * - currentTerritory(token: geo): territory qualifier, priority 800\n * @public\n */\nexport const LanguagePriorityQualifiers: ReadonlyArray<Qualifiers.IQualifierDecl> = [\n {\n name: 'language',\n token: 'lang',\n typeName: 'language',\n defaultPriority: 850\n },\n {\n name: 'currentTerritory',\n token: 'geo',\n typeName: 'territory',\n defaultPriority: 800\n }\n];\n\n/**\n * Default resource types.\n * @public\n */\nexport const DefaultResourceTypes: ReadonlyArray<ResourceTypes.Config.IResourceTypeConfig> = [\n {\n name: 'json',\n typeName: 'json'\n }\n];\n\n/**\n * System configuration with territory as the primary qualifier, and\n * language as a secondary qualifier.\n * @public\n */\nexport const TerritoryPrioritySystemConfiguration: ISystemConfiguration = {\n name: 'territory-priority',\n description: 'Territory priority system configuration',\n qualifierTypes: [...DefaultQualifierTypes],\n qualifiers: [...TerritoryPriorityQualifiers],\n resourceTypes: [...DefaultResourceTypes]\n};\n\n/**\n * System configuration with language as the primary qualifier, and\n * territory as a secondary qualifier.\n * @public\n */\nexport const LanguagePrioritySystemConfiguration: ISystemConfiguration = {\n name: 'language-priority',\n description: 'Language priority system configuration',\n qualifierTypes: [...DefaultQualifierTypes],\n qualifiers: [...LanguagePriorityQualifiers],\n resourceTypes: [...DefaultResourceTypes]\n};\n\n/**\n * The default system configuration gives priority to territory as the primary qualifier,\n * with language as a secondary qualifier.\n * @public\n */\nexport const DefaultSystemConfiguration: ISystemConfiguration = {\n name: 'default',\n description: 'Default system configuration',\n qualifierTypes: [...DefaultQualifierTypes],\n qualifiers: [...TerritoryPriorityQualifiers],\n resourceTypes: [...DefaultResourceTypes]\n};\n"]}
@@ -0,0 +1,25 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extended.d.ts","sourceRoot":"","sources":["../../../../src/packlets/config/predefined/extended.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,0BAA0B,CAiGlG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,UAAU,CAAC,cAAc,CAwCvE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,mBAAmB,CAKzF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,oBAMzC,CAAC"}