@fgv/ts-res 4.5.0-3 → 5.0.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/CHANGELOG.json +26 -0
  2. package/CHANGELOG.md +14 -0
  3. package/CLAUDE.md +186 -0
  4. package/EXAMPLE_INIT_PARAMS.md +88 -0
  5. package/PROGRESS_SUMMARY.md +48 -0
  6. package/README.md +535 -14
  7. package/dist/ts-res.d.ts +4241 -318
  8. package/dist/tsdoc-metadata.json +1 -1
  9. package/lib/index.d.ts +4 -1
  10. package/lib/index.d.ts.map +1 -1
  11. package/lib/index.js +7 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib/packlets/common/conditions.d.ts +30 -0
  14. package/lib/packlets/common/conditions.d.ts.map +1 -1
  15. package/lib/packlets/common/conditions.js.map +1 -1
  16. package/lib/packlets/common/convert.d.ts +22 -2
  17. package/lib/packlets/common/convert.d.ts.map +1 -1
  18. package/lib/packlets/common/convert.js +21 -1
  19. package/lib/packlets/common/convert.js.map +1 -1
  20. package/lib/packlets/common/helpers/context.d.ts +39 -0
  21. package/lib/packlets/common/helpers/context.d.ts.map +1 -0
  22. package/lib/packlets/common/helpers/context.js +108 -0
  23. package/lib/packlets/common/helpers/context.js.map +1 -0
  24. package/lib/packlets/common/helpers/index.d.ts +2 -0
  25. package/lib/packlets/common/helpers/index.d.ts.map +1 -1
  26. package/lib/packlets/common/helpers/index.js +2 -0
  27. package/lib/packlets/common/helpers/index.js.map +1 -1
  28. package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts +39 -0
  29. package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +1 -0
  30. package/lib/packlets/common/helpers/qualifierDefaultValues.js +105 -0
  31. package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
  32. package/lib/packlets/common/helpers/resources.d.ts.map +1 -1
  33. package/lib/packlets/common/helpers/resources.js +6 -2
  34. package/lib/packlets/common/helpers/resources.js.map +1 -1
  35. package/lib/packlets/common/validate/conditions.d.ts +69 -1
  36. package/lib/packlets/common/validate/conditions.d.ts.map +1 -1
  37. package/lib/packlets/common/validate/conditions.js +126 -0
  38. package/lib/packlets/common/validate/conditions.js.map +1 -1
  39. package/lib/packlets/common/validate/regularExpressions.d.ts +20 -0
  40. package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -1
  41. package/lib/packlets/common/validate/regularExpressions.js +21 -1
  42. package/lib/packlets/common/validate/regularExpressions.js.map +1 -1
  43. package/lib/packlets/conditions/condition.d.ts +37 -0
  44. package/lib/packlets/conditions/condition.d.ts.map +1 -1
  45. package/lib/packlets/conditions/condition.js +67 -1
  46. package/lib/packlets/conditions/condition.js.map +1 -1
  47. package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -1
  48. package/lib/packlets/conditions/conditionCollector.js +1 -0
  49. package/lib/packlets/conditions/conditionCollector.js.map +1 -1
  50. package/lib/packlets/conditions/conditionSet.d.ts +34 -3
  51. package/lib/packlets/conditions/conditionSet.d.ts.map +1 -1
  52. package/lib/packlets/conditions/conditionSet.js +31 -3
  53. package/lib/packlets/conditions/conditionSet.js.map +1 -1
  54. package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -1
  55. package/lib/packlets/conditions/conditionSetCollector.js +3 -0
  56. package/lib/packlets/conditions/conditionSetCollector.js.map +1 -1
  57. package/lib/packlets/conditions/conditionToken.d.ts.map +1 -1
  58. package/lib/packlets/conditions/conditionToken.js +2 -1
  59. package/lib/packlets/conditions/conditionToken.js.map +1 -1
  60. package/lib/packlets/conditions/convert/decls.js +1 -1
  61. package/lib/packlets/conditions/convert/decls.js.map +1 -1
  62. package/lib/packlets/config/common.d.ts +35 -0
  63. package/lib/packlets/config/common.d.ts.map +1 -0
  64. package/lib/packlets/config/common.js +96 -0
  65. package/lib/packlets/config/common.js.map +1 -0
  66. package/lib/packlets/config/convert.d.ts +14 -0
  67. package/lib/packlets/config/convert.d.ts.map +1 -0
  68. package/lib/packlets/config/convert.js +82 -0
  69. package/lib/packlets/config/convert.js.map +1 -0
  70. package/lib/packlets/config/index.d.ts +6 -0
  71. package/lib/packlets/config/index.d.ts.map +1 -0
  72. package/lib/packlets/config/index.js +67 -0
  73. package/lib/packlets/config/index.js.map +1 -0
  74. package/lib/packlets/config/json.d.ts +20 -0
  75. package/lib/packlets/config/json.d.ts.map +1 -0
  76. package/lib/packlets/config/json.js +24 -0
  77. package/lib/packlets/config/json.js.map +1 -0
  78. package/lib/packlets/config/predefined/default.d.ts +57 -0
  79. package/lib/packlets/config/predefined/default.d.ts.map +1 -0
  80. package/lib/packlets/config/predefined/default.js +141 -0
  81. package/lib/packlets/config/predefined/default.js.map +1 -0
  82. package/lib/packlets/config/predefined/extended.d.ts +25 -0
  83. package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
  84. package/lib/packlets/config/predefined/extended.js +193 -0
  85. package/lib/packlets/config/predefined/extended.js.map +1 -0
  86. package/lib/packlets/config/predefined/index.d.ts +4 -0
  87. package/lib/packlets/config/predefined/index.d.ts.map +1 -0
  88. package/lib/packlets/config/predefined/index.js +62 -0
  89. package/lib/packlets/config/predefined/index.js.map +1 -0
  90. package/lib/packlets/config/systemConfiguration.d.ts +81 -0
  91. package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
  92. package/lib/packlets/config/systemConfiguration.js +172 -0
  93. package/lib/packlets/config/systemConfiguration.js.map +1 -0
  94. package/lib/packlets/context/contextDecls.d.ts +49 -0
  95. package/lib/packlets/context/contextDecls.d.ts.map +1 -0
  96. package/lib/packlets/context/contextDecls.js +24 -0
  97. package/lib/packlets/context/contextDecls.js.map +1 -0
  98. package/lib/packlets/context/contextToken.d.ts +111 -0
  99. package/lib/packlets/context/contextToken.d.ts.map +1 -0
  100. package/lib/packlets/context/contextToken.js +206 -0
  101. package/lib/packlets/context/contextToken.js.map +1 -0
  102. package/lib/packlets/context/convert/decls.d.ts +37 -0
  103. package/lib/packlets/context/convert/decls.d.ts.map +1 -0
  104. package/lib/packlets/context/convert/decls.js +94 -0
  105. package/lib/packlets/context/convert/decls.js.map +1 -0
  106. package/lib/packlets/context/convert/index.d.ts +2 -0
  107. package/lib/packlets/context/convert/index.d.ts.map +1 -0
  108. package/lib/packlets/context/convert/index.js +39 -0
  109. package/lib/packlets/context/convert/index.js.map +1 -0
  110. package/lib/packlets/context/index.d.ts +5 -0
  111. package/lib/packlets/context/index.d.ts.map +1 -0
  112. package/lib/packlets/context/index.js +65 -0
  113. package/lib/packlets/context/index.js.map +1 -0
  114. package/lib/packlets/decisions/abstractDecision.d.ts +8 -0
  115. package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -1
  116. package/lib/packlets/decisions/abstractDecision.js +9 -0
  117. package/lib/packlets/decisions/abstractDecision.js.map +1 -1
  118. package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -1
  119. package/lib/packlets/decisions/abstractDecisionCollector.js +2 -0
  120. package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -1
  121. package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -1
  122. package/lib/packlets/decisions/concreteDecision.js +1 -0
  123. package/lib/packlets/decisions/concreteDecision.js.map +1 -1
  124. package/lib/packlets/decisions/decision.d.ts.map +1 -1
  125. package/lib/packlets/decisions/decision.js +4 -0
  126. package/lib/packlets/decisions/decision.js.map +1 -1
  127. package/lib/packlets/import/fsItem.d.ts.map +1 -1
  128. package/lib/packlets/import/fsItem.js +1 -0
  129. package/lib/packlets/import/fsItem.js.map +1 -1
  130. package/lib/packlets/import/importContext.d.ts +19 -0
  131. package/lib/packlets/import/importContext.d.ts.map +1 -1
  132. package/lib/packlets/import/importContext.js +39 -0
  133. package/lib/packlets/import/importContext.js.map +1 -1
  134. package/lib/packlets/import/importManager.d.ts +5 -5
  135. package/lib/packlets/import/importManager.d.ts.map +1 -1
  136. package/lib/packlets/import/importManager.js.map +1 -1
  137. package/lib/packlets/import/importers/collectionImporter.d.ts +11 -13
  138. package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -1
  139. package/lib/packlets/import/importers/collectionImporter.js +29 -20
  140. package/lib/packlets/import/importers/collectionImporter.js.map +1 -1
  141. package/lib/packlets/import/importers/fsItemImporter.d.ts +2 -2
  142. package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -1
  143. package/lib/packlets/import/importers/fsItemImporter.js +2 -2
  144. package/lib/packlets/import/importers/fsItemImporter.js.map +1 -1
  145. package/lib/packlets/import/importers/importer.d.ts +3 -3
  146. package/lib/packlets/import/importers/importer.d.ts.map +1 -1
  147. package/lib/packlets/import/importers/importer.js.map +1 -1
  148. package/lib/packlets/import/importers/jsonImporter.d.ts +2 -3
  149. package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -1
  150. package/lib/packlets/import/importers/jsonImporter.js +10 -20
  151. package/lib/packlets/import/importers/jsonImporter.js.map +1 -1
  152. package/lib/packlets/import/importers/pathImporter.d.ts +2 -2
  153. package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -1
  154. package/lib/packlets/import/importers/pathImporter.js.map +1 -1
  155. package/lib/packlets/qualifier-types/config/convert.d.ts +44 -0
  156. package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
  157. package/lib/packlets/qualifier-types/config/convert.js +96 -0
  158. package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
  159. package/lib/packlets/qualifier-types/config/index.d.ts +4 -0
  160. package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
  161. package/lib/packlets/qualifier-types/config/index.js +64 -0
  162. package/lib/packlets/qualifier-types/config/index.js.map +1 -0
  163. package/lib/packlets/qualifier-types/config/json.d.ts +69 -0
  164. package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
  165. package/lib/packlets/qualifier-types/config/json.js +24 -0
  166. package/lib/packlets/qualifier-types/config/json.js.map +1 -0
  167. package/lib/packlets/qualifier-types/convert.d.ts +10 -2
  168. package/lib/packlets/qualifier-types/convert.d.ts.map +1 -1
  169. package/lib/packlets/qualifier-types/convert.js +15 -0
  170. package/lib/packlets/qualifier-types/convert.js.map +1 -1
  171. package/lib/packlets/qualifier-types/helpers.d.ts +27 -0
  172. package/lib/packlets/qualifier-types/helpers.d.ts.map +1 -0
  173. package/lib/packlets/qualifier-types/helpers.js +118 -0
  174. package/lib/packlets/qualifier-types/helpers.js.map +1 -0
  175. package/lib/packlets/qualifier-types/index.d.ts +4 -1
  176. package/lib/packlets/qualifier-types/index.d.ts.map +1 -1
  177. package/lib/packlets/qualifier-types/index.js +5 -1
  178. package/lib/packlets/qualifier-types/index.js.map +1 -1
  179. package/lib/packlets/qualifier-types/languageQualifierType.d.ts +19 -8
  180. package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -1
  181. package/lib/packlets/qualifier-types/languageQualifierType.js +28 -9
  182. package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -1
  183. package/lib/packlets/qualifier-types/literalQualifierType.d.ts +42 -13
  184. package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -1
  185. package/lib/packlets/qualifier-types/literalQualifierType.js +58 -10
  186. package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -1
  187. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts +114 -0
  188. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
  189. package/lib/packlets/qualifier-types/literalValueHierarchy.js +228 -0
  190. package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
  191. package/lib/packlets/qualifier-types/qualifierType.d.ts +33 -18
  192. package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -1
  193. package/lib/packlets/qualifier-types/qualifierType.js +18 -4
  194. package/lib/packlets/qualifier-types/qualifierType.js.map +1 -1
  195. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts +4 -2
  196. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -1
  197. package/lib/packlets/qualifier-types/qualifierTypeCollector.js +2 -1
  198. package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -1
  199. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +47 -11
  200. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -1
  201. package/lib/packlets/qualifier-types/territoryQualifierType.js +61 -17
  202. package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -1
  203. package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -1
  204. package/lib/packlets/qualifiers/convert/decls.js +17 -15
  205. package/lib/packlets/qualifiers/convert/decls.js.map +1 -1
  206. package/lib/packlets/qualifiers/index.d.ts +2 -0
  207. package/lib/packlets/qualifiers/index.d.ts.map +1 -1
  208. package/lib/packlets/qualifiers/index.js +2 -0
  209. package/lib/packlets/qualifiers/index.js.map +1 -1
  210. package/lib/packlets/qualifiers/qualifier.d.ts +22 -2
  211. package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -1
  212. package/lib/packlets/qualifiers/qualifier.js +26 -1
  213. package/lib/packlets/qualifiers/qualifier.js.map +1 -1
  214. package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -1
  215. package/lib/packlets/qualifiers/qualifierCollector.js +4 -0
  216. package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -1
  217. package/lib/packlets/qualifiers/qualifierDecl.d.ts +6 -1
  218. package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -1
  219. package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -1
  220. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts +32 -0
  221. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +1 -0
  222. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js +24 -0
  223. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
  224. package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts +96 -0
  225. package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +1 -0
  226. package/lib/packlets/qualifiers/qualifierDefaultValueToken.js +179 -0
  227. package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
  228. package/lib/packlets/resource-json/compiled/common.d.ts +14 -0
  229. package/lib/packlets/resource-json/compiled/common.d.ts.map +1 -0
  230. package/lib/packlets/resource-json/compiled/common.js +24 -0
  231. package/lib/packlets/resource-json/compiled/common.js.map +1 -0
  232. package/lib/packlets/resource-json/compiled/convert.d.ts +63 -0
  233. package/lib/packlets/resource-json/compiled/convert.d.ts.map +1 -0
  234. package/lib/packlets/resource-json/compiled/convert.js +167 -0
  235. package/lib/packlets/resource-json/compiled/convert.js.map +1 -0
  236. package/lib/packlets/resource-json/compiled/index.d.ts +5 -0
  237. package/lib/packlets/resource-json/compiled/index.d.ts.map +1 -0
  238. package/lib/packlets/resource-json/compiled/index.js +65 -0
  239. package/lib/packlets/resource-json/compiled/index.js.map +1 -0
  240. package/lib/packlets/resource-json/compiled/json.d.ts +204 -0
  241. package/lib/packlets/resource-json/compiled/json.d.ts.map +1 -0
  242. package/lib/packlets/resource-json/compiled/json.js +3 -0
  243. package/lib/packlets/resource-json/compiled/json.js.map +1 -0
  244. package/lib/packlets/resource-json/convert.d.ts +16 -0
  245. package/lib/packlets/resource-json/convert.d.ts.map +1 -1
  246. package/lib/packlets/resource-json/convert.js +41 -6
  247. package/lib/packlets/resource-json/convert.js.map +1 -1
  248. package/lib/packlets/resource-json/helpers.d.ts +82 -3
  249. package/lib/packlets/resource-json/helpers.d.ts.map +1 -1
  250. package/lib/packlets/resource-json/helpers.js +185 -2
  251. package/lib/packlets/resource-json/helpers.js.map +1 -1
  252. package/lib/packlets/resource-json/index.d.ts +2 -1
  253. package/lib/packlets/resource-json/index.d.ts.map +1 -1
  254. package/lib/packlets/resource-json/index.js +3 -1
  255. package/lib/packlets/resource-json/index.js.map +1 -1
  256. package/lib/packlets/resource-json/json.d.ts +55 -3
  257. package/lib/packlets/resource-json/json.d.ts.map +1 -1
  258. package/lib/packlets/resource-json/json.js +16 -0
  259. package/lib/packlets/resource-json/json.js.map +1 -1
  260. package/lib/packlets/resource-json/normalized.d.ts +46 -3
  261. package/lib/packlets/resource-json/normalized.d.ts.map +1 -1
  262. package/lib/packlets/resource-json/normalized.js.map +1 -1
  263. package/lib/packlets/resource-json/resourceDeclCollection.d.ts +14 -10
  264. package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -1
  265. package/lib/packlets/resource-json/resourceDeclCollection.js +18 -14
  266. package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -1
  267. package/lib/packlets/resource-json/resourceDeclContainer.d.ts +15 -2
  268. package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -1
  269. package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -1
  270. package/lib/packlets/resource-json/resourceDeclTree.d.ts +6 -2
  271. package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -1
  272. package/lib/packlets/resource-json/resourceDeclTree.js +12 -3
  273. package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -1
  274. package/lib/packlets/resource-types/config/convert.d.ts +8 -0
  275. package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
  276. package/lib/packlets/resource-types/config/convert.js +36 -0
  277. package/lib/packlets/resource-types/config/convert.js.map +1 -0
  278. package/lib/packlets/resource-types/config/index.d.ts +4 -0
  279. package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
  280. package/lib/packlets/resource-types/config/index.js +64 -0
  281. package/lib/packlets/resource-types/config/index.js.map +1 -0
  282. package/lib/packlets/resource-types/config/json.d.ts +9 -0
  283. package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
  284. package/lib/packlets/resource-types/config/json.js +24 -0
  285. package/lib/packlets/resource-types/config/json.js.map +1 -0
  286. package/lib/packlets/resource-types/helpers.d.ts +13 -0
  287. package/lib/packlets/resource-types/helpers.d.ts.map +1 -0
  288. package/lib/packlets/resource-types/helpers.js +44 -0
  289. package/lib/packlets/resource-types/helpers.js.map +1 -0
  290. package/lib/packlets/resource-types/index.d.ts +3 -0
  291. package/lib/packlets/resource-types/index.d.ts.map +1 -1
  292. package/lib/packlets/resource-types/index.js +26 -0
  293. package/lib/packlets/resource-types/index.js.map +1 -1
  294. package/lib/packlets/resource-types/jsonResourceType.d.ts +5 -13
  295. package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -1
  296. package/lib/packlets/resource-types/jsonResourceType.js +5 -2
  297. package/lib/packlets/resource-types/jsonResourceType.js.map +1 -1
  298. package/lib/packlets/resource-types/resourceType.d.ts +31 -30
  299. package/lib/packlets/resource-types/resourceType.d.ts.map +1 -1
  300. package/lib/packlets/resource-types/resourceType.js.map +1 -1
  301. package/lib/packlets/resources/candidateReducer.d.ts +98 -0
  302. package/lib/packlets/resources/candidateReducer.d.ts.map +1 -0
  303. package/lib/packlets/resources/candidateReducer.js +247 -0
  304. package/lib/packlets/resources/candidateReducer.js.map +1 -0
  305. package/lib/packlets/resources/common.d.ts +60 -0
  306. package/lib/packlets/resources/common.d.ts.map +1 -0
  307. package/lib/packlets/resources/common.js +24 -0
  308. package/lib/packlets/resources/common.js.map +1 -0
  309. package/lib/packlets/resources/index.d.ts +3 -1
  310. package/lib/packlets/resources/index.d.ts.map +1 -1
  311. package/lib/packlets/resources/index.js +3 -1
  312. package/lib/packlets/resources/index.js.map +1 -1
  313. package/lib/packlets/resources/resource.d.ts +57 -5
  314. package/lib/packlets/resources/resource.d.ts.map +1 -1
  315. package/lib/packlets/resources/resource.js +96 -6
  316. package/lib/packlets/resources/resource.js.map +1 -1
  317. package/lib/packlets/resources/resourceBuilder.d.ts +14 -0
  318. package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -1
  319. package/lib/packlets/resources/resourceBuilder.js +19 -1
  320. package/lib/packlets/resources/resourceBuilder.js.map +1 -1
  321. package/lib/packlets/resources/resourceCandidate.d.ts +42 -6
  322. package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -1
  323. package/lib/packlets/resources/resourceCandidate.js +40 -1
  324. package/lib/packlets/resources/resourceCandidate.js.map +1 -1
  325. package/lib/packlets/resources/resourceManagerBuilder.d.ts +220 -0
  326. package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -0
  327. package/lib/packlets/resources/resourceManagerBuilder.js +451 -0
  328. package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -0
  329. package/lib/packlets/runtime/cacheListener.d.ts +62 -0
  330. package/lib/packlets/runtime/cacheListener.d.ts.map +1 -0
  331. package/lib/packlets/runtime/cacheListener.js +56 -0
  332. package/lib/packlets/runtime/cacheListener.js.map +1 -0
  333. package/lib/packlets/runtime/cacheMetrics.d.ts +82 -0
  334. package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -0
  335. package/lib/packlets/runtime/cacheMetrics.js +143 -0
  336. package/lib/packlets/runtime/cacheMetrics.js.map +1 -0
  337. package/lib/packlets/runtime/compiledResourceCollection.d.ts +167 -0
  338. package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -0
  339. package/lib/packlets/runtime/compiledResourceCollection.js +466 -0
  340. package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -0
  341. package/lib/packlets/runtime/conditionSetResolutionResult.d.ts +70 -0
  342. package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +1 -0
  343. package/lib/packlets/runtime/conditionSetResolutionResult.js +135 -0
  344. package/lib/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
  345. package/lib/packlets/runtime/context/contextQualifierProvider.d.ts +80 -0
  346. package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +1 -0
  347. package/lib/packlets/runtime/context/contextQualifierProvider.js +33 -0
  348. package/lib/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
  349. package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts +165 -0
  350. package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +1 -0
  351. package/lib/packlets/runtime/context/contextQualifierProviderValidator.js +179 -0
  352. package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
  353. package/lib/packlets/runtime/context/index.d.ts +5 -0
  354. package/lib/packlets/runtime/context/index.d.ts.map +1 -0
  355. package/lib/packlets/runtime/context/index.js +42 -0
  356. package/lib/packlets/runtime/context/index.js.map +1 -0
  357. package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts +111 -0
  358. package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
  359. package/lib/packlets/runtime/context/simpleContextQualifierProvider.js +177 -0
  360. package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
  361. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts +47 -0
  362. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
  363. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +64 -0
  364. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
  365. package/lib/packlets/runtime/iResourceManager.d.ts +88 -0
  366. package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -0
  367. package/lib/packlets/runtime/iResourceManager.js +24 -0
  368. package/lib/packlets/runtime/iResourceManager.js.map +1 -0
  369. package/lib/packlets/runtime/index.d.ts +12 -0
  370. package/lib/packlets/runtime/index.d.ts.map +1 -0
  371. package/lib/packlets/runtime/index.js +73 -0
  372. package/lib/packlets/runtime/index.js.map +1 -0
  373. package/lib/packlets/runtime/resource-tree/common.d.ts +91 -0
  374. package/lib/packlets/runtime/resource-tree/common.d.ts.map +1 -0
  375. package/lib/packlets/runtime/resource-tree/common.js +24 -0
  376. package/lib/packlets/runtime/resource-tree/common.js.map +1 -0
  377. package/lib/packlets/runtime/resource-tree/index.d.ts +5 -0
  378. package/lib/packlets/runtime/resource-tree/index.d.ts.map +1 -0
  379. package/lib/packlets/runtime/resource-tree/index.js +42 -0
  380. package/lib/packlets/runtime/resource-tree/index.js.map +1 -0
  381. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts +141 -0
  382. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +1 -0
  383. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js +224 -0
  384. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
  385. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts +24 -0
  386. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +1 -0
  387. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js +98 -0
  388. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
  389. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts +99 -0
  390. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +1 -0
  391. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js +165 -0
  392. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
  393. package/lib/packlets/runtime/resourceResolver.d.ts +196 -0
  394. package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -0
  395. package/lib/packlets/runtime/resourceResolver.js +437 -0
  396. package/lib/packlets/runtime/resourceResolver.js.map +1 -0
  397. package/lib/packlets/runtime/validate.d.ts +13 -0
  398. package/lib/packlets/runtime/validate.d.ts.map +1 -0
  399. package/lib/packlets/runtime/validate.js +49 -0
  400. package/lib/packlets/runtime/validate.js.map +1 -0
  401. package/package.json +76 -75
  402. package/lib/packlets/resources/resourceManager.d.ts +0 -104
  403. package/lib/packlets/resources/resourceManager.d.ts.map +0 -1
  404. package/lib/packlets/resources/resourceManager.js +0 -201
  405. package/lib/packlets/resources/resourceManager.js.map +0 -1
