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

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 (571) hide show
  1. package/dist/index.browser.js.map +1 -0
  2. package/dist/index.js.map +1 -0
  3. package/dist/packlets/bundle/bundleBuilder.js.map +1 -0
  4. package/dist/packlets/bundle/bundleLoader.js.map +1 -0
  5. package/dist/packlets/bundle/bundleNormalizer.js.map +1 -0
  6. package/dist/packlets/bundle/bundleUtils.js.map +1 -0
  7. package/dist/packlets/bundle/convert.js.map +1 -0
  8. package/dist/packlets/bundle/index.js.map +1 -0
  9. package/dist/packlets/bundle/model.js.map +1 -0
  10. package/dist/packlets/common/conditions.js.map +1 -0
  11. package/dist/packlets/common/convert.js.map +1 -0
  12. package/dist/packlets/common/helpers/conditions.js.map +1 -0
  13. package/dist/packlets/common/helpers/context.js.map +1 -0
  14. package/dist/packlets/common/helpers/index.js.map +1 -0
  15. package/dist/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
  16. package/dist/packlets/common/helpers/resources.js +2 -4
  17. package/dist/packlets/common/helpers/resources.js.map +1 -0
  18. package/dist/packlets/common/index.js.map +1 -0
  19. package/dist/packlets/common/resources.js.map +1 -0
  20. package/dist/packlets/common/validate/conditions.js +4 -4
  21. package/dist/packlets/common/validate/conditions.js.map +1 -0
  22. package/dist/packlets/common/validate/index.js.map +1 -0
  23. package/dist/packlets/common/validate/regularExpressions.js +2 -2
  24. package/dist/packlets/common/validate/regularExpressions.js.map +1 -0
  25. package/dist/packlets/common/validate/resources.js +1 -1
  26. package/dist/packlets/common/validate/resources.js.map +1 -0
  27. package/dist/packlets/conditions/condition.js +3 -7
  28. package/dist/packlets/conditions/condition.js.map +1 -0
  29. package/dist/packlets/conditions/conditionCollector.js.map +1 -0
  30. package/dist/packlets/conditions/conditionDecls.js.map +1 -0
  31. package/dist/packlets/conditions/conditionSet.js.map +1 -0
  32. package/dist/packlets/conditions/conditionSetCollector.js.map +1 -0
  33. package/dist/packlets/conditions/conditionSetDecls.js.map +1 -0
  34. package/dist/packlets/conditions/conditionToken.js.map +1 -0
  35. package/dist/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
  36. package/dist/packlets/conditions/convert/decls.js.map +1 -0
  37. package/dist/packlets/conditions/convert/index.js.map +1 -0
  38. package/dist/packlets/conditions/index.js.map +1 -0
  39. package/dist/packlets/config/common.js +78 -0
  40. package/dist/packlets/config/common.js.map +1 -0
  41. package/dist/packlets/config/configInitFactory.js +258 -0
  42. package/dist/packlets/config/configInitFactory.js.map +1 -0
  43. package/dist/packlets/config/convert.js +56 -0
  44. package/dist/packlets/config/convert.js.map +1 -0
  45. package/dist/packlets/config/index.browser.js +34 -0
  46. package/dist/packlets/config/index.browser.js.map +1 -0
  47. package/dist/packlets/config/index.js +28 -0
  48. package/dist/packlets/config/index.js.map +1 -0
  49. package/dist/packlets/config/json.js +23 -0
  50. package/dist/packlets/config/json.js.map +1 -0
  51. package/dist/packlets/config/predefined/default.js +138 -0
  52. package/dist/packlets/config/predefined/default.js.map +1 -0
  53. package/dist/packlets/config/predefined/extended.js +190 -0
  54. package/dist/packlets/config/predefined/extended.js.map +1 -0
  55. package/dist/packlets/config/predefined/index.js +25 -0
  56. package/dist/packlets/config/predefined/index.js.map +1 -0
  57. package/dist/packlets/config/systemConfiguration.js +147 -0
  58. package/dist/packlets/config/systemConfiguration.js.map +1 -0
  59. package/dist/packlets/context/contextDecls.js.map +1 -0
  60. package/dist/packlets/context/contextToken.js.map +1 -0
  61. package/dist/packlets/context/convert/decls.js.map +1 -0
  62. package/dist/packlets/context/convert/index.js.map +1 -0
  63. package/dist/packlets/context/index.js.map +1 -0
  64. package/dist/packlets/decisions/abstractDecision.js.map +1 -0
  65. package/dist/packlets/decisions/abstractDecisionCollector.js.map +1 -0
  66. package/dist/packlets/decisions/candidate.js.map +1 -0
  67. package/dist/packlets/decisions/common.js.map +1 -0
  68. package/dist/packlets/decisions/concreteDecision.js.map +1 -0
  69. package/dist/packlets/decisions/decision.js +1 -1
  70. package/dist/packlets/decisions/decision.js.map +1 -0
  71. package/dist/packlets/decisions/index.js.map +1 -0
  72. package/dist/packlets/import/fsItem.js +1 -4
  73. package/dist/packlets/import/fsItem.js.map +1 -0
  74. package/dist/packlets/import/importContext.js +3 -3
  75. package/dist/packlets/import/importContext.js.map +1 -0
  76. package/dist/packlets/import/importManager.js +7 -3
  77. package/dist/packlets/import/importManager.js.map +1 -0
  78. package/dist/packlets/import/importable.js.map +1 -0
  79. package/dist/packlets/import/importers/collectionImporter.js +2 -2
  80. package/dist/packlets/import/importers/collectionImporter.js.map +1 -0
  81. package/dist/packlets/import/importers/fsItemImporter.js +30 -14
  82. package/dist/packlets/import/importers/fsItemImporter.js.map +1 -0
  83. package/dist/packlets/import/importers/importer.js.map +1 -0
  84. package/dist/packlets/import/importers/index.browser.js.map +1 -0
  85. package/dist/packlets/import/importers/index.js.map +1 -0
  86. package/dist/packlets/import/importers/jsonImporter.js +2 -2
  87. package/dist/packlets/import/importers/jsonImporter.js.map +1 -0
  88. package/dist/packlets/import/importers/pathImporter.js +1 -1
  89. package/dist/packlets/import/importers/pathImporter.js.map +1 -0
  90. package/dist/packlets/import/index.browser.js.map +1 -0
  91. package/dist/packlets/import/index.js.map +1 -0
  92. package/dist/packlets/qualifier-types/config/convert.js +124 -0
  93. package/dist/packlets/qualifier-types/config/convert.js.map +1 -0
  94. package/dist/packlets/qualifier-types/config/index.js +25 -0
  95. package/dist/packlets/qualifier-types/config/index.js.map +1 -0
  96. package/dist/packlets/qualifier-types/config/json.js +32 -0
  97. package/dist/packlets/qualifier-types/config/json.js.map +1 -0
  98. package/dist/packlets/qualifier-types/convert.js.map +1 -0
  99. package/dist/packlets/qualifier-types/helpers.js.map +1 -0
  100. package/dist/packlets/qualifier-types/index.js.map +1 -0
  101. package/dist/packlets/qualifier-types/languageQualifierType.js +6 -7
  102. package/dist/packlets/qualifier-types/languageQualifierType.js.map +1 -0
  103. package/dist/packlets/qualifier-types/literalQualifierType.js +7 -10
  104. package/dist/packlets/qualifier-types/literalQualifierType.js.map +1 -0
  105. package/dist/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
  106. package/dist/packlets/qualifier-types/qualifierType.js +12 -13
  107. package/dist/packlets/qualifier-types/qualifierType.js.map +1 -0
  108. package/dist/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
  109. package/dist/packlets/qualifier-types/territoryQualifierType.js +5 -5
  110. package/dist/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
  111. package/dist/packlets/qualifiers/convert/decls.js.map +1 -0
  112. package/dist/packlets/qualifiers/convert/index.js.map +1 -0
  113. package/dist/packlets/qualifiers/convert/qualifier.js.map +1 -0
  114. package/dist/packlets/qualifiers/index.js.map +1 -0
  115. package/dist/packlets/qualifiers/qualifier.js +6 -7
  116. package/dist/packlets/qualifiers/qualifier.js.map +1 -0
  117. package/dist/packlets/qualifiers/qualifierCollector.js +2 -2
  118. package/dist/packlets/qualifiers/qualifierCollector.js.map +1 -0
  119. package/dist/packlets/qualifiers/qualifierDecl.js.map +1 -0
  120. package/dist/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
  121. package/dist/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
  122. package/dist/packlets/resource-json/compiled/common.js.map +1 -0
  123. package/dist/packlets/resource-json/compiled/convert.js.map +1 -0
  124. package/dist/packlets/resource-json/compiled/index.js.map +1 -0
  125. package/dist/packlets/resource-json/compiled/json.js.map +1 -0
  126. package/dist/packlets/resource-json/convert.js.map +1 -0
  127. package/dist/packlets/resource-json/helpers.js.map +1 -0
  128. package/dist/packlets/resource-json/index.js.map +1 -0
  129. package/dist/packlets/resource-json/json.js.map +1 -0
  130. package/dist/packlets/resource-json/normalized.js.map +1 -0
  131. package/dist/packlets/resource-json/resourceDeclCollection.js +1 -1
  132. package/dist/packlets/resource-json/resourceDeclCollection.js.map +1 -0
  133. package/dist/packlets/resource-json/resourceDeclContainer.js.map +1 -0
  134. package/dist/packlets/resource-json/resourceDeclTree.js +1 -1
  135. package/dist/packlets/resource-json/resourceDeclTree.js.map +1 -0
  136. package/dist/packlets/resource-types/config/convert.js +35 -0
  137. package/dist/packlets/resource-types/config/convert.js.map +1 -0
  138. package/dist/packlets/resource-types/config/index.js +25 -0
  139. package/dist/packlets/resource-types/config/index.js.map +1 -0
  140. package/dist/packlets/resource-types/config/json.js +23 -0
  141. package/dist/packlets/resource-types/config/json.js.map +1 -0
  142. package/dist/packlets/resource-types/helpers.js.map +1 -0
  143. package/dist/packlets/resource-types/index.js.map +1 -0
  144. package/dist/packlets/resource-types/jsonResourceType.js +2 -2
  145. package/dist/packlets/resource-types/jsonResourceType.js.map +1 -0
  146. package/dist/packlets/resource-types/resourceType.js +2 -2
  147. package/dist/packlets/resource-types/resourceType.js.map +1 -0
  148. package/dist/packlets/resource-types/resourceTypeCollector.js.map +1 -0
  149. package/dist/packlets/resources/candidateReducer.js.map +1 -0
  150. package/dist/packlets/resources/candidateValue.js.map +1 -0
  151. package/dist/packlets/resources/candidateValueCollector.js.map +1 -0
  152. package/dist/packlets/resources/common.js.map +1 -0
  153. package/dist/packlets/resources/deltaGenerator.js.map +1 -0
  154. package/dist/packlets/resources/index.js.map +1 -0
  155. package/dist/packlets/resources/resource.js.map +1 -0
  156. package/dist/packlets/resources/resourceBuilder.js +2 -2
  157. package/dist/packlets/resources/resourceBuilder.js.map +1 -0
  158. package/dist/packlets/resources/resourceCandidate.js.map +1 -0
  159. package/dist/packlets/resources/resourceManagerBuilder.js +5 -5
  160. package/dist/packlets/resources/resourceManagerBuilder.js.map +1 -0
  161. package/dist/packlets/runtime/cacheListener.js.map +1 -0
  162. package/dist/packlets/runtime/cacheMetrics.js.map +1 -0
  163. package/dist/packlets/runtime/compiledResourceCollection.js +5 -5
  164. package/dist/packlets/runtime/compiledResourceCollection.js.map +1 -0
  165. package/dist/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
  166. package/dist/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
  167. package/dist/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
  168. package/dist/packlets/runtime/context/index.js.map +1 -0
  169. package/dist/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
  170. package/dist/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
  171. package/dist/packlets/runtime/iResourceManager.js.map +1 -0
  172. package/dist/packlets/runtime/index.js.map +1 -0
  173. package/dist/packlets/runtime/resource-tree/common.js.map +1 -0
  174. package/dist/packlets/runtime/resource-tree/index.js.map +1 -0
  175. package/dist/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
  176. package/dist/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
  177. package/dist/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
  178. package/dist/packlets/runtime/resourceResolver.js.map +1 -0
  179. package/dist/packlets/runtime/resourceTreeResolver.js.map +1 -0
  180. package/dist/packlets/runtime/validate.js.map +1 -0
  181. package/dist/packlets/zip-archive/convert.js.map +1 -0
  182. package/dist/packlets/zip-archive/index.browser.js.map +1 -0
  183. package/dist/packlets/zip-archive/index.js.map +1 -0
  184. package/dist/packlets/zip-archive/json.js.map +1 -0
  185. package/dist/packlets/zip-archive/types.js.map +1 -0
  186. package/dist/packlets/zip-archive/zipArchiveCreator.js.map +1 -0
  187. package/dist/packlets/zip-archive/zipArchiveFormat.js.map +1 -0
  188. package/dist/packlets/zip-archive/zipArchiveLoader.js.map +1 -0
  189. package/dist/ts-res.d.ts +134 -112
  190. package/dist/tsdoc-metadata.json +1 -1
  191. package/lib/index.browser.d.ts.map +1 -0
  192. package/lib/index.browser.js.map +1 -0
  193. package/lib/index.d.ts.map +1 -0
  194. package/lib/index.js.map +1 -0
  195. package/lib/packlets/bundle/bundleBuilder.d.ts.map +1 -0
  196. package/lib/packlets/bundle/bundleBuilder.js.map +1 -0
  197. package/lib/packlets/bundle/bundleLoader.d.ts.map +1 -0
  198. package/lib/packlets/bundle/bundleLoader.js.map +1 -0
  199. package/lib/packlets/bundle/bundleNormalizer.d.ts.map +1 -0
  200. package/lib/packlets/bundle/bundleNormalizer.js.map +1 -0
  201. package/lib/packlets/bundle/bundleUtils.d.ts.map +1 -0
  202. package/lib/packlets/bundle/bundleUtils.js.map +1 -0
  203. package/lib/packlets/bundle/convert.d.ts.map +1 -0
  204. package/lib/packlets/bundle/convert.js.map +1 -0
  205. package/lib/packlets/bundle/index.d.ts.map +1 -0
  206. package/lib/packlets/bundle/index.js.map +1 -0
  207. package/lib/packlets/bundle/model.d.ts.map +1 -0
  208. package/lib/packlets/bundle/model.js.map +1 -0
  209. package/lib/packlets/common/conditions.d.ts.map +1 -0
  210. package/lib/packlets/common/conditions.js.map +1 -0
  211. package/lib/packlets/common/convert.d.ts.map +1 -0
  212. package/lib/packlets/common/convert.js.map +1 -0
  213. package/lib/packlets/common/helpers/conditions.d.ts.map +1 -0
  214. package/lib/packlets/common/helpers/conditions.js.map +1 -0
  215. package/lib/packlets/common/helpers/context.d.ts.map +1 -0
  216. package/lib/packlets/common/helpers/context.js.map +1 -0
  217. package/lib/packlets/common/helpers/index.d.ts.map +1 -0
  218. package/lib/packlets/common/helpers/index.js.map +1 -0
  219. package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +1 -0
  220. package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
  221. package/lib/packlets/common/helpers/resources.d.ts +2 -4
  222. package/lib/packlets/common/helpers/resources.d.ts.map +1 -0
  223. package/lib/packlets/common/helpers/resources.js +2 -4
  224. package/lib/packlets/common/helpers/resources.js.map +1 -0
  225. package/lib/packlets/common/index.d.ts.map +1 -0
  226. package/lib/packlets/common/index.js.map +1 -0
  227. package/lib/packlets/common/resources.d.ts.map +1 -0
  228. package/lib/packlets/common/resources.js.map +1 -0
  229. package/lib/packlets/common/validate/conditions.d.ts +4 -4
  230. package/lib/packlets/common/validate/conditions.d.ts.map +1 -0
  231. package/lib/packlets/common/validate/conditions.js +4 -4
  232. package/lib/packlets/common/validate/conditions.js.map +1 -0
  233. package/lib/packlets/common/validate/index.d.ts.map +1 -0
  234. package/lib/packlets/common/validate/index.js.map +1 -0
  235. package/lib/packlets/common/validate/regularExpressions.d.ts +2 -2
  236. package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -0
  237. package/lib/packlets/common/validate/regularExpressions.js +2 -2
  238. package/lib/packlets/common/validate/regularExpressions.js.map +1 -0
  239. package/lib/packlets/common/validate/resources.d.ts +1 -1
  240. package/lib/packlets/common/validate/resources.d.ts.map +1 -0
  241. package/lib/packlets/common/validate/resources.js +1 -1
  242. package/lib/packlets/common/validate/resources.js.map +1 -0
  243. package/lib/packlets/conditions/condition.d.ts +3 -7
  244. package/lib/packlets/conditions/condition.d.ts.map +1 -0
  245. package/lib/packlets/conditions/condition.js +3 -7
  246. package/lib/packlets/conditions/condition.js.map +1 -0
  247. package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -0
  248. package/lib/packlets/conditions/conditionCollector.js.map +1 -0
  249. package/lib/packlets/conditions/conditionDecls.d.ts.map +1 -0
  250. package/lib/packlets/conditions/conditionDecls.js.map +1 -0
  251. package/lib/packlets/conditions/conditionSet.d.ts.map +1 -0
  252. package/lib/packlets/conditions/conditionSet.js.map +1 -0
  253. package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -0
  254. package/lib/packlets/conditions/conditionSetCollector.js.map +1 -0
  255. package/lib/packlets/conditions/conditionSetDecls.d.ts.map +1 -0
  256. package/lib/packlets/conditions/conditionSetDecls.js.map +1 -0
  257. package/lib/packlets/conditions/conditionToken.d.ts.map +1 -0
  258. package/lib/packlets/conditions/conditionToken.js.map +1 -0
  259. package/lib/packlets/conditions/convert/conditionSetDecls.d.ts.map +1 -0
  260. package/lib/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
  261. package/lib/packlets/conditions/convert/decls.d.ts.map +1 -0
  262. package/lib/packlets/conditions/convert/decls.js.map +1 -0
  263. package/lib/packlets/conditions/convert/index.d.ts.map +1 -0
  264. package/lib/packlets/conditions/convert/index.js.map +1 -0
  265. package/lib/packlets/conditions/index.d.ts.map +1 -0
  266. package/lib/packlets/conditions/index.js.map +1 -0
  267. package/lib/packlets/config/common.d.ts +35 -0
  268. package/lib/packlets/config/common.d.ts.map +1 -0
  269. package/lib/packlets/config/common.js +97 -0
  270. package/lib/packlets/config/common.js.map +1 -0
  271. package/lib/packlets/config/configInitFactory.d.ts +217 -0
  272. package/lib/packlets/config/configInitFactory.d.ts.map +1 -0
  273. package/lib/packlets/config/configInitFactory.js +303 -0
  274. package/lib/packlets/config/configInitFactory.js.map +1 -0
  275. package/lib/packlets/config/convert.d.ts +23 -0
  276. package/lib/packlets/config/convert.d.ts.map +1 -0
  277. package/lib/packlets/config/convert.js +93 -0
  278. package/lib/packlets/config/convert.js.map +1 -0
  279. package/lib/packlets/config/index.browser.d.ts +7 -0
  280. package/lib/packlets/config/index.browser.d.ts.map +1 -0
  281. package/lib/packlets/config/index.browser.js +74 -0
  282. package/lib/packlets/config/index.browser.js.map +1 -0
  283. package/lib/packlets/config/index.d.ts +7 -0
  284. package/lib/packlets/config/index.d.ts.map +1 -0
  285. package/lib/packlets/config/index.js +68 -0
  286. package/lib/packlets/config/index.js.map +1 -0
  287. package/lib/packlets/config/json.d.ts +20 -0
  288. package/lib/packlets/config/json.d.ts.map +1 -0
  289. package/lib/packlets/config/json.js +24 -0
  290. package/lib/packlets/config/json.js.map +1 -0
  291. package/lib/packlets/config/predefined/default.d.ts +57 -0
  292. package/lib/packlets/config/predefined/default.d.ts.map +1 -0
  293. package/lib/packlets/config/predefined/default.js +141 -0
  294. package/lib/packlets/config/predefined/default.js.map +1 -0
  295. package/lib/packlets/config/predefined/extended.d.ts +25 -0
  296. package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
  297. package/lib/packlets/config/predefined/extended.js +193 -0
  298. package/lib/packlets/config/predefined/extended.js.map +1 -0
  299. package/lib/packlets/config/predefined/index.d.ts +4 -0
  300. package/lib/packlets/config/predefined/index.d.ts.map +1 -0
  301. package/lib/packlets/config/predefined/index.js +62 -0
  302. package/lib/packlets/config/predefined/index.js.map +1 -0
  303. package/lib/packlets/config/systemConfiguration.d.ts +94 -0
  304. package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
  305. package/lib/packlets/config/systemConfiguration.js +152 -0
  306. package/lib/packlets/config/systemConfiguration.js.map +1 -0
  307. package/lib/packlets/context/contextDecls.d.ts.map +1 -0
  308. package/lib/packlets/context/contextDecls.js.map +1 -0
  309. package/lib/packlets/context/contextToken.d.ts.map +1 -0
  310. package/lib/packlets/context/contextToken.js.map +1 -0
  311. package/lib/packlets/context/convert/decls.d.ts.map +1 -0
  312. package/lib/packlets/context/convert/decls.js.map +1 -0
  313. package/lib/packlets/context/convert/index.d.ts.map +1 -0
  314. package/lib/packlets/context/convert/index.js.map +1 -0
  315. package/lib/packlets/context/index.d.ts.map +1 -0
  316. package/lib/packlets/context/index.js.map +1 -0
  317. package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -0
  318. package/lib/packlets/decisions/abstractDecision.js.map +1 -0
  319. package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -0
  320. package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -0
  321. package/lib/packlets/decisions/candidate.d.ts.map +1 -0
  322. package/lib/packlets/decisions/candidate.js.map +1 -0
  323. package/lib/packlets/decisions/common.d.ts.map +1 -0
  324. package/lib/packlets/decisions/common.js.map +1 -0
  325. package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -0
  326. package/lib/packlets/decisions/concreteDecision.js.map +1 -0
  327. package/lib/packlets/decisions/decision.d.ts +1 -1
  328. package/lib/packlets/decisions/decision.d.ts.map +1 -0
  329. package/lib/packlets/decisions/decision.js +1 -1
  330. package/lib/packlets/decisions/decision.js.map +1 -0
  331. package/lib/packlets/decisions/index.d.ts.map +1 -0
  332. package/lib/packlets/decisions/index.js.map +1 -0
  333. package/lib/packlets/import/fsItem.d.ts +1 -4
  334. package/lib/packlets/import/fsItem.d.ts.map +1 -0
  335. package/lib/packlets/import/fsItem.js +1 -4
  336. package/lib/packlets/import/fsItem.js.map +1 -0
  337. package/lib/packlets/import/importContext.d.ts +5 -5
  338. package/lib/packlets/import/importContext.d.ts.map +1 -0
  339. package/lib/packlets/import/importContext.js +3 -3
  340. package/lib/packlets/import/importContext.js.map +1 -0
  341. package/lib/packlets/import/importManager.d.ts +15 -1
  342. package/lib/packlets/import/importManager.d.ts.map +1 -0
  343. package/lib/packlets/import/importManager.js +7 -3
  344. package/lib/packlets/import/importManager.js.map +1 -0
  345. package/lib/packlets/import/importable.d.ts.map +1 -0
  346. package/lib/packlets/import/importable.js.map +1 -0
  347. package/lib/packlets/import/importers/collectionImporter.d.ts +2 -2
  348. package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -0
  349. package/lib/packlets/import/importers/collectionImporter.js +2 -2
  350. package/lib/packlets/import/importers/collectionImporter.js.map +1 -0
  351. package/lib/packlets/import/importers/fsItemImporter.d.ts +16 -2
  352. package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -0
  353. package/lib/packlets/import/importers/fsItemImporter.js +29 -13
  354. package/lib/packlets/import/importers/fsItemImporter.js.map +1 -0
  355. package/lib/packlets/import/importers/importer.d.ts.map +1 -0
  356. package/lib/packlets/import/importers/importer.js.map +1 -0
  357. package/lib/packlets/import/importers/index.browser.d.ts.map +1 -0
  358. package/lib/packlets/import/importers/index.browser.js.map +1 -0
  359. package/lib/packlets/import/importers/index.d.ts.map +1 -0
  360. package/lib/packlets/import/importers/index.js.map +1 -0
  361. package/lib/packlets/import/importers/jsonImporter.d.ts +2 -2
  362. package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -0
  363. package/lib/packlets/import/importers/jsonImporter.js +2 -2
  364. package/lib/packlets/import/importers/jsonImporter.js.map +1 -0
  365. package/lib/packlets/import/importers/pathImporter.d.ts +1 -1
  366. package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -0
  367. package/lib/packlets/import/importers/pathImporter.js +1 -1
  368. package/lib/packlets/import/importers/pathImporter.js.map +1 -0
  369. package/lib/packlets/import/index.browser.d.ts.map +1 -0
  370. package/lib/packlets/import/index.browser.js.map +1 -0
  371. package/lib/packlets/import/index.d.ts.map +1 -0
  372. package/lib/packlets/import/index.js.map +1 -0
  373. package/lib/packlets/qualifier-types/config/convert.d.ts +65 -0
  374. package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
  375. package/lib/packlets/qualifier-types/config/convert.js +161 -0
  376. package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
  377. package/lib/packlets/qualifier-types/config/index.d.ts +4 -0
  378. package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
  379. package/lib/packlets/qualifier-types/config/index.js +64 -0
  380. package/lib/packlets/qualifier-types/config/index.js.map +1 -0
  381. package/lib/packlets/qualifier-types/config/json.d.ts +91 -0
  382. package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
  383. package/lib/packlets/qualifier-types/config/json.js +35 -0
  384. package/lib/packlets/qualifier-types/config/json.js.map +1 -0
  385. package/lib/packlets/qualifier-types/convert.d.ts.map +1 -0
  386. package/lib/packlets/qualifier-types/convert.js.map +1 -0
  387. package/lib/packlets/qualifier-types/helpers.d.ts.map +1 -0
  388. package/lib/packlets/qualifier-types/helpers.js.map +1 -0
  389. package/lib/packlets/qualifier-types/index.d.ts.map +1 -0
  390. package/lib/packlets/qualifier-types/index.js.map +1 -0
  391. package/lib/packlets/qualifier-types/languageQualifierType.d.ts +6 -7
  392. package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -0
  393. package/lib/packlets/qualifier-types/languageQualifierType.js +6 -7
  394. package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -0
  395. package/lib/packlets/qualifier-types/literalQualifierType.d.ts +7 -10
  396. package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -0
  397. package/lib/packlets/qualifier-types/literalQualifierType.js +7 -10
  398. package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -0
  399. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
  400. package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
  401. package/lib/packlets/qualifier-types/qualifierType.d.ts +17 -18
  402. package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -0
  403. package/lib/packlets/qualifier-types/qualifierType.js +12 -13
  404. package/lib/packlets/qualifier-types/qualifierType.js.map +1 -0
  405. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -0
  406. package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
  407. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +8 -8
  408. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -0
  409. package/lib/packlets/qualifier-types/territoryQualifierType.js +5 -5
  410. package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
  411. package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -0
  412. package/lib/packlets/qualifiers/convert/decls.js.map +1 -0
  413. package/lib/packlets/qualifiers/convert/index.d.ts.map +1 -0
  414. package/lib/packlets/qualifiers/convert/index.js.map +1 -0
  415. package/lib/packlets/qualifiers/convert/qualifier.d.ts.map +1 -0
  416. package/lib/packlets/qualifiers/convert/qualifier.js.map +1 -0
  417. package/lib/packlets/qualifiers/index.d.ts.map +1 -0
  418. package/lib/packlets/qualifiers/index.js.map +1 -0
  419. package/lib/packlets/qualifiers/qualifier.d.ts +6 -7
  420. package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -0
  421. package/lib/packlets/qualifiers/qualifier.js +6 -7
  422. package/lib/packlets/qualifiers/qualifier.js.map +1 -0
  423. package/lib/packlets/qualifiers/qualifierCollector.d.ts +3 -3
  424. package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -0
  425. package/lib/packlets/qualifiers/qualifierCollector.js +2 -2
  426. package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -0
  427. package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -0
  428. package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -0
  429. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +1 -0
  430. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
  431. package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +1 -0
  432. package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
  433. package/lib/packlets/resource-json/compiled/common.d.ts.map +1 -0
  434. package/lib/packlets/resource-json/compiled/common.js.map +1 -0
  435. package/lib/packlets/resource-json/compiled/convert.d.ts.map +1 -0
  436. package/lib/packlets/resource-json/compiled/convert.js.map +1 -0
  437. package/lib/packlets/resource-json/compiled/index.d.ts.map +1 -0
  438. package/lib/packlets/resource-json/compiled/index.js.map +1 -0
  439. package/lib/packlets/resource-json/compiled/json.d.ts.map +1 -0
  440. package/lib/packlets/resource-json/compiled/json.js.map +1 -0
  441. package/lib/packlets/resource-json/convert.d.ts.map +1 -0
  442. package/lib/packlets/resource-json/convert.js.map +1 -0
  443. package/lib/packlets/resource-json/helpers.d.ts.map +1 -0
  444. package/lib/packlets/resource-json/helpers.js.map +1 -0
  445. package/lib/packlets/resource-json/index.d.ts.map +1 -0
  446. package/lib/packlets/resource-json/index.js.map +1 -0
  447. package/lib/packlets/resource-json/json.d.ts.map +1 -0
  448. package/lib/packlets/resource-json/json.js.map +1 -0
  449. package/lib/packlets/resource-json/normalized.d.ts.map +1 -0
  450. package/lib/packlets/resource-json/normalized.js.map +1 -0
  451. package/lib/packlets/resource-json/resourceDeclCollection.d.ts +1 -1
  452. package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -0
  453. package/lib/packlets/resource-json/resourceDeclCollection.js +1 -1
  454. package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -0
  455. package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -0
  456. package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -0
  457. package/lib/packlets/resource-json/resourceDeclTree.d.ts +1 -1
  458. package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -0
  459. package/lib/packlets/resource-json/resourceDeclTree.js +1 -1
  460. package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -0
  461. package/lib/packlets/resource-types/config/convert.d.ts +8 -0
  462. package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
  463. package/lib/packlets/resource-types/config/convert.js +38 -0
  464. package/lib/packlets/resource-types/config/convert.js.map +1 -0
  465. package/lib/packlets/resource-types/config/index.d.ts +4 -0
  466. package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
  467. package/lib/packlets/resource-types/config/index.js +64 -0
  468. package/lib/packlets/resource-types/config/index.js.map +1 -0
  469. package/lib/packlets/resource-types/config/json.d.ts +11 -0
  470. package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
  471. package/lib/packlets/resource-types/config/json.js +24 -0
  472. package/lib/packlets/resource-types/config/json.js.map +1 -0
  473. package/lib/packlets/resource-types/helpers.d.ts.map +1 -0
  474. package/lib/packlets/resource-types/helpers.js.map +1 -0
  475. package/lib/packlets/resource-types/index.d.ts.map +1 -0
  476. package/lib/packlets/resource-types/index.js.map +1 -0
  477. package/lib/packlets/resource-types/jsonResourceType.d.ts +17 -5
  478. package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -0
  479. package/lib/packlets/resource-types/jsonResourceType.js +2 -2
  480. package/lib/packlets/resource-types/jsonResourceType.js.map +1 -0
  481. package/lib/packlets/resource-types/resourceType.d.ts +5 -5
  482. package/lib/packlets/resource-types/resourceType.d.ts.map +1 -0
  483. package/lib/packlets/resource-types/resourceType.js +2 -2
  484. package/lib/packlets/resource-types/resourceType.js.map +1 -0
  485. package/lib/packlets/resource-types/resourceTypeCollector.d.ts.map +1 -0
  486. package/lib/packlets/resource-types/resourceTypeCollector.js.map +1 -0
  487. package/lib/packlets/resources/candidateReducer.d.ts.map +1 -0
  488. package/lib/packlets/resources/candidateReducer.js.map +1 -0
  489. package/lib/packlets/resources/candidateValue.d.ts.map +1 -0
  490. package/lib/packlets/resources/candidateValue.js.map +1 -0
  491. package/lib/packlets/resources/candidateValueCollector.d.ts.map +1 -0
  492. package/lib/packlets/resources/candidateValueCollector.js.map +1 -0
  493. package/lib/packlets/resources/common.d.ts.map +1 -0
  494. package/lib/packlets/resources/common.js.map +1 -0
  495. package/lib/packlets/resources/deltaGenerator.d.ts.map +1 -0
  496. package/lib/packlets/resources/deltaGenerator.js.map +1 -0
  497. package/lib/packlets/resources/index.d.ts.map +1 -0
  498. package/lib/packlets/resources/index.js.map +1 -0
  499. package/lib/packlets/resources/resource.d.ts.map +1 -0
  500. package/lib/packlets/resources/resource.js.map +1 -0
  501. package/lib/packlets/resources/resourceBuilder.d.ts +2 -2
  502. package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -0
  503. package/lib/packlets/resources/resourceBuilder.js +2 -2
  504. package/lib/packlets/resources/resourceBuilder.js.map +1 -0
  505. package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -0
  506. package/lib/packlets/resources/resourceCandidate.js.map +1 -0
  507. package/lib/packlets/resources/resourceManagerBuilder.d.ts +5 -5
  508. package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -0
  509. package/lib/packlets/resources/resourceManagerBuilder.js +5 -5
  510. package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -0
  511. package/lib/packlets/runtime/cacheListener.d.ts.map +1 -0
  512. package/lib/packlets/runtime/cacheListener.js.map +1 -0
  513. package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -0
  514. package/lib/packlets/runtime/cacheMetrics.js.map +1 -0
  515. package/lib/packlets/runtime/compiledResourceCollection.d.ts +5 -5
  516. package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -0
  517. package/lib/packlets/runtime/compiledResourceCollection.js +5 -5
  518. package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -0
  519. package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +1 -0
  520. package/lib/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
  521. package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +1 -0
  522. package/lib/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
  523. package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +1 -0
  524. package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
  525. package/lib/packlets/runtime/context/index.d.ts.map +1 -0
  526. package/lib/packlets/runtime/context/index.js.map +1 -0
  527. package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
  528. package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
  529. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
  530. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
  531. package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -0
  532. package/lib/packlets/runtime/iResourceManager.js.map +1 -0
  533. package/lib/packlets/runtime/index.d.ts.map +1 -0
  534. package/lib/packlets/runtime/index.js.map +1 -0
  535. package/lib/packlets/runtime/resource-tree/common.d.ts.map +1 -0
  536. package/lib/packlets/runtime/resource-tree/common.js.map +1 -0
  537. package/lib/packlets/runtime/resource-tree/index.d.ts.map +1 -0
  538. package/lib/packlets/runtime/resource-tree/index.js.map +1 -0
  539. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +1 -0
  540. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
  541. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +1 -0
  542. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
  543. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +1 -0
  544. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
  545. package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -0
  546. package/lib/packlets/runtime/resourceResolver.js.map +1 -0
  547. package/lib/packlets/runtime/resourceTreeResolver.d.ts.map +1 -0
  548. package/lib/packlets/runtime/resourceTreeResolver.js.map +1 -0
  549. package/lib/packlets/runtime/validate.d.ts.map +1 -0
  550. package/lib/packlets/runtime/validate.js.map +1 -0
  551. package/lib/packlets/zip-archive/convert.d.ts.map +1 -0
  552. package/lib/packlets/zip-archive/convert.js.map +1 -0
  553. package/lib/packlets/zip-archive/index.browser.d.ts.map +1 -0
  554. package/lib/packlets/zip-archive/index.browser.js.map +1 -0
  555. package/lib/packlets/zip-archive/index.d.ts.map +1 -0
  556. package/lib/packlets/zip-archive/index.js.map +1 -0
  557. package/lib/packlets/zip-archive/json.d.ts.map +1 -0
  558. package/lib/packlets/zip-archive/json.js.map +1 -0
  559. package/lib/packlets/zip-archive/types.d.ts.map +1 -0
  560. package/lib/packlets/zip-archive/types.js.map +1 -0
  561. package/lib/packlets/zip-archive/zipArchiveCreator.d.ts.map +1 -0
  562. package/lib/packlets/zip-archive/zipArchiveCreator.js.map +1 -0
  563. package/lib/packlets/zip-archive/zipArchiveFormat.d.ts.map +1 -0
  564. package/lib/packlets/zip-archive/zipArchiveFormat.js.map +1 -0
  565. package/lib/packlets/zip-archive/zipArchiveLoader.d.ts.map +1 -0
  566. package/lib/packlets/zip-archive/zipArchiveLoader.js.map +1 -0
  567. package/package.json +28 -26
  568. package/dist/test/data/sample.json +0 -32
  569. package/dist/test/unit/qualifier-types/testQualifierType.js +0 -76
  570. package/dist/test/unit/resource-types/testDerivedResourceType.js +0 -109
  571. package/dist/test/unit/resources/deltaGenerator.helpers.js +0 -282
@@ -117,19 +117,19 @@ export interface IQualifierTypeCreateParams {
117
117
  */
118
118
  export declare abstract class QualifierType<TCFGJSON extends JsonObject = JsonObject> implements IQualifierType<TCFGJSON> {
119
119
  /**
120
- * {@inheritdoc QualifierTypes.IQualifierType.name}
120
+ * {@inheritDoc QualifierTypes.IQualifierType.name}
121
121
  */
122
122
  readonly name: QualifierTypeName;
123
123
  /**
124
- * {@inheritdoc QualifierTypes.IQualifierType.systemTypeName}
124
+ * {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
125
125
  */
126
126
  abstract readonly systemTypeName: QualifierTypeName;
127
127
  /**
128
- * {@inheritdoc QualifierTypes.IQualifierType.key}
128
+ * {@inheritDoc QualifierTypes.IQualifierType.key}
129
129
  */
130
130
  get key(): QualifierTypeName;
131
131
  /**
132
- * {@inheritdoc QualifierTypes.IQualifierType.index}
132
+ * {@inheritDoc QualifierTypes.IQualifierType.index}
133
133
  */
134
134
  get index(): QualifierTypeIndex | undefined;
135
135
  protected readonly _collectible: Collections.Collectible<QualifierTypeName, QualifierTypeIndex>;
@@ -140,53 +140,52 @@ export declare abstract class QualifierType<TCFGJSON extends JsonObject = JsonOb
140
140
  readonly allowContextList: boolean;
141
141
  /**
142
142
  * Constructor for use by derived classes.
143
- * @param name - The name of the qualifier type.
144
- * @param allowContextList - Flag indicating whether this qualifier type allows a
145
- * comma-separated list of runtime values in the context. Defaults to `false`.
143
+ * @param params - The {@link QualifierTypes.IQualifierTypeCreateParams | create parameters}
144
+ * for this qualifier type.
146
145
  */
147
146
  protected constructor({ name, index, allowContextList }: IQualifierTypeCreateParams);
148
147
  /**
149
- * {@inheritdoc QualifierTypes.IQualifierType.isValidConditionValue}
148
+ * {@inheritDoc QualifierTypes.IQualifierType.isValidConditionValue}
150
149
  */
151
150
  abstract isValidConditionValue(value: string): value is QualifierConditionValue;
152
151
  /**
153
- * {@inheritdoc QualifierTypes.IQualifierType.isValidContextValue}
152
+ * {@inheritDoc QualifierTypes.IQualifierType.isValidContextValue}
154
153
  */
155
154
  isValidContextValue(value: string): value is QualifierContextValue;
156
155
  /**
157
- * {@inheritdoc QualifierTypes.IQualifierType.isPotentialMatch}
156
+ * {@inheritDoc QualifierTypes.IQualifierType.isPotentialMatch}
158
157
  */
159
158
  isPotentialMatch(conditionValue: string, contextValue: string): boolean;
160
159
  /**
161
- * {@inheritdoc QualifierTypes.IQualifierType.validateCondition}
160
+ * {@inheritDoc QualifierTypes.IQualifierType.validateCondition}
162
161
  */
163
162
  validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue>;
164
163
  /**
165
- * {@inheritdoc QualifierTypes.IQualifierType.validateContextValue}
164
+ * {@inheritDoc QualifierTypes.IQualifierType.validateContextValue}
166
165
  */
167
166
  validateContextValue(value: string): Result<QualifierContextValue>;
168
167
  /**
169
- * {@inheritdoc QualifierTypes.IQualifierType.matches}
168
+ * {@inheritDoc QualifierTypes.IQualifierType.matches}
170
169
  */
171
170
  matches(condition: QualifierConditionValue, context: QualifierContextValue, operator: ConditionOperator): QualifierMatchScore;
172
171
  /**
173
- * {@inheritdoc QualifierTypes.IQualifierType.getConfigurationJson}
172
+ * {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
174
173
  */
175
174
  abstract getConfigurationJson(): Result<JsonCompatibleType<Config.IQualifierTypeConfig<TCFGJSON>>>;
176
175
  /**
177
- * {@inheritdoc QualifierTypes.IQualifierType.validateConfigurationJson}
176
+ * {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
178
177
  */
179
178
  abstract validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config.IQualifierTypeConfig<TCFGJSON>>>;
180
179
  /**
181
- * {@inheritdoc QualifierTypes.IQualifierType.setIndex}
180
+ * {@inheritDoc QualifierTypes.IQualifierType.setIndex}
182
181
  */
183
182
  setIndex(index: number): Result<QualifierTypeIndex>;
184
183
  /**
185
- * {@inheritdoc Validate.isValidQualifierTypeName}
184
+ * {@inheritDoc Validate.isValidQualifierTypeName}
186
185
  */
187
186
  static isValidName(name: string): name is QualifierTypeName;
188
187
  /**
189
- * {@inheritdoc Validate.isValidQualifierTypeIndex}
188
+ * {@inheritDoc Validate.isValidQualifierTypeIndex}
190
189
  */
191
190
  static isValidIndex(index: number): index is QualifierTypeIndex;
192
191
  /**
@@ -0,0 +1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AQG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,CAC1B,SAAS,EAAE,uBAAuB,EAClC,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,iBAAiB,GAC1B,mBAAmB;IAEtB;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAClB,SAAS,EAAE,uBAAuB,EAClC,OAAO,EAAE,qBAAqB,EAAE,EAChC,QAAQ,EAAE,iBAAiB,GAC1B,mBAAmB;IAiBtB;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,qBAAqB,GAAG,qBAAqB,EAAE;CAGtF"}
@@ -31,22 +31,21 @@ const common_1 = require("../common");
31
31
  */
32
32
  class QualifierType {
33
33
  /**
34
- * {@inheritdoc QualifierTypes.IQualifierType.key}
34
+ * {@inheritDoc QualifierTypes.IQualifierType.key}
35
35
  */
36
36
  get key() {
37
37
  return this._collectible.key;
38
38
  }
39
39
  /**
40
- * {@inheritdoc QualifierTypes.IQualifierType.index}
40
+ * {@inheritDoc QualifierTypes.IQualifierType.index}
41
41
  */
42
42
  get index() {
43
43
  return this._collectible.index;
44
44
  }
45
45
  /**
46
46
  * Constructor for use by derived classes.
47
- * @param name - The name of the qualifier type.
48
- * @param allowContextList - Flag indicating whether this qualifier type allows a
49
- * comma-separated list of runtime values in the context. Defaults to `false`.
47
+ * @param params - The {@link QualifierTypes.IQualifierTypeCreateParams | create parameters}
48
+ * for this qualifier type.
50
49
  */
51
50
  constructor({ name, index, allowContextList }) {
52
51
  this.name = common_1.Convert.qualifierTypeName.convert(name).orThrow();
@@ -58,7 +57,7 @@ class QualifierType {
58
57
  });
59
58
  }
60
59
  /**
61
- * {@inheritdoc QualifierTypes.IQualifierType.isValidContextValue}
60
+ * {@inheritDoc QualifierTypes.IQualifierType.isValidContextValue}
62
61
  */
63
62
  isValidContextValue(value) {
64
63
  if (this.isValidConditionValue(value)) {
@@ -72,7 +71,7 @@ class QualifierType {
72
71
  return false;
73
72
  }
74
73
  /**
75
- * {@inheritdoc QualifierTypes.IQualifierType.isPotentialMatch}
74
+ * {@inheritDoc QualifierTypes.IQualifierType.isPotentialMatch}
76
75
  */
77
76
  isPotentialMatch(conditionValue, contextValue) {
78
77
  if (this.isValidConditionValue(conditionValue) && this.isValidContextValue(contextValue)) {
@@ -82,7 +81,7 @@ class QualifierType {
82
81
  return false;
83
82
  }
84
83
  /**
85
- * {@inheritdoc QualifierTypes.IQualifierType.validateCondition}
84
+ * {@inheritDoc QualifierTypes.IQualifierType.validateCondition}
86
85
  */
87
86
  validateCondition(value, operator) {
88
87
  operator = operator !== null && operator !== void 0 ? operator : 'matches';
@@ -97,7 +96,7 @@ class QualifierType {
97
96
  return (0, ts_utils_1.succeed)(value);
98
97
  }
99
98
  /**
100
- * {@inheritdoc QualifierTypes.IQualifierType.validateContextValue}
99
+ * {@inheritDoc QualifierTypes.IQualifierType.validateContextValue}
101
100
  */
102
101
  validateContextValue(value) {
103
102
  /* c8 ignore next 2 - functional error case tested but coverage intermittently missed */
@@ -107,7 +106,7 @@ class QualifierType {
107
106
  return (0, ts_utils_1.succeed)(value);
108
107
  }
109
108
  /**
110
- * {@inheritdoc QualifierTypes.IQualifierType.matches}
109
+ * {@inheritDoc QualifierTypes.IQualifierType.matches}
111
110
  */
112
111
  matches(condition, context, operator) {
113
112
  if (this.allowContextList) {
@@ -116,19 +115,19 @@ class QualifierType {
116
115
  return this._matchOne(condition, context, operator);
117
116
  }
118
117
  /**
119
- * {@inheritdoc QualifierTypes.IQualifierType.setIndex}
118
+ * {@inheritDoc QualifierTypes.IQualifierType.setIndex}
120
119
  */
121
120
  setIndex(index) {
122
121
  return this._collectible.setIndex(index);
123
122
  }
124
123
  /**
125
- * {@inheritdoc Validate.isValidQualifierTypeName}
124
+ * {@inheritDoc Validate.isValidQualifierTypeName}
126
125
  */
127
126
  static isValidName(name) {
128
127
  return common_1.Validate.isValidQualifierTypeName(name);
129
128
  }
130
129
  /**
131
- * {@inheritdoc Validate.isValidQualifierTypeIndex}
130
+ * {@inheritDoc Validate.isValidQualifierTypeIndex}
132
131
  */
133
132
  static isValidIndex(index) {
134
133
  return common_1.Validate.isValidQualifierTypeIndex(index);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifierType.js","sourceRoot":"","sources":["../../../src/packlets/qualifier-types/qualifierType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAiF;AACjF,sCAWmB;AAqInB;;;;GAIG;AACH,MAAsB,aAAa;IAajC;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACjC,CAAC;IAUD;;;;OAIG;IACH,YAAsB,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAA8B;QACjF,IAAI,CAAC,IAAI,GAAG,gBAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAC9D,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,KAAK,IAAI,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAW,CAAC,WAAW,CAAwC;YACrF,GAAG,EAAE,IAAI,CAAC,IAAI;YACd,KAAK,EAAE,KAAK;YACZ,cAAc,EAAE,gBAAO,CAAC,kBAAkB;SAC3C,CAAC,CAAC;IACL,CAAC;IAOD;;OAEG;IACI,mBAAmB,CAAC,KAAa;QACtC,IAAI,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,kFAAkF;YAClF,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC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AAG,OAAO,CAAC,MAAM,CAAC;QAC5C,IAAI,SAAS,GAAG,qBAAY,GAAG,gBAAgB,CAAC;QAEhD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YAC9D,IAAI,KAAK,GAAG,gBAAO,EAAE,CAAC;gBACpB,MAAM,QAAQ,GAAG,SAAS,GAAG,gBAAgB,GAAG,KAAK,CAAC;gBACtD,IAAI,iBAAQ,CAAC,0BAA0B,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAClD,OAAO,QAAQ,CAAC;gBAClB,CAAC;YACH,CAAC;YACD,SAAS,IAAI,gBAAgB,CAAC;QAChC,CAAC;QACD,OAAO,gBAAO,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACO,MAAM,CAAC,aAAa,CAAC,KAA4B;QACzD,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAA2B,CAAC,CAAC;IACxE,CAAC;CACF;AAnOD,sCAmOC","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 { Collections, ICollectible, Result, fail, succeed } from '@fgv/ts-utils';\nimport {\n ConditionOperator,\n Convert,\n NoMatch,\n PerfectMatch,\n QualifierConditionValue,\n QualifierContextValue,\n QualifierMatchScore,\n QualifierTypeIndex,\n QualifierTypeName,\n Validate\n} from '../common';\nimport { JsonCompatibleType, JsonObject } from '@fgv/ts-json-base';\nimport * as Config from './config';\n\n/**\n * Interface for a qualifier type. A qualifier type implements the build and\n * runtime semantics for some class of related qualifiers (e.g. language,\n * territories, etc).\n * @public\n */\nexport interface IQualifierType<TCFGJSON extends JsonObject = JsonObject>\n extends ICollectible<QualifierTypeName, QualifierTypeIndex> {\n /**\n * The name of the qualifier type.\n */\n readonly name: QualifierTypeName;\n\n /**\n * Name of the underlying system type.\n */\n readonly systemTypeName: QualifierTypeName;\n\n /**\n * Unique key for this qualifier.\n */\n readonly key: QualifierTypeName;\n\n /**\n * Global index for this qualifier type. Immutable once set, either at\n * construction or using {@link QualifierTypes.IQualifierType.setIndex | setIndex}.\n */\n readonly index: QualifierTypeIndex | undefined;\n\n /**\n * Validates a condition value for this qualifier type.\n * @param value - The string value to validate.\n * @returns `Success` with the {@link QualifierConditionValue | validated value}\n * if the value is valid for use in a condition, `Failure` with error details\n * otherwise.\n */\n isValidConditionValue(value: string): value is QualifierConditionValue;\n\n /**\n * Validates a context value for this qualifier type.\n * @param value - The string value to validate.\n * @returns `Success` with the {@link QualifierContextValue | validated value}\n * if the value is valid for use in a runtime context, `Failure` with error\n * details otherwise.\n */\n isValidContextValue(value: string): value is QualifierContextValue;\n\n /**\n * Determines if a supplied condition value is a potential match for a possible context value.\n * @param conditionValue - The condition value.\n * @param contextValue - The context value.\n * @returns `true` if the condition value is a potential match for the context value, `false` otherwise.\n */\n isPotentialMatch(conditionValue: string, contextValue: string): boolean;\n\n /**\n * Validates that a value and optional operator are valid for use in a condition\n * for qualifiers of this type.\n * @param value - The string value to validate.\n * @param operator - An optional operator to validate. Defaults to 'matches'.\n */\n validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue>;\n\n /**\n * Validates that a value is valid for use in a runtime context for qualifiers\n * of this type.\n * @param value - The string value to validate.\n * @returns `Success` with the {@link QualifierContextValue | validated value}\n * if the value is valid for use in a runtime context, `Failure` with error\n * details otherwise.\n */\n validateContextValue(value: string): Result<QualifierContextValue>;\n\n /**\n * Determines the extent to which a condition matches a context value for this\n * qualifier type.\n * @param condition - The condition value to evaluate.\n * @param context - The context value to evaluate.\n * @param operator - The operator to use in evaluating the match.\n * @returns a {@link QualifierMatchScore | score} indicating the extent to which\n * the condition matches the context value.\n */\n matches(\n condition: QualifierConditionValue,\n context: QualifierContextValue,\n operator: ConditionOperator\n ): QualifierMatchScore;\n\n /**\n * Sets the index for this qualifier type. Once set, index is immutable.\n */\n setIndex(index: number): Result<QualifierTypeIndex>;\n\n /**\n * Gets the configuration for this qualifier type.\n * @returns `Success` with the configuration if successful, `Failure` with an error message otherwise.\n */\n getConfigurationJson(): Result<JsonCompatibleType<Config.IQualifierTypeConfig<TCFGJSON>>>;\n\n /**\n * Validates configuration JSON data for this qualifier type.\n * @param from - The unknown data to validate as configuration JSON.\n * @returns `Success` with validated JSON configuration if valid, `Failure` with an error message otherwise.\n */\n validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config.IQualifierTypeConfig<TCFGJSON>>>;\n}\n\n/**\n * Parameters used to create a base {@link QualifierTypes.QualifierType | qualifier type}.\n * @public\n */\nexport interface IQualifierTypeCreateParams {\n /**\n * The name of the qualifier type. No default value.\n */\n name: string;\n\n /**\n * Global index for this qualifier type.\n */\n index?: number;\n\n /**\n * Flag indicating whether this qualifier type allows a list of values in a context.\n * Defaults to `false`.\n */\n allowContextList?: boolean;\n}\n\n/**\n * Abstract base class for qualifier types. Provides default implementations for\n * the {@link QualifierTypes.IQualifierType | IQualifierType} interface.\n * @public\n */\nexport abstract class QualifierType<TCFGJSON extends JsonObject = JsonObject>\n implements IQualifierType<TCFGJSON>\n{\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.name}\n */\n public readonly name: QualifierTypeName;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}\n */\n public abstract readonly systemTypeName: QualifierTypeName;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.key}\n */\n public get key(): QualifierTypeName {\n return this._collectible.key;\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.index}\n */\n public get index(): QualifierTypeIndex | undefined {\n return this._collectible.index;\n }\n\n protected readonly _collectible: Collections.Collectible<QualifierTypeName, QualifierTypeIndex>;\n\n /**\n * Flag indicating whether this qualifier type allows a list of values in a context.\n * @public\n */\n public readonly allowContextList: boolean;\n\n /**\n * Constructor for use by derived classes.\n * @param params - The {@link QualifierTypes.IQualifierTypeCreateParams | create parameters}\n * for this qualifier type.\n */\n protected constructor({ name, index, allowContextList }: IQualifierTypeCreateParams) {\n this.name = Convert.qualifierTypeName.convert(name).orThrow();\n this.allowContextList = allowContextList === true;\n this._collectible = new Collections.Collectible<QualifierTypeName, QualifierTypeIndex>({\n key: this.name,\n index: index,\n indexConverter: Convert.qualifierTypeIndex\n });\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.isValidConditionValue}\n */\n public abstract isValidConditionValue(value: string): value is QualifierConditionValue;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.isValidContextValue}\n */\n public isValidContextValue(value: string): value is QualifierContextValue {\n if (this.isValidConditionValue(value)) {\n return true;\n }\n if (this.allowContextList) {\n /* c8 ignore next 1 - functional code tested but coverage intermittently missed */\n return value.split(',').every((v) => this.isValidConditionValue(v.trim()));\n }\n /* c8 ignore next 1 - functional code tested but coverage intermittently missed */\n return false;\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.isPotentialMatch}\n */\n public isPotentialMatch(conditionValue: string, contextValue: string): boolean {\n if (this.isValidConditionValue(conditionValue) && this.isValidContextValue(contextValue)) {\n return this._matchOne(conditionValue, contextValue, 'matches') !== NoMatch;\n }\n /* c8 ignore next 2 - functional code tested but coverage intermittently missed */\n return false;\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.validateCondition}\n */\n public validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue> {\n operator = operator ?? 'matches';\n /* c8 ignore next 2 - functional error case tested but coverage intermittently missed */\n if (operator !== 'matches') {\n return fail(`${operator}: invalid condition operator`);\n /* c8 ignore next 2 - functional error case tested but coverage intermittently missed */\n } else if (!this.isValidConditionValue(value)) {\n return fail(`${value}: invalid condition value for qualifierType ${this.name}`);\n }\n return succeed(value);\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.validateContextValue}\n */\n public validateContextValue(value: string): Result<QualifierContextValue> {\n /* c8 ignore next 2 - functional error case tested but coverage intermittently missed */\n if (!this.isValidContextValue(value)) {\n return fail(`${value}: invalid context value for qualifierType ${this.name}`);\n }\n return succeed(value);\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.matches}\n */\n public matches(\n condition: QualifierConditionValue,\n context: QualifierContextValue,\n operator: ConditionOperator\n ): QualifierMatchScore {\n if (this.allowContextList) {\n return this._matchList(condition, QualifierType._splitContext(context), operator);\n }\n return this._matchOne(condition, context, operator);\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}\n */\n public abstract getConfigurationJson(): Result<JsonCompatibleType<Config.IQualifierTypeConfig<TCFGJSON>>>;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}\n */\n public abstract validateConfigurationJson(\n from: unknown\n ): Result<JsonCompatibleType<Config.IQualifierTypeConfig<TCFGJSON>>>;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.setIndex}\n */\n public setIndex(index: number): Result<QualifierTypeIndex> {\n return this._collectible.setIndex(index);\n }\n\n /**\n * {@inheritDoc Validate.isValidQualifierTypeName}\n */\n public static isValidName(name: string): name is QualifierTypeName {\n return Validate.isValidQualifierTypeName(name);\n }\n\n /**\n * {@inheritDoc Validate.isValidQualifierTypeIndex}\n */\n public static isValidIndex(index: number): index is QualifierTypeIndex {\n return Validate.isValidQualifierTypeIndex(index);\n }\n\n /**\n * Compares two qualifier types by index.\n * @param t1 - The first qualifier type to compare.\n * @param t2 - The second qualifier type to compare.\n * @returns a number indicating the relative order of the two qualifier types.\n */\n public static compare(t1: QualifierType, t2: QualifierType): number {\n const i1 = t1._collectible.index ?? -1;\n const i2 = t2._collectible.index ?? -1;\n let diff = i1 - i2;\n\n if (diff === 0) {\n diff = t1.name.localeCompare(t2.name);\n }\n\n return diff;\n }\n\n /**\n * Matches a single condition value against a single context value.\n * @param condition - The {@link QualifierConditionValue | condition value} to match.\n * @param context - The {@link QualifierContextValue | context value} to match.\n * @param operator - The {@link ConditionOperator | operator} to use in the match.\n * @returns a {@link QualifierMatchScore | score} indicating the extent to which\n * the condition matches the context value.\n * @public\n */\n protected abstract _matchOne(\n condition: QualifierConditionValue,\n context: QualifierContextValue,\n operator: ConditionOperator\n ): QualifierMatchScore;\n\n /**\n * Matches a single condition value against a list of context values.\n * @param condition - The {@link QualifierConditionValue | condition value} to match.\n * @param context - The comma-separated list of {@link QualifierContextValue | context values} to match.\n * @param operator - The {@link ConditionOperator | operator} to use in the match.\n * @returns a {@link QualifierMatchScore | score} indicating the extent to which\n * the condition matches the context value.\n * @public\n */\n protected _matchList(\n condition: QualifierConditionValue,\n context: QualifierContextValue[],\n operator: ConditionOperator\n ): QualifierMatchScore {\n const scorePerPosition = 1 / context.length;\n let baseScore = PerfectMatch - scorePerPosition;\n\n for (let i = 0; i < context.length; i++) {\n const score = this._matchOne(condition, context[i], operator);\n if (score > NoMatch) {\n const adjusted = baseScore + scorePerPosition * score;\n if (Validate.isValidQualifierMatchScore(adjusted)) {\n return adjusted;\n }\n }\n baseScore -= scorePerPosition;\n }\n return NoMatch;\n }\n\n /**\n * Splits a comma-separated {@link QualifierContextValue | context value} into an\n * array of individual values.\n * @param value - The value to split.\n * @returns an array of individual context values.\n * @public\n */\n protected static _splitContext(value: QualifierContextValue): QualifierContextValue[] {\n return value.split(',').map((s) => s.trim() as QualifierContextValue);\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifierTypeCollector.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifier-types/qualifierTypeCollector.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,WAAW,EACX,MAAM,EACN,6BAA6B,EAI9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;OAGG;IACH,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,6BAA6B,CAAC,aAAa,EAAE,aAAa,CAAC;IACrG;;;;OAIG;IACH,SAAS,aAAa,EAAE,cAAc,EAAE,EAAE,mCAAmC;IAe7E;;;;;OAKG;WACW,MAAM,CAAC,MAAM,CAAC,EAAE,mCAAmC,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAMlG,SAAS,CAAC,MAAM,CAAC,qBAAqB,CACpC,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,GACnB,MAAM,CAAC,aAAa,CAAC;IAIxB,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC;CAGxE;AAED;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,WAAW,CAAC,4BAA4B,CAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifierTypeCollector.js","sourceRoot":"","sources":["../../../src/packlets/qualifier-types/qualifierTypeCollector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,kDAAoC;AACpC,4CAOuB;AACvB,mDAAgD;AAehD;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,wCAA2D;IACrG;;;;OAIG;IACH,YAAsB,EAAE,cAAc,EAAuC;QAC3E,KAAK,CAAC;YACJ,UAAU,EAAE,IAAI,sBAAW,CAAC,kBAAkB,CAAC;gBAC7C,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,iBAAiB;gBACrC,KAAK,EAAE,sBAAsB,CAAC,gBAAgB;aAC/C,CAAC;YACF,OAAO,EAAE,sBAAsB,CAAC,qBAAqB;SACtD,CAAC,CAAC;QAEH,yEAAyE;QACzE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;YAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,MAAM,CAAC,MAA4C;QAC/D,yEAAyE;QACzE,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;QACtB,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjE,CAAC;IAES,MAAM,CAAC,qBAAqB,CACpC,GAAsB,EACtB,KAAa,EACb,KAAoB;QAEpB,OAAO,IAAA,kBAAO,EAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAES,MAAM,CAAC,gBAAgB,CAAC,IAAa;QAC7C,OAAO,IAAI,YAAY,6BAAa,CAAC,CAAC,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,eAAI,EAAC,qBAAqB,CAAC,CAAC;IACrF,CAAC;CACF;AA5CD,wDA4CC","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 Common from '../common';\nimport {\n Collections,\n Result,\n ValidatingConvertingCollector,\n captureResult,\n fail,\n succeed\n} from '@fgv/ts-utils';\nimport { QualifierType } from './qualifierType';\nimport { QualifierTypeName } from '../common';\n\n/**\n * Parameters for creating a new {@link QualifierTypes.QualifierTypeCollector | QualifierTypeCollector}.\n * @public\n */\nexport interface IQualifierTypeCollectorCreateParams {\n /**\n * Optional list of {@link QualifierTypes.QualifierType | QualifierTypes} to add to the collector\n * on creation.\n */\n qualifierTypes?: QualifierType[];\n}\n\n/**\n * Collector for {@link QualifierTypes.QualifierType | QualifierType} objects.\n * @public\n */\nexport class QualifierTypeCollector extends ValidatingConvertingCollector<QualifierType, QualifierType> {\n /**\n * Constructor for a {@link QualifierTypes.QualifierTypeCollector | QualifierTypeCollector} object.\n * @param params - Optional {@link QualifierTypes.IQualifierTypeCollectorCreateParams | parameters}\n * used to construct the collector.\n */\n protected constructor({ qualifierTypes }: IQualifierTypeCollectorCreateParams) {\n super({\n converters: new Collections.KeyValueConverters({\n key: Common.Convert.qualifierTypeName,\n value: QualifierTypeCollector._toQualifierType\n }),\n factory: QualifierTypeCollector._qualifierTypeFactory\n });\n\n /* c8 ignore next 1 - coverage seems to intermittently miss the branch */\n qualifierTypes?.forEach((qt) => {\n this.add(qt).orThrow();\n });\n }\n\n /**\n * Creates a new {@link QualifierTypes.QualifierTypeCollector | QualifierTypeCollector} object.\n * @param params - Optional {@link QualifierTypes.IQualifierTypeCollectorCreateParams | parameters}\n * used to create the collector.\n * @returns `Success` with the new collector if successful, or `Failure` if not.\n */\n public static create(params?: IQualifierTypeCollectorCreateParams): Result<QualifierTypeCollector> {\n /* c8 ignore next 1 - coverage seems to miss the branch intermittently */\n params = params ?? {};\n return captureResult(() => new QualifierTypeCollector(params));\n }\n\n protected static _qualifierTypeFactory(\n key: QualifierTypeName,\n index: number,\n value: QualifierType\n ): Result<QualifierType> {\n return succeed(value);\n }\n\n protected static _toQualifierType(from: unknown): Result<QualifierType> {\n return from instanceof QualifierType ? succeed(from) : fail('not a QualifierType');\n }\n}\n\n/**\n * Interface exposing non-mutating members of a\n * {@link QualifierTypes.QualifierTypeCollector | QualifierTypeCollector}.\n * @public\n */\nexport type ReadOnlyQualifierTypeCollector = Collections.IReadOnlyValidatingCollector<QualifierType>;\n"]}
@@ -10,15 +10,15 @@ import { JsonCompatibleType } from '@fgv/ts-json-base';
10
10
  */
11
11
  export interface ITerritoryQualifierTypeCreateParams {
12
12
  /**
13
- * {@inheritdoc QualifierTypes.IQualifierTypeCreateParams.name}
13
+ * {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.name}
14
14
  */
15
15
  name?: string;
16
16
  /**
17
- * {@inheritdoc QualifierTypes.IQualifierTypeCreateParams.allowContextList}
17
+ * {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.allowContextList}
18
18
  */
19
19
  allowContextList?: boolean;
20
20
  /**
21
- * {@inheritdoc QualifierTypes.IQualifierTypeCreateParams.index}
21
+ * {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.index}
22
22
  */
23
23
  index?: number;
24
24
  /**
@@ -44,7 +44,7 @@ export interface ITerritoryQualifierTypeCreateParams {
44
44
  */
45
45
  export declare class TerritoryQualifierType extends QualifierType<JsonCompatibleType<Config.ITerritoryQualifierTypeConfig>> {
46
46
  /**
47
- * {@inheritdoc QualifierTypes.IQualifierType.systemTypeName}
47
+ * {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
48
48
  */
49
49
  readonly systemTypeName: QualifierTypeName;
50
50
  /**
@@ -67,7 +67,7 @@ export declare class TerritoryQualifierType extends QualifierType<JsonCompatible
67
67
  */
68
68
  protected constructor({ acceptLowercase, allowedTerritories, allowContextList, name, index, hierarchy }: ITerritoryQualifierTypeCreateParams);
69
69
  /**
70
- * {@inheritdoc QualifierTypes.QualifierType.isValidConditionValue}
70
+ * {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}
71
71
  */
72
72
  isValidConditionValue(value: string): value is QualifierConditionValue;
73
73
  /**
@@ -95,11 +95,11 @@ export declare class TerritoryQualifierType extends QualifierType<JsonCompatible
95
95
  */
96
96
  getConfiguration(): Result<Config.ISystemTerritoryQualifierTypeConfig>;
97
97
  /**
98
- * {@inheritdoc QualifierTypes.IQualifierType.getConfigurationJson}
98
+ * {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
99
99
  */
100
100
  getConfigurationJson(): Result<JsonCompatibleType<Config.ISystemTerritoryQualifierTypeConfig>>;
101
101
  /**
102
- * {@inheritdoc QualifierTypes.IQualifierType.validateConfigurationJson}
102
+ * {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
103
103
  */
104
104
  validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config.ISystemTerritoryQualifierTypeConfig>>;
105
105
  /**
@@ -110,7 +110,7 @@ export declare class TerritoryQualifierType extends QualifierType<JsonCompatible
110
110
  */
111
111
  validateConfiguration(from: unknown): Result<Config.ISystemTerritoryQualifierTypeConfig>;
112
112
  /**
113
- * {@inheritdoc QualifierTypes.QualifierType._matchOne}
113
+ * {@inheritDoc QualifierTypes.QualifierType._matchOne}
114
114
  */
115
115
  protected _matchOne(condition: QualifierConditionValue, context: QualifierContextValue, __operator?: ConditionOperator): QualifierMatchScore;
116
116
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"territoryQualifierType.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifier-types/territoryQualifierType.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAiB,MAAM,EAA6B,MAAM,eAAe,CAAC;AACjF,OAAO,EAIL,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EAEnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAkC,MAAM,mBAAmB,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,SAAS,CAAC,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CAAmC,CAAC;IAM/F;;OAEG;IACH,SAAS,CAAC,SAAS,CACjB,SAAS,EAAE,uBAAuB,EAClC,OAAO,EAAE,qBAAqB,EAC9B,UAAU,CAAC,EAAE,iBAAiB,GAC7B,mBAAmB;IAsBtB;;;;;;;OAOG;WACW,8BAA8B,CAC1C,KAAK,EAAE,MAAM,EACb,eAAe,CAAC,EAAE,OAAO,GACxB,KAAK,IAAI,uBAAuB;IAQnC;;;;;;;;OAQG;WACW,yBAAyB,CACrC,KAAK,EAAE,MAAM,EACb,eAAe,CAAC,EAAE,OAAO,GACxB,MAAM,CAAC,uBAAuB,CAAC;CAMnC"}
@@ -86,7 +86,7 @@ class TerritoryQualifierType extends qualifierType_1.QualifierType {
86
86
  index: validIndex
87
87
  });
88
88
  /**
89
- * {@inheritdoc QualifierTypes.IQualifierType.systemTypeName}
89
+ * {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
90
90
  */
91
91
  this.systemTypeName = common_1.Convert.qualifierTypeName
92
92
  .convert('territory')
@@ -102,7 +102,7 @@ class TerritoryQualifierType extends qualifierType_1.QualifierType {
102
102
  }
103
103
  }
104
104
  /**
105
- * {@inheritdoc QualifierTypes.QualifierType.isValidConditionValue}
105
+ * {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}
106
106
  */
107
107
  isValidConditionValue(value) {
108
108
  const normalized = this.acceptLowercase ? value.toUpperCase() : value;
@@ -156,7 +156,7 @@ class TerritoryQualifierType extends qualifierType_1.QualifierType {
156
156
  return this.getConfigurationJson().onSuccess((json) => Config.Convert.systemTerritoryQualifierTypeConfig.convert(json));
157
157
  }
158
158
  /**
159
- * {@inheritdoc QualifierTypes.IQualifierType.getConfigurationJson}
159
+ * {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
160
160
  */
161
161
  getConfigurationJson() {
162
162
  const hierarchy = this.hierarchy ? { hierarchy: this.hierarchy.asRecord() } : {};
@@ -170,7 +170,7 @@ class TerritoryQualifierType extends qualifierType_1.QualifierType {
170
170
  });
171
171
  }
172
172
  /**
173
- * {@inheritdoc QualifierTypes.IQualifierType.validateConfigurationJson}
173
+ * {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
174
174
  */
175
175
  validateConfigurationJson(from) {
176
176
  return Config.Convert.systemTerritoryQualifierTypeConfig.convert(from);
@@ -185,7 +185,7 @@ class TerritoryQualifierType extends qualifierType_1.QualifierType {
185
185
  return this.validateConfigurationJson(from).onSuccess((json) => Config.Convert.systemTerritoryQualifierTypeConfig.convert(json));
186
186
  }
187
187
  /**
188
- * {@inheritdoc QualifierTypes.QualifierType._matchOne}
188
+ * {@inheritDoc QualifierTypes.QualifierType._matchOne}
189
189
  */
190
190
  _matchOne(condition, context, __operator) {
191
191
  if (this.isValidConditionValue(condition) && this.isValidContextValue(context)) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"territoryQualifierType.js","sourceRoot":"","sources":["../../../src/packlets/qualifier-types/territoryQualifierType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAAiF;AACjF,sCAUmB;AACnB,mDAAgD;AAChD,mEAAgE;AAChE,iDAAmC;AACnC,oDAAuF;AAwCvF;;;;;GAKG;AACH,MAAa,sBAAuB,SAAQ,6BAE3C;IAyBC;;;OAGG;IACH,YAAsB,EACpB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,IAAI,EACJ,KAAK,EACL,SAAS,EAC2B;QACpC,yEAAyE;QACzE,IAAI,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,WAAW,CAAC;QAC3B,MAAM,UAAU,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACzG,MAAM,gBAAgB,GACpB,kBAAkB,KAAK,SAAS;YAC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jB,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,8BAA8B,CAC1C,KAAa,EACb,eAAyB;QAEzB,qEAAqE;QACrE,IAAI,eAAe,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YAC9D,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,iBAAQ,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,yBAAyB,CACrC,KAAa,EACb,eAAyB;QAEzB,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QACvC,OAAO,sBAAsB,CAAC,8BAA8B,CAAC,UAAU,EAAE,eAAe,CAAC;YACvF,CAAC,CAAC,IAAA,kBAAO,EAAC,UAAU,CAAC;YACrB,CAAC,CAAC,IAAA,eAAI,EAAC,GAAG,KAAK,0BAA0B,CAAC,CAAC;IAC/C,CAAC;CACF;AA5OD,wDA4OC","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 { captureResult, Result, fail, succeed, mapResults } from '@fgv/ts-utils';\nimport {\n Convert,\n NoMatch,\n PerfectMatch,\n QualifierConditionValue,\n QualifierContextValue,\n QualifierMatchScore,\n Validate,\n ConditionOperator,\n QualifierTypeName\n} from '../common';\nimport { QualifierType } from './qualifierType';\nimport { LiteralValueHierarchy } from './literalValueHierarchy';\nimport * as Config from './config';\nimport { JsonCompatibleType, JsonObject, sanitizeJsonObject } from '@fgv/ts-json-base';\n\n/**\n * Parameters used to create a new {@link QualifierTypes.TerritoryQualifierType | TerritoryQualifierType} instance.\n * @public\n */\nexport interface ITerritoryQualifierTypeCreateParams {\n /**\n * {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.name}\n */\n name?: string;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.allowContextList}\n */\n allowContextList?: boolean;\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.index}\n */\n index?: number;\n\n /**\n * Optional array enumerating allowed territories to further constrain the type.\n */\n allowedTerritories?: string[];\n\n /**\n * Flag indicating whether the qualifier type should accept lowercase territory codes.\n * Defaults to `false`.\n */\n acceptLowercase?: boolean;\n\n /**\n * Optional {@link QualifierTypes.Config.LiteralValueHierarchyDecl | hierarchy declaration}\n * of territory values to use for matching. If not provided, no hierarchy will be used.\n */\n hierarchy?: Config.LiteralValueHierarchyDecl<string>;\n}\n\n/**\n * Qualifier type for territory values. Territories are two-letter ISO-3166-2\n * Alpha-2 country codes. Canonical territory codes are uppercase, but this\n * implementation handles incorrect casing.\n * @public\n */\nexport class TerritoryQualifierType extends QualifierType<\n JsonCompatibleType<Config.ITerritoryQualifierTypeConfig>\n> {\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}\n */\n public readonly systemTypeName: QualifierTypeName = Convert.qualifierTypeName\n .convert('territory')\n .orThrow();\n\n /**\n * Optional array enumerating allowed territories to further constrain the type.\n */\n public readonly allowedTerritories?: ReadonlyArray<QualifierConditionValue>;\n\n /**\n * Flag indicating whether the qualifier type should accept lowercase territory codes.\n * Defaults to `false`.\n */\n public readonly acceptLowercase: boolean;\n\n /**\n * Optional {@link QualifierTypes.LiteralValueHierarchy | hierarchy} of territory\n * values to use for matching. If not provided, no hierarchy will be used.\n */\n public readonly hierarchy?: LiteralValueHierarchy<string>;\n\n /**\n * Creates a new {@link QualifierTypes.TerritoryQualifierType | TerritoryQualifierType} instance.\n * @public\n */\n protected constructor({\n acceptLowercase,\n allowedTerritories,\n allowContextList,\n name,\n index,\n hierarchy\n }: ITerritoryQualifierTypeCreateParams) {\n /* c8 ignore next 7 - coverage seems to be missing coalescing branches */\n name = name ?? 'territory';\n const validIndex = index !== undefined ? Convert.qualifierTypeIndex.convert(index).orThrow() : undefined;\n const validTerritories =\n allowedTerritories !== undefined\n ? mapResults(\n allowedTerritories.map((t) => TerritoryQualifierType.toTerritoryConditionValue(t.toUpperCase()))\n ).orThrow()\n : undefined;\n\n allowContextList = allowContextList === true;\n super({\n name: name,\n allowContextList,\n index: validIndex\n });\n this.allowedTerritories = validTerritories;\n this.acceptLowercase = acceptLowercase === true;\n\n if (hierarchy) {\n /* c8 ignore next 5 - defensive coding: allowedTerritories ?? [] fallback enables open values mode */\n this.hierarchy = LiteralValueHierarchy.create({\n values: allowedTerritories ?? [],\n hierarchy: hierarchy\n }).orThrow();\n }\n }\n\n /**\n * {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}\n */\n public isValidConditionValue(value: string): value is QualifierConditionValue {\n const normalized = this.acceptLowercase ? value.toUpperCase() : value;\n\n /* c8 ignore next 6 - edge case: invalid territory values and allowed territory filtering rarely hit */\n if (!TerritoryQualifierType.isValidTerritoryConditionValue(normalized)) {\n return false;\n }\n if (this.allowedTerritories !== undefined) {\n return this.allowedTerritories.includes(normalized);\n }\n return true;\n }\n\n /**\n * Creates a new {@link QualifierTypes.TerritoryQualifierType | TerritoryQualifierType} instance.\n * @param params - Optional {@link QualifierTypes.ITerritoryQualifierTypeCreateParams | parameters}\n * to use when creating the instance.\n * @returns `Success` with the new {@link QualifierTypes.TerritoryQualifierType | TerritoryQualifierType}\n * if successful, `Failure` with an error message otherwise.\n * @public\n */\n public static create(params?: ITerritoryQualifierTypeCreateParams): Result<TerritoryQualifierType> {\n /* c8 ignore next 1 - coverage having problems with conditional branches */\n params = params ?? {};\n return captureResult(() => new TerritoryQualifierType(params));\n }\n\n /**\n * Creates a new {@link QualifierTypes.TerritoryQualifierType | TerritoryQualifierType} from a configuration object.\n * @param config - The {@link QualifierTypes.Config.IQualifierTypeConfig | configuration object} containing\n * the name, systemType, and optional territory-specific configuration including allowed territories and hierarchy.\n * @returns `Success` with the new {@link QualifierTypes.TerritoryQualifierType | TerritoryQualifierType}\n * if successful, `Failure` with an error message otherwise.\n * @public\n */\n public static createFromConfig(\n config: Config.IQualifierTypeConfig<Config.ITerritoryQualifierTypeConfig>\n ): Result<TerritoryQualifierType> {\n const territoryConfig = config.configuration ?? {};\n return sanitizeJsonObject<ITerritoryQualifierTypeCreateParams>({\n name: config.name,\n allowContextList: territoryConfig.allowContextList === true,\n allowedTerritories: territoryConfig.allowedTerritories,\n acceptLowercase: territoryConfig.acceptLowercase === true,\n hierarchy: territoryConfig.hierarchy\n }).onSuccess(TerritoryQualifierType.create);\n }\n\n /**\n * Gets the {@link QualifierTypes.Config.ISystemTerritoryQualifierTypeConfig | strongly typed configuration}\n * for this qualifier type.\n * @returns `Success` with the configuration if successful, `Failure` with an error message otherwise.\n */\n public getConfiguration(): Result<Config.ISystemTerritoryQualifierTypeConfig> {\n return this.getConfigurationJson().onSuccess((json) =>\n Config.Convert.systemTerritoryQualifierTypeConfig.convert(json)\n );\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}\n */\n public getConfigurationJson(): Result<JsonCompatibleType<Config.ISystemTerritoryQualifierTypeConfig>> {\n const hierarchy: JsonObject = this.hierarchy ? { hierarchy: this.hierarchy.asRecord() } : {};\n const allowedTerritories: JsonObject = this.allowedTerritories\n ? { allowedTerritories: [...this.allowedTerritories] }\n : {};\n return succeed({\n name: this.name,\n systemType: 'territory' as const,\n configuration: {\n allowContextList: this.allowContextList,\n acceptLowercase: this.acceptLowercase,\n ...allowedTerritories,\n ...hierarchy\n }\n });\n }\n\n /**\n * {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}\n */\n public validateConfigurationJson(\n from: unknown\n ): Result<JsonCompatibleType<Config.ISystemTerritoryQualifierTypeConfig>> {\n return Config.Convert.systemTerritoryQualifierTypeConfig.convert(from);\n }\n\n /**\n * Validates a {@link QualifierTypes.Config.ISystemTerritoryQualifierTypeConfig | strongly typed configuration object}\n * for this qualifier type.\n * @param from - The unknown data to validate as a configuration object.\n * @returns `Success` with the validated configuration if successful, `Failure` with an error message otherwise.\n */\n public validateConfiguration(from: unknown): Result<Config.ISystemTerritoryQualifierTypeConfig> {\n return this.validateConfigurationJson(from).onSuccess((json) =>\n Config.Convert.systemTerritoryQualifierTypeConfig.convert(json)\n );\n }\n\n /**\n * {@inheritDoc QualifierTypes.QualifierType._matchOne}\n */\n protected _matchOne(\n condition: QualifierConditionValue,\n context: QualifierContextValue,\n __operator?: ConditionOperator\n ): QualifierMatchScore {\n if (this.isValidConditionValue(condition) && this.isValidContextValue(context)) {\n // Normalize to uppercase for territory codes\n const normalizedCondition = condition.toUpperCase();\n const normalizedContext = context.toUpperCase() as QualifierContextValue;\n\n if (normalizedCondition === normalizedContext) {\n return PerfectMatch;\n }\n\n /* c8 ignore next 8 - edge case: hierarchy matching and fallback logic rarely used */\n if (this.hierarchy) {\n return this.hierarchy.match(\n normalizedCondition as QualifierConditionValue,\n normalizedContext as QualifierContextValue,\n __operator\n );\n }\n }\n return NoMatch;\n }\n\n /**\n * Determines whether a value is a valid condition value for a territory qualifier.\n * @param value - The value to validate.\n * @param acceptLowercase - Flag indicating whether the qualifier type should accept lowercase territory codes.\n * Defaults to `false`.\n * @returns `true` if the value is a valid condition value, `false` otherwise.\n * @public\n */\n public static isValidTerritoryConditionValue(\n value: string,\n acceptLowercase?: boolean\n ): value is QualifierConditionValue {\n /* c8 ignore next 3 - edge case: lowercase validation rarely fails */\n if (acceptLowercase !== true && value !== value.toUpperCase()) {\n return false;\n }\n return Validate.RegularExpressions.territoryCode.test(value.toUpperCase());\n }\n\n /**\n * Converts a string value to a territory condition value.\n * @param value - The value to convert.\n * @param acceptLowercase - Flag indicating whether the qualifier type should accept lowercase territory codes.\n * Defaults to `false`.\n * @returns `Success` with the converted value if successful, `Failure` with an error\n * message otherwise.\n * @public\n */\n public static toTerritoryConditionValue(\n value: string,\n acceptLowercase?: boolean\n ): Result<QualifierConditionValue> {\n const normalized = value.toUpperCase();\n return TerritoryQualifierType.isValidTerritoryConditionValue(normalized, acceptLowercase)\n ? succeed(normalized)\n : fail(`${value}: invalid territory code`);\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decls.d.ts","sourceRoot":"","sources":["../../../../src/packlets/qualifiers/convert/decls.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAIvE;;;GAGG;AACH,eAAO,MAAM,aAAa,kEAOxB,CAAC;AAEH;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,cAAc,EAAE,8BAA8B,CAAC;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,0FAgCjC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decls.js","sourceRoot":"","sources":["../../../../src/packlets/qualifiers/convert/decls.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;G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WAAC,OAAA,iBAAQ,CAAC,eAAe,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,IAAI,CAAC,IAAI,CAAC,CAAA,EAAA;gBAC9D,eAAe,EAAE,GAAG,EAAE,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,eAAe,KAAK,IAAI,CAAC;gBAC7D,IAAI,EAAE,GAAG,EAAE,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC;gBACzB,eAAe,EAAE,GAAG,EAAE,CAAC,iBAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,eAAe,CAAC;gBACzE,YAAY,EAAE,GAAG,EAAE,CACjB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAA,kBAAO,EAAC,SAAS,CAAC;gBACvF,KAAK,EAAE,GAAG,EAAE,CAAC,oBAAoB;aAClC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE;gBACzB,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;oBACzC,OAAO,CAAC,cAAc,EAAE,CAAC;gBAC3B,CAAC;gBACD,OAAO,IAAA,kBAAO,EAAC,SAAS,CAAC,CAAC;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,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 { Converters, populateObject, Result, fail, succeed } from '@fgv/ts-utils';\nimport { IQualifierDecl, IValidatedQualifierDecl } from '../qualifierDecl';\nimport { Validate } from '../../common';\nimport { ReadOnlyQualifierTypeCollector } from '../../qualifier-types';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * Converter for a {@link Qualifiers.IQualifierDecl | qualifier declaration}.\n * @public\n */\nexport const qualifierDecl = Converters.strictObject<IQualifierDecl>({\n name: Converters.string,\n typeName: Converters.string,\n defaultPriority: Converters.number,\n token: Converters.string.optional(),\n tokenIsOptional: Converters.boolean.optional(),\n defaultValue: Converters.string.optional()\n});\n\n/**\n * Context necessary to convert a {@link Qualifiers.IValidatedQualifierDecl | validated qualifier declaration}.\n * @public\n */\nexport interface IQualifierDeclConvertContext {\n readonly qualifierTypes: ReadOnlyQualifierTypeCollector;\n qualifierIndex?: number;\n}\n\n/**\n * Converter which constructs a {@link Qualifiers.IValidatedQualifierDecl | validated qualifier declaration}\n * from a {@link Qualifiers.IQualifierDecl | qualifier declaration}, instantiating qualifier types by name\n * from a supplied {@link Qualifiers.Convert.IQualifierDeclConvertContext | conversion context}.\n * @public\n */\nexport const validatedQualifierDecl = Converters.generic<\n IValidatedQualifierDecl,\n IQualifierDeclConvertContext\n>((from: unknown, __self, context?: IQualifierDeclConvertContext): Result<IValidatedQualifierDecl> => {\n /* c8 ignore next 7 - this is tested but code coverage is losing its mind */\n if (context === undefined) {\n return fail('validatedQualifierDecl converter requires a context');\n }\n const validatedIndexResult =\n context.qualifierIndex !== undefined\n ? Validate.toQualifierIndex(context.qualifierIndex)\n : succeed(undefined);\n\n return qualifierDecl.convert(from).onSuccess((decl) => {\n return context.qualifierTypes.validating.get(decl.typeName).asResult.onSuccess((type) => {\n return populateObject<IValidatedQualifierDecl>({\n name: () => Validate.toQualifierName(decl.name),\n token: () => Validate.toQualifierName(decl.token ?? decl.name),\n tokenIsOptional: () => succeed(decl.tokenIsOptional === true),\n type: () => succeed(type),\n defaultPriority: () => Validate.toConditionPriority(decl.defaultPriority),\n defaultValue: () =>\n decl.defaultValue ? type.validateContextValue(decl.defaultValue) : succeed(undefined),\n index: () => validatedIndexResult\n }).onSuccess((validated) => {\n if (context.qualifierIndex !== undefined) {\n context.qualifierIndex++;\n }\n return succeed(validated);\n });\n });\n });\n});\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/qualifiers/convert/index.ts"],"names":[],"mappings":"AAsBA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/qualifiers/convert/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,8CAA4B","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\nexport * from './decls';\nexport * from './qualifier';\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifier.d.ts","sourceRoot":"","sources":["../../../../src/packlets/qualifiers/convert/qualifier.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,2BAA2B,CAAC;CACzC;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,wEAYrB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifier.js","sourceRoot":"","sources":["../../../../src/packlets/qualifiers/convert/qualifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAyD;AAezD;;;;GAIG;AACU,QAAA,SAAS,GAAG,qBAAU,CAAC,OAAO,CACzC,CAAC,IAAa,EAAE,MAAM,EAAE,OAAkC,EAAqB,EAAE;IAC/E,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,IAAA,eAAI,EAAC,wCAAwC,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,IAAA,eAAI,EAAC,iDAAiD,CAAC,CAAC;AACjE,CAAC,CACF,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 { Converters, Result, fail } from '@fgv/ts-utils';\nimport { IReadOnlyQualifierCollector } from '../qualifierCollector';\nimport { Qualifier } from '../qualifier';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * Context necessary to convert a string or number to a\n * {@link Qualifiers.Qualifier | Qualifier} object.\n * @public\n */\nexport interface IQualifierConvertContext {\n qualifiers: IReadOnlyQualifierCollector;\n}\n\n/**\n * Converter which choose a qualifier by name or number from a\n * supplied {@link Qualifiers.Convert.IQualifierConvertContext | conversion context}.\n * @public\n */\nexport const qualifier = Converters.generic<Qualifier, IQualifierConvertContext>(\n (from: unknown, __self, context?: IQualifierConvertContext): Result<Qualifier> => {\n if (context === undefined) {\n return fail('qualifier converter requires a context');\n }\n if (typeof from === 'string') {\n return context.qualifiers.validating.get(from);\n } else if (typeof from === 'number') {\n return context.qualifiers.getAt(from);\n }\n return fail('qualifier converter requires a string or number');\n }\n);\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifiers/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mDAAqC;AAQ5B,0BAAO;AANhB,8CAA4B;AAC5B,kDAAgC;AAChC,uDAAqC;AACrC,+DAA6C;AAC7C,+DAA6C","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 Convert from './convert';\n\nexport * from './qualifier';\nexport * from './qualifierDecl';\nexport * from './qualifierCollector';\nexport * from './qualifierDefaultValueDecls';\nexport * from './qualifierDefaultValueToken';\n\nexport { Convert };\n"]}
@@ -46,9 +46,8 @@ export declare class Qualifier implements IValidatedQualifierDecl, ICollectible<
46
46
  /**
47
47
  * Constructs a new instance of a {@link Qualifiers.Qualifier | Qualifier} from the
48
48
  * supplied {@link Qualifiers.IValidatedQualifierDecl | validated declaration}.
49
- * @param name - The name of the qualifier.
50
- * @param type - The {@link QualifierTypes.QualifierType | type} of the qualifier.
51
- * @param defaultPriority - The default {@link ConditionPriority | priority} of conditions
49
+ * @param decl - The {@link Qualifiers.IValidatedQualifierDecl | validated declaration}
50
+ * describing the qualifier to construct.
52
51
  * @public
53
52
  */
54
53
  protected constructor({ name, token, type, defaultPriority, tokenIsOptional, defaultValue, index }: IValidatedQualifierDecl);
@@ -69,19 +68,19 @@ export declare class Qualifier implements IValidatedQualifierDecl, ICollectible<
69
68
  */
70
69
  setIndex(index: QualifierIndex): Result<QualifierIndex>;
71
70
  /**
72
- * {@inheritdoc QualifierTypes.QualifierType.isValidContextValue}
71
+ * {@inheritDoc QualifierTypes.QualifierType.isValidContextValue}
73
72
  */
74
73
  isValidContextValue(value: string): value is QualifierContextValue;
75
74
  /**
76
- * {@inheritdoc QualifierTypes.QualifierType.isValidConditionValue}
75
+ * {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}
77
76
  */
78
77
  isValidConditionValue(value: string): value is QualifierConditionValue;
79
78
  /**
80
- * {@inheritdoc QualifierTypes.QualifierType.validateCondition}
79
+ * {@inheritDoc QualifierTypes.QualifierType.validateCondition}
81
80
  */
82
81
  validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue>;
83
82
  /**
84
- * {@inheritdoc QualifierTypes.QualifierType.validateContextValue}
83
+ * {@inheritDoc QualifierTypes.QualifierType.validateContextValue}
85
84
  */
86
85
  validateContextValue(value: string): Result<QualifierContextValue>;
87
86
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifier.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifier.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAiB,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EAEb,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D;;;;GAIG;AACH,qBAAa,SAAU,YAAW,uBAAuB,EAAE,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC;IACpG;;OAEG;IACH,SAAgB,IAAI,EAAE,aAAa,CAAC;IAEpC;;;OAGG;IACH,SAAgB,KAAK,EAAE,aAAa,CAAC;IAErC;;OAEG;IACH,SAAgB,IAAI,EAAE,aAAa,CAAC;IAEpC;;OAEG;IACH,SAAgB,eAAe,EAAE,OAAO,CAAC;IAEzC;;OAEG;IACH,SAAgB,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAErD;;OAEG;IACH,IAAW,KAAK,IAAI,cAAc,GAAG,SAAS,CAE7C;IAED;;OAEG;IACH,IAAW,GAAG,IAAI,aAAa,CAE9B;IAED;;;OAGG;IACH,SAAgB,eAAe,EAAE,iBAAiB,CAAC;IAEnD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAExF;;;;;;OAMG;IACH,SAAS,aAAa,EACpB,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,EACN,EAAE,uBAAuB;IAc1B;;;;;;;;OAQG;WACW,MAAM,CAAC,IAAI,EAAE,uBAAuB,GAAG,MAAM,CAAC,SAAS,CAAC;IAItE;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAI9D;;OAEG;IACI,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,qBAAqB;IAIzE;;OAEG;IACI,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,uBAAuB;IAI7E;;OAEG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAC,uBAAuB,CAAC;IAItG;;OAEG;IACI,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC;CAG1E"}
@@ -45,9 +45,8 @@ class Qualifier {
45
45
  /**
46
46
  * Constructs a new instance of a {@link Qualifiers.Qualifier | Qualifier} from the
47
47
  * supplied {@link Qualifiers.IValidatedQualifierDecl | validated declaration}.
48
- * @param name - The name of the qualifier.
49
- * @param type - The {@link QualifierTypes.QualifierType | type} of the qualifier.
50
- * @param defaultPriority - The default {@link ConditionPriority | priority} of conditions
48
+ * @param decl - The {@link Qualifiers.IValidatedQualifierDecl | validated declaration}
49
+ * describing the qualifier to construct.
51
50
  * @public
52
51
  */
53
52
  constructor({ name, token, type, defaultPriority, tokenIsOptional, defaultValue, index }) {
@@ -84,25 +83,25 @@ class Qualifier {
84
83
  return this._collectible.setIndex(index);
85
84
  }
86
85
  /**
87
- * {@inheritdoc QualifierTypes.QualifierType.isValidContextValue}
86
+ * {@inheritDoc QualifierTypes.QualifierType.isValidContextValue}
88
87
  */
89
88
  isValidContextValue(value) {
90
89
  return this.type.isValidContextValue(value);
91
90
  }
92
91
  /**
93
- * {@inheritdoc QualifierTypes.QualifierType.isValidConditionValue}
92
+ * {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}
94
93
  */
95
94
  isValidConditionValue(value) {
96
95
  return this.type.isValidConditionValue(value);
97
96
  }
98
97
  /**
99
- * {@inheritdoc QualifierTypes.QualifierType.validateCondition}
98
+ * {@inheritDoc QualifierTypes.QualifierType.validateCondition}
100
99
  */
101
100
  validateCondition(value, operator) {
102
101
  return this.type.validateCondition(value, operator);
103
102
  }
104
103
  /**
105
- * {@inheritdoc QualifierTypes.QualifierType.validateContextValue}
104
+ * {@inheritDoc QualifierTypes.QualifierType.validateContextValue}
106
105
  */
107
106
  validateContextValue(value) {
108
107
  return this.type.validateContextValue(value);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifier.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAiF;AACjF,sCAQmB;AAInB;;;;GAIG;AACH,MAAa,SAAS;IA2BpB;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;IAC/B,CAAC;IAUD;;;;;;OAMG;IACH,YAAsB,EACpB,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,KAAK,EACmB;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAW,CAAC,WAAW,CAAgC;YAC7E,GAAG,EAAE,IAAI;YACT,KAAK;YACL,cAAc,EAAE,gBAAa,CAAC,cAAc;SAC7C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,MAAM,CAAC,IAA6B;QAChD,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,KAAqB;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACI,mBAAmB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,qBAAqB,CAAC,KAAa;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,KAAa,EAAE,QAA4B;QAClE,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACI,oBAAoB,CAAC,KAAa;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF;AA/HD,8BA+HC","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 { captureResult, Collections, ICollectible, Result } from '@fgv/ts-utils';\nimport {\n ConditionPriority,\n QualifierIndex,\n QualifierName,\n Convert as CommonConvert,\n QualifierContextValue,\n QualifierConditionValue,\n ConditionOperator\n} from '../common';\nimport { QualifierType } from '../qualifier-types';\nimport { IValidatedQualifierDecl } from './qualifierDecl';\n\n/**\n * Represents a qualifier that can be used to identify the context in\n * which a resource is used.\n * @public\n */\nexport class Qualifier implements IValidatedQualifierDecl, ICollectible<QualifierName, QualifierIndex> {\n /**\n * The name of the qualifier.\n */\n public readonly name: QualifierName;\n\n /**\n * The token used to identify the qualifier in the name or\n * path of a resource being imported.\n */\n public readonly token: QualifierName;\n\n /**\n * The {@link QualifierTypes.QualifierType | type} of the qualifier.\n */\n public readonly type: QualifierType;\n\n /**\n * Indicates whether the token is optional in the name or path of a resource being imported.\n */\n public readonly tokenIsOptional: boolean;\n\n /**\n * Optional default value for the qualifier.\n */\n public readonly defaultValue?: QualifierContextValue;\n\n /**\n * The index of the qualifier.\n */\n public get index(): QualifierIndex | undefined {\n return this._collectible.index;\n }\n\n /**\n * The collector key for this qualifier.\n */\n public get key(): QualifierName {\n return this._collectible.key;\n }\n\n /**\n * The default {@link ConditionPriority | priority} of conditions\n * that depend on this qualifier.\n */\n public readonly defaultPriority: ConditionPriority;\n\n protected readonly _collectible: Collections.Collectible<QualifierName, QualifierIndex>;\n\n /**\n * Constructs a new instance of a {@link Qualifiers.Qualifier | Qualifier} from the\n * supplied {@link Qualifiers.IValidatedQualifierDecl | validated declaration}.\n * @param decl - The {@link Qualifiers.IValidatedQualifierDecl | validated declaration}\n * describing the qualifier to construct.\n * @public\n */\n protected constructor({\n name,\n token,\n type,\n defaultPriority,\n tokenIsOptional,\n defaultValue,\n index\n }: IValidatedQualifierDecl) {\n this.name = name;\n this.token = token;\n this.type = type;\n this.defaultPriority = defaultPriority;\n this.tokenIsOptional = tokenIsOptional;\n this.defaultValue = defaultValue;\n this._collectible = new Collections.Collectible<QualifierName, QualifierIndex>({\n key: name,\n index,\n indexConverter: CommonConvert.qualifierIndex\n });\n }\n\n /**\n * Creates a new instance of a {@link Qualifiers.Qualifier | Qualifier} from the\n * supplied {@link Qualifiers.IValidatedQualifierDecl | validated declaration}.\n * @param decl - The {@link Qualifiers.IValidatedQualifierDecl | validated declaration}\n * for the new instance.\n * @returns `Success` with the new {@link Qualifiers.Qualifier | Qualifier} if successful,\n * `Failure` with an error message otherwise.\n * @public\n */\n public static create(decl: IValidatedQualifierDecl): Result<Qualifier> {\n return captureResult(() => new Qualifier(decl));\n }\n\n /**\n * Sets the index of this qualifier. Once set, the index cannot be changed.\n * @param index - The index to set.\n * @returns `Success` with the index if successful, `Failure` with an error message otherwise.\n */\n public setIndex(index: QualifierIndex): Result<QualifierIndex> {\n return this._collectible.setIndex(index);\n }\n\n /**\n * {@inheritDoc QualifierTypes.QualifierType.isValidContextValue}\n */\n public isValidContextValue(value: string): value is QualifierContextValue {\n return this.type.isValidContextValue(value);\n }\n\n /**\n * {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}\n */\n public isValidConditionValue(value: string): value is QualifierConditionValue {\n return this.type.isValidConditionValue(value);\n }\n\n /**\n * {@inheritDoc QualifierTypes.QualifierType.validateCondition}\n */\n public validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue> {\n return this.type.validateCondition(value, operator);\n }\n\n /**\n * {@inheritDoc QualifierTypes.QualifierType.validateContextValue}\n */\n public validateContextValue(value: string): Result<QualifierContextValue> {\n return this.type.validateContextValue(value);\n }\n}\n"]}
@@ -9,7 +9,7 @@ import { ReadOnlyQualifierTypeCollector } from '../qualifier-types';
9
9
  */
10
10
  export interface IReadOnlyQualifierCollector extends Collections.IReadOnlyValidatingCollector<Qualifier> {
11
11
  /**
12
- * {@inheritdoc Qualifiers.QualifierCollector.qualifierTypes}
12
+ * {@inheritDoc Qualifiers.QualifierCollector.qualifierTypes}
13
13
  */
14
14
  readonly qualifierTypes: ReadOnlyQualifierTypeCollector;
15
15
  /**
@@ -65,11 +65,11 @@ export declare class QualifierCollector extends ValidatingConvertingCollector<Qu
65
65
  */
66
66
  static create(params: IQualifierCollectorCreateParams): Result<QualifierCollector>;
67
67
  /**
68
- * {@inheritdoc Qualifiers.IReadOnlyQualifierCollector.getByNameOrToken}
68
+ * {@inheritDoc Qualifiers.IReadOnlyQualifierCollector.getByNameOrToken}
69
69
  */
70
70
  getByNameOrToken(nameOrToken: string): Result<Qualifier>;
71
71
  /**
72
- * {@inheritdoc Qualifiers.IReadOnlyQualifierCollector.hasNameOrToken}
72
+ * {@inheritDoc Qualifiers.IReadOnlyQualifierCollector.hasNameOrToken}
73
73
  */
74
74
  hasNameOrToken(nameOrToken: string): boolean;
75
75
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifierCollector.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierCollector.ts"],"names":[],"mappings":"AAuBA,OAAO,EAEL,WAAW,EAEX,MAAM,EAIN,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAA2B,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAA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