@@ -0,0 +1,96 @@
1
+ import { Result } from '@fgv/ts-utils';
2
+ import { Helpers as CommonHelpers } from '../common';
3
+ import { IValidatedQualifierDefaultValueDecl, IValidatedQualifierDefaultValuesDecl } from './qualifierDefaultValueDecls';
4
+ import { IReadOnlyQualifierCollector } from './qualifierCollector';
5
+ /**
6
+ * Helper class to parse and validate qualifier default value tokens.
7
+ * @public
8
+ */
9
+ export declare class QualifierDefaultValueTokens {
10
+ /**
11
+ * The {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to validate
12
+ * qualifier names and values.
13
+ */
14
+ readonly qualifiers: IReadOnlyQualifierCollector;
15
+ /**
16
+ * Constructs a new {@link Qualifiers.QualifierDefaultValueTokens | QualifierDefaultValueTokens } instance.
17
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
18
+ */
19
+ constructor(qualifiers: IReadOnlyQualifierCollector);
20
+ /**
21
+ * Parses a {@link QualifierDefaultValueToken | qualifier default value token} string and validates the parts
22
+ * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.
23
+ * @param token - the token string to parse.
24
+ * @returns `Success` with the {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration}
25
+ * if successful, `Failure` with an error message if not.
26
+ */
27
+ parseQualifierDefaultValueToken(token: string): Result<IValidatedQualifierDefaultValueDecl>;
28
+ /**
29
+ * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} string and validates the parts
30
+ * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.
31
+ * @param token - the token string to parse.
32
+ * @returns `Success` with the array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}
33
+ * if successful, `Failure` with an error message if not.
34
+ */
35
+ parseQualifierDefaultValuesToken(token: string): Result<IValidatedQualifierDefaultValueDecl[]>;
36
+ /**
37
+ * Validates the {@link Helpers.IQualifierDefaultValueTokenParts | parts} of a {@link QualifierDefaultValueToken | qualifier default value token}.
38
+ * @param parts - the parts to validate
39
+ * @returns `Success` with the validated declaration if successful, `Failure` with an error message if not.
40
+ */
41
+ validateQualifierDefaultValueTokenParts(parts: CommonHelpers.IQualifierDefaultValueTokenParts): Result<IValidatedQualifierDefaultValueDecl>;
42
+ /**
43
+ * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.
44
+ * @param token - the qualifier default values token to convert
45
+ * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.
46
+ */
47
+ qualifierDefaultValuesTokenToDecl(token: string): Result<IValidatedQualifierDefaultValuesDecl>;
48
+ /**
49
+ * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.
50
+ * @param decl - the validated qualifier default values declaration to convert
51
+ * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.
52
+ */
53
+ declToQualifierDefaultValuesToken(decl: IValidatedQualifierDefaultValuesDecl): Result<string>;
54
+ /**
55
+ * Parses a {@link QualifierDefaultValueToken | qualifier default value token} and validates it against the qualifiers
56
+ * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
57
+ * @param token - the token string to parse.
58
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
59
+ * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,
60
+ * `Failure` with an error message if not.
61
+ */
62
+ static parseQualifierDefaultValueToken(token: string, qualifiers: IReadOnlyQualifierCollector): Result<IValidatedQualifierDefaultValueDecl>;
63
+ /**
64
+ * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} and validates it against the qualifiers
65
+ * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
66
+ * @param token - the token string to parse.
67
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
68
+ * @returns `Success` with an array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}
69
+ * if successful, `Failure` with an error message if not
70
+ */
71
+ static parseQualifierDefaultValuesToken(token: string, qualifiers: IReadOnlyQualifierCollector): Result<IValidatedQualifierDefaultValueDecl[]>;
72
+ /**
73
+ * Validates the parts of a qualifier default value token against the qualifiers present in the supplied
74
+ * {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
75
+ * @param parts - the {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} to validate.
76
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to
77
+ * validate qualifier names and values.
78
+ * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,
79
+ * `Failure` with an error message if not.
80
+ */
81
+ static validateQualifierDefaultValueTokenParts(parts: CommonHelpers.IQualifierDefaultValueTokenParts, qualifiers: IReadOnlyQualifierCollector): Result<IValidatedQualifierDefaultValueDecl>;
82
+ /**
83
+ * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.
84
+ * @param token - the qualifier default values token to convert
85
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
86
+ * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.
87
+ */
88
+ static qualifierDefaultValuesTokenToDecl(token: string, qualifiers: IReadOnlyQualifierCollector): Result<IValidatedQualifierDefaultValuesDecl>;
89
+ /**
90
+ * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.
91
+ * @param decl - the validated qualifier default values declaration to convert
92
+ * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.
93
+ */
94
+ static declToQualifierDefaultValuesToken(decl: IValidatedQualifierDefaultValuesDecl): Result<string>;
95
+ }
96
+ //# sourceMappingURL=qualifierDefaultValueToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifierDefaultValueToken.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueToken.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAc,MAAM,EAAiB,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAwC,MAAM,WAAW,CAAC;AAC3F,OAAO,EACL,mCAAmC,EACnC,oCAAoC,EACrC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EA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@@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2025 Erik Fortune
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in all
13
+ * copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ * SOFTWARE.
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.QualifierDefaultValueTokens = void 0;
25
+ const ts_utils_1 = require("@fgv/ts-utils");
26
+ const common_1 = require("../common");
27
+ /**
28
+ * Helper class to parse and validate qualifier default value tokens.
29
+ * @public
30
+ */
31
+ class QualifierDefaultValueTokens {
32
+ /**
33
+ * Constructs a new {@link Qualifiers.QualifierDefaultValueTokens | QualifierDefaultValueTokens } instance.
34
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
35
+ */
36
+ constructor(qualifiers) {
37
+ this.qualifiers = qualifiers;
38
+ }
39
+ /**
40
+ * Parses a {@link QualifierDefaultValueToken | qualifier default value token} string and validates the parts
41
+ * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.
42
+ * @param token - the token string to parse.
43
+ * @returns `Success` with the {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration}
44
+ * if successful, `Failure` with an error message if not.
45
+ */
46
+ parseQualifierDefaultValueToken(token) {
47
+ return QualifierDefaultValueTokens.parseQualifierDefaultValueToken(token, this.qualifiers);
48
+ }
49
+ /**
50
+ * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} string and validates the parts
51
+ * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.
52
+ * @param token - the token string to parse.
53
+ * @returns `Success` with the array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}
54
+ * if successful, `Failure` with an error message if not.
55
+ */
56
+ parseQualifierDefaultValuesToken(token) {
57
+ return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, this.qualifiers);
58
+ }
59
+ /**
60
+ * Validates the {@link Helpers.IQualifierDefaultValueTokenParts | parts} of a {@link QualifierDefaultValueToken | qualifier default value token}.
61
+ * @param parts - the parts to validate
62
+ * @returns `Success` with the validated declaration if successful, `Failure` with an error message if not.
63
+ */
64
+ validateQualifierDefaultValueTokenParts(parts) {
65
+ return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, this.qualifiers);
66
+ }
67
+ /**
68
+ * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.
69
+ * @param token - the qualifier default values token to convert
70
+ * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.
71
+ */
72
+ qualifierDefaultValuesTokenToDecl(token) {
73
+ return QualifierDefaultValueTokens.qualifierDefaultValuesTokenToDecl(token, this.qualifiers);
74
+ }
75
+ /**
76
+ * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.
77
+ * @param decl - the validated qualifier default values declaration to convert
78
+ * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.
79
+ */
80
+ declToQualifierDefaultValuesToken(decl) {
81
+ return QualifierDefaultValueTokens.declToQualifierDefaultValuesToken(decl);
82
+ }
83
+ /**
84
+ * Parses a {@link QualifierDefaultValueToken | qualifier default value token} and validates it against the qualifiers
85
+ * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
86
+ * @param token - the token string to parse.
87
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
88
+ * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,
89
+ * `Failure` with an error message if not.
90
+ */
91
+ static parseQualifierDefaultValueToken(token, qualifiers) {
92
+ return common_1.Helpers.parseQualifierDefaultValueTokenParts(token).onSuccess((parts) => {
93
+ return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, qualifiers);
94
+ });
95
+ }
96
+ /**
97
+ * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} and validates it against the qualifiers
98
+ * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
99
+ * @param token - the token string to parse.
100
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
101
+ * @returns `Success` with an array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}
102
+ * if successful, `Failure` with an error message if not
103
+ */
104
+ static parseQualifierDefaultValuesToken(token, qualifiers) {
105
+ return common_1.Helpers.parseQualifierDefaultValuesTokenParts(token).onSuccess((parts) => {
106
+ return (0, ts_utils_1.mapResults)(parts.map((part) => QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(part, qualifiers)));
107
+ });
108
+ }
109
+ /**
110
+ * Validates the parts of a qualifier default value token against the qualifiers present in the supplied
111
+ * {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
112
+ * @param parts - the {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} to validate.
113
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to
114
+ * validate qualifier names and values.
115
+ * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,
116
+ * `Failure` with an error message if not.
117
+ */
118
+ static validateQualifierDefaultValueTokenParts(parts, qualifiers) {
119
+ return qualifiers.getByNameOrToken(parts.qualifier).onSuccess((qualifier) => {
120
+ // Allow empty values to remove defaults
121
+ if (parts.value === '') {
122
+ return (0, ts_utils_1.succeed)({ qualifier, value: '' });
123
+ }
124
+ return qualifier.type
125
+ .validateContextValue(parts.value)
126
+ .onSuccess((value) => {
127
+ return (0, ts_utils_1.succeed)({ qualifier, value });
128
+ })
129
+ .withDetail('failure', 'success');
130
+ });
131
+ }
132
+ /**
133
+ * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.
134
+ * @param token - the qualifier default values token to convert
135
+ * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
136
+ * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.
137
+ */
138
+ static qualifierDefaultValuesTokenToDecl(token, qualifiers) {
139
+ return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, qualifiers).onSuccess((qualifierDefaultValues) => {
140
+ const defaultValues = {};
141
+ for (const { qualifier, value } of qualifierDefaultValues) {
142
+ const qualifierName = qualifier.name;
143
+ const contextValue = value;
144
+ // Check for duplicate qualifiers
145
+ if (qualifierName in defaultValues) {
146
+ return (0, ts_utils_1.fail)(`${qualifier.name}: duplicate qualifier in default values token`);
147
+ }
148
+ // Only add non-empty values (empty values remove defaults)
149
+ if (contextValue !== '') {
150
+ defaultValues[qualifierName] = contextValue;
151
+ }
152
+ }
153
+ return (0, ts_utils_1.succeed)(defaultValues);
154
+ });
155
+ }
156
+ /**
157
+ * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.
158
+ * @param decl - the validated qualifier default values declaration to convert
159
+ * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.
160
+ */
161
+ static declToQualifierDefaultValuesToken(decl) {
162
+ const tokens = [];
163
+ for (const [qualifierName, contextValue] of Object.entries(decl)) {
164
+ // Build token as "qualifier=value"
165
+ tokens.push(`${qualifierName}=${contextValue}`);
166
+ }
167
+ if (tokens.length === 0) {
168
+ return (0, ts_utils_1.succeed)('');
169
+ }
170
+ const tokenString = tokens.join('|');
171
+ // Validate the generated token
172
+ return common_1.Helpers.buildQualifierDefaultValuesToken(tokens.map((token) => {
173
+ const [qualifier, value] = token.split('=');
174
+ return { qualifier, value };
175
+ })).onSuccess(() => (0, ts_utils_1.succeed)(tokenString));
176
+ }
177
+ }
178
+ exports.QualifierDefaultValueTokens = QualifierDefaultValueTokens;
179
+ //# sourceMappingURL=qualifierDefaultValueToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualifierDefaultValueToken.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueToken.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAkE;AAClE,sCAA2F;AAO3F;;;GAGG;AACH,MAAa,2BAA2B;IAOtC;;;OAGG;IACH,YAAmB,UAAuC;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACI,+BAA+B,CAAC,KAAa;QAClD,OAAO,2BAA2B,CAAC,+BAA+B,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;OAMG;IACI,gCAAgC,CAAC,KAAa;QACnD,OAAO,2BAA2B,CAAC,gCAAgC,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACI,uCAAuC,CAC5C,KAAqD;QAErD,OAAO,2BAA2B,CAAC,uCAAuC,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACr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jE,mCAAmC;YACnC,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,IAAI,YAAY,EAAE,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,IAAA,kBAAO,EAAC,EAAE,CAAC,CAAC;QACrB,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAErC,+BAA+B;QAC/B,OAAO,gBAAa,CAAC,gCAAgC,CACnD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACnB,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAC9B,CAAC,CAAC,CACH,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAA,kBAAO,EAAC,WAAW,CAAC,CAAC,CAAC;IAC1C,CAAC;CACF;AAnMD,kEAmMC","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 { mapResults, Result, fail, succeed } from '@fgv/ts-utils';\nimport { Helpers as CommonHelpers, QualifierName, QualifierContextValue } from '../common';\nimport {\n IValidatedQualifierDefaultValueDecl,\n IValidatedQualifierDefaultValuesDecl\n} from './qualifierDefaultValueDecls';\nimport { IReadOnlyQualifierCollector } from './qualifierCollector';\n\n/**\n * Helper class to parse and validate qualifier default value tokens.\n * @public\n */\nexport class QualifierDefaultValueTokens {\n /**\n * The {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to validate\n * qualifier names and values.\n */\n public readonly qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Constructs a new {@link Qualifiers.QualifierDefaultValueTokens | QualifierDefaultValueTokens } instance.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n */\n public constructor(qualifiers: IReadOnlyQualifierCollector) {\n this.qualifiers = qualifiers;\n }\n\n /**\n * Parses a {@link QualifierDefaultValueToken | qualifier default value token} string and validates the parts\n * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.\n * @param token - the token string to parse.\n * @returns `Success` with the {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration}\n * if successful, `Failure` with an error message if not.\n */\n public parseQualifierDefaultValueToken(token: string): Result<IValidatedQualifierDefaultValueDecl> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValueToken(token, this.qualifiers);\n }\n\n /**\n * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} string and validates the parts\n * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.\n * @param token - the token string to parse.\n * @returns `Success` with the array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}\n * if successful, `Failure` with an error message if not.\n */\n public parseQualifierDefaultValuesToken(token: string): Result<IValidatedQualifierDefaultValueDecl[]> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, this.qualifiers);\n }\n\n /**\n * Validates the {@link Helpers.IQualifierDefaultValueTokenParts | parts} of a {@link QualifierDefaultValueToken | qualifier default value token}.\n * @param parts - the parts to validate\n * @returns `Success` with the validated declaration if successful, `Failure` with an error message if not.\n */\n public validateQualifierDefaultValueTokenParts(\n parts: CommonHelpers.IQualifierDefaultValueTokenParts\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, this.qualifiers);\n }\n\n /**\n * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.\n * @param token - the qualifier default values token to convert\n * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.\n */\n public qualifierDefaultValuesTokenToDecl(token: string): Result<IValidatedQualifierDefaultValuesDecl> {\n return QualifierDefaultValueTokens.qualifierDefaultValuesTokenToDecl(token, this.qualifiers);\n }\n\n /**\n * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.\n * @param decl - the validated qualifier default values declaration to convert\n * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.\n */\n public declToQualifierDefaultValuesToken(decl: IValidatedQualifierDefaultValuesDecl): Result<string> {\n return QualifierDefaultValueTokens.declToQualifierDefaultValuesToken(decl);\n }\n\n /**\n * Parses a {@link QualifierDefaultValueToken | qualifier default value token} and validates it against the qualifiers\n * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param token - the token string to parse.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,\n * `Failure` with an error message if not.\n */\n public static parseQualifierDefaultValueToken(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return CommonHelpers.parseQualifierDefaultValueTokenParts(token).onSuccess((parts) => {\n return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, qualifiers);\n });\n }\n\n /**\n * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} and validates it against the qualifiers\n * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param token - the token string to parse.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with an array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}\n * if successful, `Failure` with an error message if not\n */\n public static parseQualifierDefaultValuesToken(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl[]> {\n return CommonHelpers.parseQualifierDefaultValuesTokenParts(token).onSuccess((parts) => {\n return mapResults(\n parts.map((part) =>\n QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(part, qualifiers)\n )\n );\n });\n }\n\n /**\n * Validates the parts of a qualifier default value token against the qualifiers present in the supplied\n * {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param parts - the {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} to validate.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to\n * validate qualifier names and values.\n * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,\n * `Failure` with an error message if not.\n */\n public static validateQualifierDefaultValueTokenParts(\n parts: CommonHelpers.IQualifierDefaultValueTokenParts,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return qualifiers.getByNameOrToken(parts.qualifier).onSuccess((qualifier) => {\n // Allow empty values to remove defaults\n if (parts.value === '') {\n return succeed({ qualifier, value: '' as QualifierContextValue });\n }\n\n return qualifier.type\n .validateContextValue(parts.value)\n .onSuccess((value) => {\n return succeed({ qualifier, value });\n })\n .withDetail('failure', 'success');\n });\n }\n\n /**\n * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.\n * @param token - the qualifier default values token to convert\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.\n */\n public static qualifierDefaultValuesTokenToDecl(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValuesDecl> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, qualifiers).onSuccess(\n (qualifierDefaultValues) => {\n const defaultValues: IValidatedQualifierDefaultValuesDecl = {};\n\n for (const { qualifier, value } of qualifierDefaultValues) {\n const qualifierName = qualifier.name as QualifierName;\n const contextValue = value as QualifierContextValue;\n\n // Check for duplicate qualifiers\n if (qualifierName in defaultValues) {\n return fail(`${qualifier.name}: duplicate qualifier in default values token`);\n }\n\n // Only add non-empty values (empty values remove defaults)\n if (contextValue !== '') {\n defaultValues[qualifierName] = contextValue;\n }\n }\n\n return succeed(defaultValues);\n }\n );\n }\n\n /**\n * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.\n * @param decl - the validated qualifier default values declaration to convert\n * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.\n */\n public static declToQualifierDefaultValuesToken(\n decl: IValidatedQualifierDefaultValuesDecl\n ): Result<string> {\n const tokens: string[] = [];\n\n for (const [qualifierName, contextValue] of Object.entries(decl)) {\n // Build token as \"qualifier=value\"\n tokens.push(`${qualifierName}=${contextValue}`);\n }\n\n if (tokens.length === 0) {\n return succeed('');\n }\n\n const tokenString = tokens.join('|');\n\n // Validate the generated token\n return CommonHelpers.buildQualifierDefaultValuesToken(\n tokens.map((token) => {\n const [qualifier, value] = token.split('=');\n return { qualifier, value };\n })\n ).onSuccess(() => succeed(tokenString));\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Options for controlling the compilation of resource objects.
3
+ * @public
4
+ */
5
+ export interface ICompiledResourceOptions {
6
+ /**
7
+ * Whether to include metadata in the compiled objects.
8
+ * Metadata includes human-readable information like semantic keys
9
+ * that can be useful for debugging or tooling.
10
+ * @defaultValue false
11
+ */
12
+ includeMetadata?: boolean;
13
+ }
14
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/common.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2025 Erik Fortune
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in all
13
+ * copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ * SOFTWARE.
22
+ */
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Options for controlling the compilation of resource objects.\n * @public\n */\nexport interface ICompiledResourceOptions {\n /**\n * Whether to include metadata in the compiled objects.\n * Metadata includes human-readable information like semantic keys\n * that can be useful for debugging or tooling.\n * @defaultValue false\n */\n includeMetadata?: boolean;\n}\n"]}
@@ -0,0 +1,63 @@
1
+ import * as Model from './json';
2
+ /**
3
+ * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.
4
+ * @public
5
+ */
6
+ export declare const compiledConditionMetadata: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledConditionMetadata, unknown>;
7
+ /**
8
+ * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.
9
+ * @public
10
+ */
11
+ export declare const compiledConditionSetMetadata: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledConditionSetMetadata, unknown>;
12
+ /**
13
+ * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.
14
+ * @public
15
+ */
16
+ export declare const compiledDecisionMetadata: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledDecisionMetadata, unknown>;
17
+ /**
18
+ * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.
19
+ * @public
20
+ */
21
+ export declare const compiledQualifierType: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledQualifierType, unknown>;
22
+ /**
23
+ * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.
24
+ * @public
25
+ */
26
+ export declare const compiledQualifier: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledQualifier, unknown>;
27
+ /**
28
+ * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.
29
+ * @public
30
+ */
31
+ export declare const compiledResourceType: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledResourceType, unknown>;
32
+ /**
33
+ * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.
34
+ * @public
35
+ */
36
+ export declare const compiledCondition: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledCondition, unknown>;
37
+ /**
38
+ * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.
39
+ * @public
40
+ */
41
+ export declare const compiledConditionSet: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledConditionSet, unknown>;
42
+ /**
43
+ * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.
44
+ * @public
45
+ */
46
+ export declare const compiledAbstractDecision: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledAbstractDecision, unknown>;
47
+ /**
48
+ * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.
49
+ * @public
50
+ */
51
+ export declare const compiledCandidate: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledCandidate, unknown>;
52
+ /**
53
+ * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.
54
+ * @public
55
+ */
56
+ export declare const compiledResource: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledResource, unknown>;
57
+ /**
58
+ * Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.
59
+ * This combines all the individual converters into a single converter for the entire resource collection.
60
+ * @public
61
+ */
62
+ export declare const compiledResourceCollection: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledResourceCollection, unknown>;
63
+ //# sourceMappingURL=convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/convert.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAIhC;;;GAGG;AACH,eAAO,MAAM,yBAAyB,oFAEpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,uFAEvC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mFAEnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,gFAEhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+EAE/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAO5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+EAG/B,CAAC;AACH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mFAGnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2EAK3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,qFAQrC,CAAC"}
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.compiledResourceCollection = exports.compiledResource = exports.compiledCandidate = exports.compiledAbstractDecision = exports.compiledConditionSet = exports.compiledCondition = exports.compiledResourceType = exports.compiledQualifier = exports.compiledQualifierType = exports.compiledDecisionMetadata = exports.compiledConditionSetMetadata = exports.compiledConditionMetadata = void 0;
37
+ /*
38
+ * Copyright (c) 2025 Erik Fortune
39
+ *
40
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
41
+ * of this software and associated documentation files (the "Software"), to deal
42
+ * in the Software without restriction, including without limitation the rights
43
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
+ * copies of the Software, and to permit persons to whom the Software is
45
+ * furnished to do so, subject to the following conditions:
46
+ *
47
+ * The above copyright notice and this permission notice shall be included in all
48
+ * copies or substantial portions of the Software.
49
+ *
50
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56
+ * SOFTWARE.
57
+ */
58
+ const Common = __importStar(require("../../common"));
59
+ const ts_utils_1 = require("@fgv/ts-utils");
60
+ const ts_json_base_1 = require("@fgv/ts-json-base");
61
+ /* eslint-disable @rushstack/typedef-var */
62
+ /**
63
+ * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.
64
+ * @public
65
+ */
66
+ exports.compiledConditionMetadata = ts_utils_1.Converters.strictObject({
67
+ key: Common.Convert.conditionKey
68
+ });
69
+ /**
70
+ * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.
71
+ * @public
72
+ */
73
+ exports.compiledConditionSetMetadata = ts_utils_1.Converters.strictObject({
74
+ key: Common.Convert.conditionSetKey
75
+ });
76
+ /**
77
+ * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.
78
+ * @public
79
+ */
80
+ exports.compiledDecisionMetadata = ts_utils_1.Converters.strictObject({
81
+ key: Common.Convert.decisionKey
82
+ });
83
+ /**
84
+ * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.
85
+ * @public
86
+ */
87
+ exports.compiledQualifierType = ts_utils_1.Converters.strictObject({
88
+ name: Common.Convert.qualifierTypeName
89
+ });
90
+ /**
91
+ * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.
92
+ * @public
93
+ */
94
+ exports.compiledQualifier = ts_utils_1.Converters.strictObject({
95
+ name: Common.Convert.qualifierName,
96
+ type: Common.Convert.qualifierTypeIndex,
97
+ defaultPriority: Common.Convert.conditionPriority
98
+ });
99
+ /**
100
+ * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.
101
+ * @public
102
+ */
103
+ exports.compiledResourceType = ts_utils_1.Converters.strictObject({
104
+ name: Common.Convert.resourceTypeName
105
+ });
106
+ /**
107
+ * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.
108
+ * @public
109
+ */
110
+ exports.compiledCondition = ts_utils_1.Converters.strictObject({
111
+ qualifierIndex: Common.Convert.qualifierIndex,
112
+ operator: Common.Convert.conditionOperator.optional(),
113
+ value: ts_utils_1.Converters.string,
114
+ priority: Common.Convert.conditionPriority,
115
+ scoreAsDefault: Common.Convert.qualifierMatchScore.optional(),
116
+ metadata: exports.compiledConditionMetadata.optional()
117
+ });
118
+ /**
119
+ * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.
120
+ * @public
121
+ */
122
+ exports.compiledConditionSet = ts_utils_1.Converters.strictObject({
123
+ conditions: ts_utils_1.Converters.arrayOf(Common.Convert.conditionIndex),
124
+ metadata: exports.compiledConditionSetMetadata.optional()
125
+ });
126
+ /**
127
+ * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.
128
+ * @public
129
+ */
130
+ exports.compiledAbstractDecision = ts_utils_1.Converters.strictObject({
131
+ conditionSets: ts_utils_1.Converters.arrayOf(Common.Convert.conditionSetIndex),
132
+ metadata: exports.compiledDecisionMetadata.optional()
133
+ });
134
+ /**
135
+ * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.
136
+ * @public
137
+ */
138
+ exports.compiledCandidate = ts_utils_1.Converters.strictObject({
139
+ json: ts_json_base_1.Converters.jsonValue,
140
+ isPartial: ts_utils_1.Converters.boolean,
141
+ mergeMethod: Common.Convert.resourceValueMergeMethod
142
+ });
143
+ /**
144
+ * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.
145
+ * @public
146
+ */
147
+ exports.compiledResource = ts_utils_1.Converters.strictObject({
148
+ id: Common.Convert.resourceId,
149
+ type: Common.Convert.resourceTypeIndex,
150
+ decision: Common.Convert.decisionIndex,
151
+ candidates: ts_utils_1.Converters.arrayOf(exports.compiledCandidate)
152
+ });
153
+ /**
154
+ * Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.
155
+ * This combines all the individual converters into a single converter for the entire resource collection.
156
+ * @public
157
+ */
158
+ exports.compiledResourceCollection = ts_utils_1.Converters.strictObject({
159
+ qualifiers: ts_utils_1.Converters.arrayOf(exports.compiledQualifier),
160
+ qualifierTypes: ts_utils_1.Converters.arrayOf(exports.compiledQualifierType),
161
+ resourceTypes: ts_utils_1.Converters.arrayOf(exports.compiledResourceType),
162
+ conditions: ts_utils_1.Converters.arrayOf(exports.compiledCondition),
163
+ conditionSets: ts_utils_1.Converters.arrayOf(exports.compiledConditionSet),
164
+ decisions: ts_utils_1.Converters.arrayOf(exports.compiledAbstractDecision),
165
+ resources: ts_utils_1.Converters.arrayOf(exports.compiledResource)
166
+ });
167
+ //# sourceMappingURL=convert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/convert.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qDAAuC;AACvC,4CAA2C;AAC3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Aa,EAAE,qBAAU,CAAC,OAAO,CAAC,4BAAoB,CAAC;IACvD,UAAU,EAAE,qBAAU,CAAC,OAAO,CAAC,yBAAiB,CAAC;IACjD,aAAa,EAAE,qBAAU,CAAC,OAAO,CAAC,4BAAoB,CAAC;IACvD,SAAS,EAAE,qBAAU,CAAC,OAAO,CAAC,gCAAwB,CAAC;IACvD,SAAS,EAAE,qBAAU,CAAC,OAAO,CAAC,wBAAgB,CAAC;CAChD,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 */\nimport * as Common from '../../common';\nimport { Converters } from '@fgv/ts-utils';\nimport { Converters as JsonConverters } from '@fgv/ts-json-base';\nimport * as Model from './json';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.\n * @public\n */\nexport const compiledConditionMetadata = Converters.strictObject<Model.ICompiledConditionMetadata>({\n key: Common.Convert.conditionKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.\n * @public\n */\nexport const compiledConditionSetMetadata = Converters.strictObject<Model.ICompiledConditionSetMetadata>({\n key: Common.Convert.conditionSetKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.\n * @public\n */\nexport const compiledDecisionMetadata = Converters.strictObject<Model.ICompiledDecisionMetadata>({\n key: Common.Convert.decisionKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.\n * @public\n */\nexport const compiledQualifierType = Converters.strictObject<Model.ICompiledQualifierType>({\n name: Common.Convert.qualifierTypeName\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.\n * @public\n */\nexport const compiledQualifier = Converters.strictObject<Model.ICompiledQualifier>({\n name: Common.Convert.qualifierName,\n type: Common.Convert.qualifierTypeIndex,\n defaultPriority: Common.Convert.conditionPriority\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.\n * @public\n */\nexport const compiledResourceType = Converters.strictObject<Model.ICompiledResourceType>({\n name: Common.Convert.resourceTypeName\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.\n * @public\n */\nexport const compiledCondition = Converters.strictObject<Model.ICompiledCondition>({\n qualifierIndex: Common.Convert.qualifierIndex,\n operator: Common.Convert.conditionOperator.optional(),\n value: Converters.string,\n priority: Common.Convert.conditionPriority,\n scoreAsDefault: Common.Convert.qualifierMatchScore.optional(),\n metadata: compiledConditionMetadata.optional()\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.\n * @public\n */\nexport const compiledConditionSet = Converters.strictObject<Model.ICompiledConditionSet>({\n conditions: Converters.arrayOf(Common.Convert.conditionIndex),\n metadata: compiledConditionSetMetadata.optional()\n});\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.\n * @public\n */\nexport const compiledAbstractDecision = Converters.strictObject<Model.ICompiledAbstractDecision>({\n conditionSets: Converters.arrayOf(Common.Convert.conditionSetIndex),\n metadata: compiledDecisionMetadata.optional()\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.\n * @public\n */\nexport const compiledCandidate = Converters.strictObject<Model.ICompiledCandidate>({\n json: JsonConverters.jsonValue,\n isPartial: Converters.boolean,\n mergeMethod: Common.Convert.resourceValueMergeMethod\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.\n * @public\n */\nexport const compiledResource = Converters.strictObject<Model.ICompiledResource>({\n id: Common.Convert.resourceId,\n type: Common.Convert.resourceTypeIndex,\n decision: Common.Convert.decisionIndex,\n candidates: Converters.arrayOf(compiledCandidate)\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.\n * This combines all the individual converters into a single converter for the entire resource collection.\n * @public\n */\nexport const compiledResourceCollection = Converters.strictObject<Model.ICompiledResourceCollection>({\n qualifiers: Converters.arrayOf(compiledQualifier),\n qualifierTypes: Converters.arrayOf(compiledQualifierType),\n resourceTypes: Converters.arrayOf(compiledResourceType),\n conditions: Converters.arrayOf(compiledCondition),\n conditionSets: Converters.arrayOf(compiledConditionSet),\n decisions: Converters.arrayOf(compiledAbstractDecision),\n resources: Converters.arrayOf(compiledResource)\n});\n"]}
@@ -0,0 +1,5 @@
1
+ import * as Convert from './convert';
2
+ export * from './common';
3
+ export * from './json';
4
+ export { Convert };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}