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

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 (436) 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 +5253 -699
  8. package/dist/tsdoc-metadata.json +1 -1
  9. package/lib/index.d.ts +13 -2
  10. package/lib/index.d.ts.map +1 -1
  11. package/lib/index.js +29 -2
  12. package/lib/index.js.map +1 -1
  13. package/lib/packlets/bundle/bundleBuilder.d.ts +41 -0
  14. package/lib/packlets/bundle/bundleBuilder.d.ts.map +1 -0
  15. package/lib/packlets/bundle/bundleBuilder.js +134 -0
  16. package/lib/packlets/bundle/bundleBuilder.js.map +1 -0
  17. package/lib/packlets/bundle/bundleLoader.d.ts +72 -0
  18. package/lib/packlets/bundle/bundleLoader.d.ts.map +1 -0
  19. package/lib/packlets/bundle/bundleLoader.js +105 -0
  20. package/lib/packlets/bundle/bundleLoader.js.map +1 -0
  21. package/lib/packlets/bundle/bundleNormalizer.d.ts +73 -0
  22. package/lib/packlets/bundle/bundleNormalizer.d.ts.map +1 -0
  23. package/lib/packlets/bundle/bundleNormalizer.js +142 -0
  24. package/lib/packlets/bundle/bundleNormalizer.js.map +1 -0
  25. package/lib/packlets/bundle/bundleUtils.d.ts +70 -0
  26. package/lib/packlets/bundle/bundleUtils.d.ts.map +1 -0
  27. package/lib/packlets/bundle/bundleUtils.js +117 -0
  28. package/lib/packlets/bundle/bundleUtils.js.map +1 -0
  29. package/lib/packlets/bundle/convert.d.ts +33 -0
  30. package/lib/packlets/bundle/convert.d.ts.map +1 -0
  31. package/lib/packlets/bundle/convert.js +78 -0
  32. package/lib/packlets/bundle/convert.js.map +1 -0
  33. package/lib/packlets/bundle/index.d.ts +21 -0
  34. package/lib/packlets/bundle/index.d.ts.map +1 -0
  35. package/lib/packlets/bundle/index.js +83 -0
  36. package/lib/packlets/bundle/index.js.map +1 -0
  37. package/lib/packlets/bundle/model.d.ts +100 -0
  38. package/lib/packlets/bundle/model.d.ts.map +1 -0
  39. package/lib/packlets/bundle/model.js +24 -0
  40. package/lib/packlets/bundle/model.js.map +1 -0
  41. package/lib/packlets/common/conditions.d.ts +30 -0
  42. package/lib/packlets/common/conditions.d.ts.map +1 -1
  43. package/lib/packlets/common/conditions.js.map +1 -1
  44. package/lib/packlets/common/convert.d.ts +22 -2
  45. package/lib/packlets/common/convert.d.ts.map +1 -1
  46. package/lib/packlets/common/convert.js +21 -1
  47. package/lib/packlets/common/convert.js.map +1 -1
  48. package/lib/packlets/common/helpers/context.d.ts +39 -0
  49. package/lib/packlets/common/helpers/context.d.ts.map +1 -0
  50. package/lib/packlets/common/helpers/context.js +108 -0
  51. package/lib/packlets/common/helpers/context.js.map +1 -0
  52. package/lib/packlets/common/helpers/index.d.ts +2 -0
  53. package/lib/packlets/common/helpers/index.d.ts.map +1 -1
  54. package/lib/packlets/common/helpers/index.js +2 -0
  55. package/lib/packlets/common/helpers/index.js.map +1 -1
  56. package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts +39 -0
  57. package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +1 -0
  58. package/lib/packlets/common/helpers/qualifierDefaultValues.js +105 -0
  59. package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
  60. package/lib/packlets/common/helpers/resources.d.ts.map +1 -1
  61. package/lib/packlets/common/helpers/resources.js +6 -2
  62. package/lib/packlets/common/helpers/resources.js.map +1 -1
  63. package/lib/packlets/common/resources.d.ts +8 -0
  64. package/lib/packlets/common/resources.d.ts.map +1 -1
  65. package/lib/packlets/common/resources.js.map +1 -1
  66. package/lib/packlets/common/validate/conditions.d.ts +69 -1
  67. package/lib/packlets/common/validate/conditions.d.ts.map +1 -1
  68. package/lib/packlets/common/validate/conditions.js +126 -0
  69. package/lib/packlets/common/validate/conditions.js.map +1 -1
  70. package/lib/packlets/common/validate/regularExpressions.d.ts +20 -0
  71. package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -1
  72. package/lib/packlets/common/validate/regularExpressions.js +21 -1
  73. package/lib/packlets/common/validate/regularExpressions.js.map +1 -1
  74. package/lib/packlets/conditions/condition.d.ts +37 -0
  75. package/lib/packlets/conditions/condition.d.ts.map +1 -1
  76. package/lib/packlets/conditions/condition.js +67 -1
  77. package/lib/packlets/conditions/condition.js.map +1 -1
  78. package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -1
  79. package/lib/packlets/conditions/conditionCollector.js +1 -0
  80. package/lib/packlets/conditions/conditionCollector.js.map +1 -1
  81. package/lib/packlets/conditions/conditionSet.d.ts +43 -3
  82. package/lib/packlets/conditions/conditionSet.d.ts.map +1 -1
  83. package/lib/packlets/conditions/conditionSet.js +104 -3
  84. package/lib/packlets/conditions/conditionSet.js.map +1 -1
  85. package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -1
  86. package/lib/packlets/conditions/conditionSetCollector.js +3 -0
  87. package/lib/packlets/conditions/conditionSetCollector.js.map +1 -1
  88. package/lib/packlets/conditions/conditionToken.d.ts.map +1 -1
  89. package/lib/packlets/conditions/conditionToken.js +2 -1
  90. package/lib/packlets/conditions/conditionToken.js.map +1 -1
  91. package/lib/packlets/conditions/convert/decls.js +1 -1
  92. package/lib/packlets/conditions/convert/decls.js.map +1 -1
  93. package/lib/packlets/config/common.d.ts +35 -0
  94. package/lib/packlets/config/common.d.ts.map +1 -0
  95. package/lib/packlets/config/common.js +96 -0
  96. package/lib/packlets/config/common.js.map +1 -0
  97. package/lib/packlets/config/convert.d.ts +14 -0
  98. package/lib/packlets/config/convert.d.ts.map +1 -0
  99. package/lib/packlets/config/convert.js +82 -0
  100. package/lib/packlets/config/convert.js.map +1 -0
  101. package/lib/packlets/config/index.d.ts +6 -0
  102. package/lib/packlets/config/index.d.ts.map +1 -0
  103. package/lib/packlets/config/index.js +67 -0
  104. package/lib/packlets/config/index.js.map +1 -0
  105. package/lib/packlets/config/json.d.ts +20 -0
  106. package/lib/packlets/config/json.d.ts.map +1 -0
  107. package/lib/packlets/config/json.js +24 -0
  108. package/lib/packlets/config/json.js.map +1 -0
  109. package/lib/packlets/config/predefined/default.d.ts +57 -0
  110. package/lib/packlets/config/predefined/default.d.ts.map +1 -0
  111. package/lib/packlets/config/predefined/default.js +141 -0
  112. package/lib/packlets/config/predefined/default.js.map +1 -0
  113. package/lib/packlets/config/predefined/extended.d.ts +25 -0
  114. package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
  115. package/lib/packlets/config/predefined/extended.js +193 -0
  116. package/lib/packlets/config/predefined/extended.js.map +1 -0
  117. package/lib/packlets/config/predefined/index.d.ts +4 -0
  118. package/lib/packlets/config/predefined/index.d.ts.map +1 -0
  119. package/lib/packlets/config/predefined/index.js +62 -0
  120. package/lib/packlets/config/predefined/index.js.map +1 -0
  121. package/lib/packlets/config/systemConfiguration.d.ts +81 -0
  122. package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
  123. package/lib/packlets/config/systemConfiguration.js +172 -0
  124. package/lib/packlets/config/systemConfiguration.js.map +1 -0
  125. package/lib/packlets/context/contextDecls.d.ts +49 -0
  126. package/lib/packlets/context/contextDecls.d.ts.map +1 -0
  127. package/lib/packlets/context/contextDecls.js +24 -0
  128. package/lib/packlets/context/contextDecls.js.map +1 -0
  129. package/lib/packlets/context/contextToken.d.ts +111 -0
  130. package/lib/packlets/context/contextToken.d.ts.map +1 -0
  131. package/lib/packlets/context/contextToken.js +206 -0
  132. package/lib/packlets/context/contextToken.js.map +1 -0
  133. package/lib/packlets/context/convert/decls.d.ts +37 -0
  134. package/lib/packlets/context/convert/decls.d.ts.map +1 -0
  135. package/lib/packlets/context/convert/decls.js +94 -0
  136. package/lib/packlets/context/convert/decls.js.map +1 -0
  137. package/lib/packlets/context/convert/index.d.ts +2 -0
  138. package/lib/packlets/context/convert/index.d.ts.map +1 -0
  139. package/lib/packlets/context/convert/index.js +39 -0
  140. package/lib/packlets/context/convert/index.js.map +1 -0
  141. package/lib/packlets/context/index.d.ts +5 -0
  142. package/lib/packlets/context/index.d.ts.map +1 -0
  143. package/lib/packlets/context/index.js +65 -0
  144. package/lib/packlets/context/index.js.map +1 -0
  145. package/lib/packlets/decisions/abstractDecision.d.ts +8 -0
  146. package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -1
  147. package/lib/packlets/decisions/abstractDecision.js +9 -0
  148. package/lib/packlets/decisions/abstractDecision.js.map +1 -1
  149. package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -1
  150. package/lib/packlets/decisions/abstractDecisionCollector.js +2 -0
  151. package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -1
  152. package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -1
  153. package/lib/packlets/decisions/concreteDecision.js +1 -0
  154. package/lib/packlets/decisions/concreteDecision.js.map +1 -1
  155. package/lib/packlets/decisions/decision.d.ts.map +1 -1
  156. package/lib/packlets/decisions/decision.js +4 -0
  157. package/lib/packlets/decisions/decision.js.map +1 -1
  158. package/lib/packlets/import/fsItem.d.ts.map +1 -1
  159. package/lib/packlets/import/fsItem.js +8 -12
  160. package/lib/packlets/import/fsItem.js.map +1 -1
  161. package/lib/packlets/import/importContext.d.ts +19 -0
  162. package/lib/packlets/import/importContext.d.ts.map +1 -1
  163. package/lib/packlets/import/importContext.js +39 -0
  164. package/lib/packlets/import/importContext.js.map +1 -1
  165. package/lib/packlets/import/importManager.d.ts +5 -5
  166. package/lib/packlets/import/importManager.d.ts.map +1 -1
  167. package/lib/packlets/import/importManager.js.map +1 -1
  168. package/lib/packlets/import/importers/collectionImporter.d.ts +11 -13
  169. package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -1
  170. package/lib/packlets/import/importers/collectionImporter.js +29 -20
  171. package/lib/packlets/import/importers/collectionImporter.js.map +1 -1
  172. package/lib/packlets/import/importers/fsItemImporter.d.ts +2 -2
  173. package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -1
  174. package/lib/packlets/import/importers/fsItemImporter.js +2 -2
  175. package/lib/packlets/import/importers/fsItemImporter.js.map +1 -1
  176. package/lib/packlets/import/importers/importer.d.ts +3 -3
  177. package/lib/packlets/import/importers/importer.d.ts.map +1 -1
  178. package/lib/packlets/import/importers/importer.js.map +1 -1
  179. package/lib/packlets/import/importers/jsonImporter.d.ts +2 -3
  180. package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -1
  181. package/lib/packlets/import/importers/jsonImporter.js +11 -20
  182. package/lib/packlets/import/importers/jsonImporter.js.map +1 -1
  183. package/lib/packlets/import/importers/pathImporter.d.ts +2 -2
  184. package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -1
  185. package/lib/packlets/import/importers/pathImporter.js.map +1 -1
  186. package/lib/packlets/qualifier-types/config/convert.d.ts +44 -0
  187. package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
  188. package/lib/packlets/qualifier-types/config/convert.js +96 -0
  189. package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
  190. package/lib/packlets/qualifier-types/config/index.d.ts +4 -0
  191. package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
  192. package/lib/packlets/qualifier-types/config/index.js +64 -0
  193. package/lib/packlets/qualifier-types/config/index.js.map +1 -0
  194. package/lib/packlets/qualifier-types/config/json.d.ts +69 -0
  195. package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
  196. package/lib/packlets/qualifier-types/config/json.js +24 -0
  197. package/lib/packlets/qualifier-types/config/json.js.map +1 -0
  198. package/lib/packlets/qualifier-types/convert.d.ts +10 -2
  199. package/lib/packlets/qualifier-types/convert.d.ts.map +1 -1
  200. package/lib/packlets/qualifier-types/convert.js +15 -0
  201. package/lib/packlets/qualifier-types/convert.js.map +1 -1
  202. package/lib/packlets/qualifier-types/helpers.d.ts +27 -0
  203. package/lib/packlets/qualifier-types/helpers.d.ts.map +1 -0
  204. package/lib/packlets/qualifier-types/helpers.js +118 -0
  205. package/lib/packlets/qualifier-types/helpers.js.map +1 -0
  206. package/lib/packlets/qualifier-types/index.d.ts +4 -1
  207. package/lib/packlets/qualifier-types/index.d.ts.map +1 -1
  208. package/lib/packlets/qualifier-types/index.js +5 -1
  209. package/lib/packlets/qualifier-types/index.js.map +1 -1
  210. package/lib/packlets/qualifier-types/languageQualifierType.d.ts +19 -8
  211. package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -1
  212. package/lib/packlets/qualifier-types/languageQualifierType.js +28 -9
  213. package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -1
  214. package/lib/packlets/qualifier-types/literalQualifierType.d.ts +42 -13
  215. package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -1
  216. package/lib/packlets/qualifier-types/literalQualifierType.js +58 -10
  217. package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -1
  218. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts +114 -0
  219. package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
  220. package/lib/packlets/qualifier-types/literalValueHierarchy.js +228 -0
  221. package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
  222. package/lib/packlets/qualifier-types/qualifierType.d.ts +33 -18
  223. package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -1
  224. package/lib/packlets/qualifier-types/qualifierType.js +18 -4
  225. package/lib/packlets/qualifier-types/qualifierType.js.map +1 -1
  226. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts +4 -2
  227. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -1
  228. package/lib/packlets/qualifier-types/qualifierTypeCollector.js +2 -1
  229. package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -1
  230. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +47 -11
  231. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -1
  232. package/lib/packlets/qualifier-types/territoryQualifierType.js +61 -17
  233. package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -1
  234. package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -1
  235. package/lib/packlets/qualifiers/convert/decls.js +17 -15
  236. package/lib/packlets/qualifiers/convert/decls.js.map +1 -1
  237. package/lib/packlets/qualifiers/index.d.ts +2 -0
  238. package/lib/packlets/qualifiers/index.d.ts.map +1 -1
  239. package/lib/packlets/qualifiers/index.js +2 -0
  240. package/lib/packlets/qualifiers/index.js.map +1 -1
  241. package/lib/packlets/qualifiers/qualifier.d.ts +22 -2
  242. package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -1
  243. package/lib/packlets/qualifiers/qualifier.js +26 -1
  244. package/lib/packlets/qualifiers/qualifier.js.map +1 -1
  245. package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -1
  246. package/lib/packlets/qualifiers/qualifierCollector.js +3 -0
  247. package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -1
  248. package/lib/packlets/qualifiers/qualifierDecl.d.ts +6 -1
  249. package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -1
  250. package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -1
  251. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts +32 -0
  252. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +1 -0
  253. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js +24 -0
  254. package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
  255. package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts +96 -0
  256. package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +1 -0
  257. package/lib/packlets/qualifiers/qualifierDefaultValueToken.js +179 -0
  258. package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
  259. package/lib/packlets/resource-json/compiled/common.d.ts +14 -0
  260. package/lib/packlets/resource-json/compiled/common.d.ts.map +1 -0
  261. package/lib/packlets/resource-json/compiled/common.js +24 -0
  262. package/lib/packlets/resource-json/compiled/common.js.map +1 -0
  263. package/lib/packlets/resource-json/compiled/convert.d.ts +63 -0
  264. package/lib/packlets/resource-json/compiled/convert.d.ts.map +1 -0
  265. package/lib/packlets/resource-json/compiled/convert.js +167 -0
  266. package/lib/packlets/resource-json/compiled/convert.js.map +1 -0
  267. package/lib/packlets/resource-json/compiled/index.d.ts +5 -0
  268. package/lib/packlets/resource-json/compiled/index.d.ts.map +1 -0
  269. package/lib/packlets/resource-json/compiled/index.js +65 -0
  270. package/lib/packlets/resource-json/compiled/index.js.map +1 -0
  271. package/lib/packlets/resource-json/compiled/json.d.ts +204 -0
  272. package/lib/packlets/resource-json/compiled/json.d.ts.map +1 -0
  273. package/lib/packlets/resource-json/compiled/json.js +3 -0
  274. package/lib/packlets/resource-json/compiled/json.js.map +1 -0
  275. package/lib/packlets/resource-json/convert.d.ts +16 -0
  276. package/lib/packlets/resource-json/convert.d.ts.map +1 -1
  277. package/lib/packlets/resource-json/convert.js +41 -6
  278. package/lib/packlets/resource-json/convert.js.map +1 -1
  279. package/lib/packlets/resource-json/helpers.d.ts +82 -3
  280. package/lib/packlets/resource-json/helpers.d.ts.map +1 -1
  281. package/lib/packlets/resource-json/helpers.js +185 -2
  282. package/lib/packlets/resource-json/helpers.js.map +1 -1
  283. package/lib/packlets/resource-json/index.d.ts +2 -1
  284. package/lib/packlets/resource-json/index.d.ts.map +1 -1
  285. package/lib/packlets/resource-json/index.js +3 -1
  286. package/lib/packlets/resource-json/index.js.map +1 -1
  287. package/lib/packlets/resource-json/json.d.ts +55 -3
  288. package/lib/packlets/resource-json/json.d.ts.map +1 -1
  289. package/lib/packlets/resource-json/json.js +16 -0
  290. package/lib/packlets/resource-json/json.js.map +1 -1
  291. package/lib/packlets/resource-json/normalized.d.ts +46 -3
  292. package/lib/packlets/resource-json/normalized.d.ts.map +1 -1
  293. package/lib/packlets/resource-json/normalized.js.map +1 -1
  294. package/lib/packlets/resource-json/resourceDeclCollection.d.ts +14 -10
  295. package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -1
  296. package/lib/packlets/resource-json/resourceDeclCollection.js +18 -14
  297. package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -1
  298. package/lib/packlets/resource-json/resourceDeclContainer.d.ts +15 -2
  299. package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -1
  300. package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -1
  301. package/lib/packlets/resource-json/resourceDeclTree.d.ts +6 -2
  302. package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -1
  303. package/lib/packlets/resource-json/resourceDeclTree.js +12 -3
  304. package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -1
  305. package/lib/packlets/resource-types/config/convert.d.ts +8 -0
  306. package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
  307. package/lib/packlets/resource-types/config/convert.js +36 -0
  308. package/lib/packlets/resource-types/config/convert.js.map +1 -0
  309. package/lib/packlets/resource-types/config/index.d.ts +4 -0
  310. package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
  311. package/lib/packlets/resource-types/config/index.js +64 -0
  312. package/lib/packlets/resource-types/config/index.js.map +1 -0
  313. package/lib/packlets/resource-types/config/json.d.ts +9 -0
  314. package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
  315. package/lib/packlets/resource-types/config/json.js +24 -0
  316. package/lib/packlets/resource-types/config/json.js.map +1 -0
  317. package/lib/packlets/resource-types/helpers.d.ts +13 -0
  318. package/lib/packlets/resource-types/helpers.d.ts.map +1 -0
  319. package/lib/packlets/resource-types/helpers.js +44 -0
  320. package/lib/packlets/resource-types/helpers.js.map +1 -0
  321. package/lib/packlets/resource-types/index.d.ts +3 -0
  322. package/lib/packlets/resource-types/index.d.ts.map +1 -1
  323. package/lib/packlets/resource-types/index.js +26 -0
  324. package/lib/packlets/resource-types/index.js.map +1 -1
  325. package/lib/packlets/resource-types/jsonResourceType.d.ts +8 -16
  326. package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -1
  327. package/lib/packlets/resource-types/jsonResourceType.js +6 -3
  328. package/lib/packlets/resource-types/jsonResourceType.js.map +1 -1
  329. package/lib/packlets/resource-types/resourceType.d.ts +45 -35
  330. package/lib/packlets/resource-types/resourceType.d.ts.map +1 -1
  331. package/lib/packlets/resource-types/resourceType.js.map +1 -1
  332. package/lib/packlets/resources/candidateReducer.d.ts +98 -0
  333. package/lib/packlets/resources/candidateReducer.d.ts.map +1 -0
  334. package/lib/packlets/resources/candidateReducer.js +247 -0
  335. package/lib/packlets/resources/candidateReducer.js.map +1 -0
  336. package/lib/packlets/resources/common.d.ts +72 -0
  337. package/lib/packlets/resources/common.d.ts.map +1 -0
  338. package/lib/packlets/resources/common.js +24 -0
  339. package/lib/packlets/resources/common.js.map +1 -0
  340. package/lib/packlets/resources/index.d.ts +3 -1
  341. package/lib/packlets/resources/index.d.ts.map +1 -1
  342. package/lib/packlets/resources/index.js +3 -1
  343. package/lib/packlets/resources/index.js.map +1 -1
  344. package/lib/packlets/resources/resource.d.ts +57 -5
  345. package/lib/packlets/resources/resource.d.ts.map +1 -1
  346. package/lib/packlets/resources/resource.js +96 -6
  347. package/lib/packlets/resources/resource.js.map +1 -1
  348. package/lib/packlets/resources/resourceBuilder.d.ts +14 -0
  349. package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -1
  350. package/lib/packlets/resources/resourceBuilder.js +19 -1
  351. package/lib/packlets/resources/resourceBuilder.js.map +1 -1
  352. package/lib/packlets/resources/resourceCandidate.d.ts +46 -6
  353. package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -1
  354. package/lib/packlets/resources/resourceCandidate.js +46 -1
  355. package/lib/packlets/resources/resourceCandidate.js.map +1 -1
  356. package/lib/packlets/resources/resourceManagerBuilder.d.ts +347 -0
  357. package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -0
  358. package/lib/packlets/resources/resourceManagerBuilder.js +893 -0
  359. package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -0
  360. package/lib/packlets/runtime/cacheListener.d.ts +71 -0
  361. package/lib/packlets/runtime/cacheListener.d.ts.map +1 -0
  362. package/lib/packlets/runtime/cacheListener.js +62 -0
  363. package/lib/packlets/runtime/cacheListener.js.map +1 -0
  364. package/lib/packlets/runtime/cacheMetrics.d.ts +88 -0
  365. package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -0
  366. package/lib/packlets/runtime/cacheMetrics.js +154 -0
  367. package/lib/packlets/runtime/cacheMetrics.js.map +1 -0
  368. package/lib/packlets/runtime/compiledResourceCollection.d.ts +167 -0
  369. package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -0
  370. package/lib/packlets/runtime/compiledResourceCollection.js +466 -0
  371. package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -0
  372. package/lib/packlets/runtime/conditionSetResolutionResult.d.ts +70 -0
  373. package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +1 -0
  374. package/lib/packlets/runtime/conditionSetResolutionResult.js +135 -0
  375. package/lib/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
  376. package/lib/packlets/runtime/context/contextQualifierProvider.d.ts +80 -0
  377. package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +1 -0
  378. package/lib/packlets/runtime/context/contextQualifierProvider.js +33 -0
  379. package/lib/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
  380. package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts +165 -0
  381. package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +1 -0
  382. package/lib/packlets/runtime/context/contextQualifierProviderValidator.js +179 -0
  383. package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
  384. package/lib/packlets/runtime/context/index.d.ts +5 -0
  385. package/lib/packlets/runtime/context/index.d.ts.map +1 -0
  386. package/lib/packlets/runtime/context/index.js +42 -0
  387. package/lib/packlets/runtime/context/index.js.map +1 -0
  388. package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts +111 -0
  389. package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
  390. package/lib/packlets/runtime/context/simpleContextQualifierProvider.js +177 -0
  391. package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
  392. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts +47 -0
  393. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
  394. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +64 -0
  395. package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
  396. package/lib/packlets/runtime/iResourceManager.d.ts +94 -0
  397. package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -0
  398. package/lib/packlets/runtime/iResourceManager.js +24 -0
  399. package/lib/packlets/runtime/iResourceManager.js.map +1 -0
  400. package/lib/packlets/runtime/index.d.ts +12 -0
  401. package/lib/packlets/runtime/index.d.ts.map +1 -0
  402. package/lib/packlets/runtime/index.js +73 -0
  403. package/lib/packlets/runtime/index.js.map +1 -0
  404. package/lib/packlets/runtime/resource-tree/common.d.ts +91 -0
  405. package/lib/packlets/runtime/resource-tree/common.d.ts.map +1 -0
  406. package/lib/packlets/runtime/resource-tree/common.js +24 -0
  407. package/lib/packlets/runtime/resource-tree/common.js.map +1 -0
  408. package/lib/packlets/runtime/resource-tree/index.d.ts +5 -0
  409. package/lib/packlets/runtime/resource-tree/index.d.ts.map +1 -0
  410. package/lib/packlets/runtime/resource-tree/index.js +42 -0
  411. package/lib/packlets/runtime/resource-tree/index.js.map +1 -0
  412. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts +141 -0
  413. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +1 -0
  414. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js +224 -0
  415. package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
  416. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts +24 -0
  417. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +1 -0
  418. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js +98 -0
  419. package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
  420. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts +99 -0
  421. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +1 -0
  422. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js +165 -0
  423. package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
  424. package/lib/packlets/runtime/resourceResolver.d.ts +217 -0
  425. package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -0
  426. package/lib/packlets/runtime/resourceResolver.js +459 -0
  427. package/lib/packlets/runtime/resourceResolver.js.map +1 -0
  428. package/lib/packlets/runtime/validate.d.ts +13 -0
  429. package/lib/packlets/runtime/validate.d.ts.map +1 -0
  430. package/lib/packlets/runtime/validate.js +49 -0
  431. package/lib/packlets/runtime/validate.js.map +1 -0
  432. package/package.json +76 -75
  433. package/lib/packlets/resources/resourceManager.d.ts +0 -104
  434. package/lib/packlets/resources/resourceManager.d.ts.map +0 -1
  435. package/lib/packlets/resources/resourceManager.js +0 -201
  436. package/lib/packlets/resources/resourceManager.js.map +0 -1
@@ -21,4 +21,20 @@
21
21
  * SOFTWARE.
22
22
  */
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.isLooseResourceCandidateDecl = isLooseResourceCandidateDecl;
25
+ exports.isLooseResourceDecl = isLooseResourceDecl;
26
+ /**
27
+ * Type guard function to check if a resource candidate declaration is a loose resource candidate declaration.
28
+ * @public
29
+ */
30
+ function isLooseResourceCandidateDecl(decl) {
31
+ return 'id' in decl;
32
+ }
33
+ /**
34
+ * Type guard function to check if a resource declaration is a loose resource declaration.
35
+ * @public
36
+ */
37
+ function isLooseResourceDecl(decl) {
38
+ return 'id' in decl;
39
+ }
24
40
  //# sourceMappingURL=json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/json.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { JsonObject } from '@fgv/ts-json-base';\nimport { ConditionOperator, ResourceValueMergeMethod } from '../common';\n\n/**\n * Non-validated loose declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport interface ILooseConditionDecl {\n /**\n * The name of the {@link Qualifiers.Qualifier | qualifier} to be compared.\n */\n qualifierName: string;\n /**\n * The value to be compared.\n */\n value: string;\n /**\n * The operator to be used in the comparison.\n * Default is 'matches'.\n */\n operator?: ConditionOperator;\n\n /**\n * The priority of the condition. Default is the default priority for the qualifier.\n */\n priority?: number;\n\n /**\n * The score to be used if the condition is used as a default.\n */\n scoreAsDefault?: number;\n}\n\n/**\n * Non-validated child declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport interface IChildConditionDecl {\n /**\n * The value to be compared.\n */\n value: string;\n /**\n * The operator to be used in the comparison.\n * Default is 'matches'.\n */\n operator?: ConditionOperator;\n\n /**\n * The priority of the condition. Default is the default priority for the qualifier.\n */\n priority?: number;\n\n /**\n * The score to be used if the condition is used as a default.\n */\n scoreAsDefault?: number;\n}\n\n/**\n * Non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDeclAsArray = ReadonlyArray<ILooseConditionDecl>;\n\n/**\n * Non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDeclAsRecord = Record<string, string | IChildConditionDecl>;\n\n/**\n * Non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDecl = ConditionSetDeclAsArray | ConditionSetDeclAsRecord;\n\n/**\n * Non-validated child declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface IChildResourceCandidateDecl {\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n}\n\n/**\n * Non-validated loose declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface ILooseResourceCandidateDecl extends IChildResourceCandidateDecl {\n /**\n * The {@link ResourceId | id} of the resource.\n */\n readonly id: string;\n\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n\n /**\n * The type of the resource.\n */\n readonly resourceTypeName?: string;\n}\n\n/**\n * Non-validated child declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface IChildResourceDecl {\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Non-validated loose declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface ILooseResourceDecl extends IChildResourceDecl {\n /**\n * The id of the resource.\n */\n readonly id: string;\n\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree node.\n * @public\n */\nexport interface IResourceTreeChildNodeDecl {\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree root.\n * @public\n */\nexport interface IResourceTreeRootDecl extends IResourceTreeChildNodeDecl {\n readonly baseName?: string;\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n}\n\n/**\n * Non-validated declaration of a collection of resources.\n * @public\n */\nexport interface IResourceCollectionDecl {\n readonly baseName?: string;\n readonly baseConditions?: ConditionSetDecl;\n readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl>;\n readonly resources?: ReadonlyArray<ILooseResourceDecl>;\n readonly collections?: ReadonlyArray<IResourceCollectionDecl>;\n}\n"]}
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/json.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;AAsQH,oEAIC;AAMD,kDAEC;AAhBD;;;GAGG;AACH,SAAgB,4BAA4B,CAC1C,IAAoC;IAEpC,OAAO,IAAI,IAAI,IAAI,CAAC;AACtB,CAAC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,IAA2B;IAC7D,OAAO,IAAI,IAAI,IAAI,CAAC;AACtB,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 { JsonObject } from '@fgv/ts-json-base';\nimport { ConditionOperator, ResourceValueMergeMethod } from '../common';\n\n/**\n * Non-validated loose declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport interface ILooseConditionDecl {\n /**\n * The name of the {@link Qualifiers.Qualifier | qualifier} to be compared.\n */\n qualifierName: string;\n /**\n * The value to be compared.\n */\n value: string;\n /**\n * The operator to be used in the comparison.\n * Default is 'matches'.\n */\n operator?: ConditionOperator;\n\n /**\n * The priority of the condition. Default is the default priority for the qualifier.\n */\n priority?: number;\n\n /**\n * The score to be used if the condition is used as a default.\n */\n scoreAsDefault?: number;\n}\n\n/**\n * Non-validated child declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport interface IChildConditionDecl {\n /**\n * The value to be compared.\n */\n value: string;\n /**\n * The operator to be used in the comparison.\n * Default is 'matches'.\n */\n operator?: ConditionOperator;\n\n /**\n * The priority of the condition. Default is the default priority for the qualifier.\n */\n priority?: number;\n\n /**\n * The score to be used if the condition is used as a default.\n */\n scoreAsDefault?: number;\n}\n\n/**\n * Non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDeclAsArray = ReadonlyArray<ILooseConditionDecl>;\n\n/**\n * Non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDeclAsRecord = Record<string, string | IChildConditionDecl>;\n\n/**\n * Non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDecl = ConditionSetDeclAsArray | ConditionSetDeclAsRecord;\n\n/**\n * Non-validated child declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface IChildResourceCandidateDecl {\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n}\n\n/**\n * Non-validated declaration of a resource candidate for import,\n * which can be either a loose or child resource candidate.\n * @public\n */\nexport interface IImporterResourceCandidateDecl extends IChildResourceCandidateDecl {\n /**\n * The {@link ResourceId | id} of the resource.\n */\n readonly id?: string;\n\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName?: string;\n}\n\n/**\n * Non-validated loose declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface ILooseResourceCandidateDecl extends IChildResourceCandidateDecl {\n /**\n * The {@link ResourceId | id} of the resource.\n */\n readonly id: string;\n\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n\n /**\n * The type of the resource.\n */\n readonly resourceTypeName?: string;\n}\n\n/**\n * Non-validated child declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface IChildResourceDecl {\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Non-validated loose declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface ILooseResourceDecl extends IChildResourceDecl {\n /**\n * The id of the resource.\n */\n readonly id: string;\n\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree node.\n * @public\n */\nexport interface IResourceTreeChildNodeDecl {\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n}\n\n/**\n * Declared context for a resource container.\n * @public\n */\nexport interface IContainerContextDecl {\n readonly baseId?: string;\n readonly conditions?: ConditionSetDecl;\n readonly mergeMethod?: ResourceValueMergeMethod;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree root.\n * @public\n */\nexport interface IResourceTreeRootDecl extends IResourceTreeChildNodeDecl {\n readonly context?: IContainerContextDecl;\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n readonly metadata?: JsonObject;\n}\n\n/**\n * Non-validated declaration of a collection of resources.\n * @public\n */\nexport interface IResourceCollectionDecl {\n readonly context?: IContainerContextDecl;\n readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl>;\n readonly resources?: ReadonlyArray<ILooseResourceDecl>;\n readonly collections?: ReadonlyArray<IResourceCollectionDecl>;\n readonly metadata?: JsonObject;\n}\n\n/**\n * Non-validated declaration of a resource for import,\n * which can be either a loose or child resource.\n * @public\n */\nexport type IImporterResourceDecl = ILooseResourceDecl | IChildResourceDecl;\n\n/**\n * Non-validated declaration of a collection of resources for an importer.\n * @public\n */\nexport interface IImporterResourceCollectionDecl {\n readonly context?: IContainerContextDecl;\n readonly candidates?: ReadonlyArray<IImporterResourceCandidateDecl>;\n readonly resources?: ReadonlyArray<IImporterResourceDecl>;\n readonly collections?: ReadonlyArray<IImporterResourceCollectionDecl>;\n readonly metadata?: JsonObject;\n}\n\n/**\n * Type guard function to check if a resource candidate declaration is a loose resource candidate declaration.\n * @public\n */\nexport function isLooseResourceCandidateDecl(\n decl: IImporterResourceCandidateDecl\n): decl is ILooseResourceCandidateDecl {\n return 'id' in decl;\n}\n\n/**\n * Type guard function to check if a resource declaration is a loose resource declaration.\n * @public\n */\nexport function isLooseResourceDecl(decl: IImporterResourceDecl): decl is ILooseResourceDecl {\n return 'id' in decl;\n}\n"]}
@@ -29,6 +29,21 @@ export interface IChildResourceCandidateDecl {
29
29
  */
30
30
  readonly mergeMethod?: ResourceValueMergeMethod;
31
31
  }
32
+ /**
33
+ * Normalized non-validated declaration of a resource candidate for import,
34
+ * which can be either a loose or child resource candidate.
35
+ * @public
36
+ */
37
+ export interface IImporterResourceCandidateDecl extends IChildResourceCandidateDecl {
38
+ /**
39
+ * The {@link ResourceId | id} of the resource.
40
+ */
41
+ readonly id?: string;
42
+ /**
43
+ * The name of the type of this resource.
44
+ */
45
+ readonly resourceTypeName?: string;
46
+ }
32
47
  /**
33
48
  * Normalized non-validated loose declaration of a {@link Resources.ResourceCandidate | resource candidate}.
34
49
  * @public
@@ -100,24 +115,52 @@ export interface IResourceTreeChildNodeDecl {
100
115
  readonly resources?: Record<string, IChildResourceDecl>;
101
116
  readonly children?: Record<string, IResourceTreeChildNodeDecl>;
102
117
  }
118
+ /**
119
+ * Declared context for a resource container.
120
+ * @public
121
+ */
122
+ export interface IContainerContextDecl {
123
+ readonly baseId?: string;
124
+ readonly conditions?: ConditionSetDecl;
125
+ readonly mergeMethod?: ResourceValueMergeMethod;
126
+ }
103
127
  /**
104
128
  * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree root.
105
129
  * @public
106
130
  */
107
131
  export interface IResourceTreeRootDecl extends IResourceTreeChildNodeDecl {
108
- readonly baseName?: string;
132
+ readonly context?: IContainerContextDecl;
109
133
  readonly resources?: Record<string, IChildResourceDecl>;
110
134
  readonly children?: Record<string, IResourceTreeChildNodeDecl>;
135
+ readonly metadata?: JsonObject;
111
136
  }
112
137
  /**
113
138
  * Normalized non-validated declaration of a collection of resources.
114
139
  * @public
115
140
  */
116
141
  export interface IResourceCollectionDecl {
117
- readonly baseName?: string;
118
- readonly baseConditions?: ConditionSetDecl;
142
+ readonly context?: IContainerContextDecl;
119
143
  readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl>;
120
144
  readonly resources?: ReadonlyArray<ILooseResourceDecl>;
121
145
  readonly collections?: ReadonlyArray<IResourceCollectionDecl>;
146
+ readonly metadata?: JsonObject;
147
+ }
148
+ /**
149
+ * Normalized non-validated declaration of a resource for import,
150
+ * which can be either a loose or child resource.
151
+ * @public
152
+ */
153
+ export type IImporterResourceDecl = ILooseResourceDecl | IChildResourceDecl;
154
+ /**
155
+ * Normalized non-validated declaration of a collection of resources for importers.
156
+ * This allows for a mix of loose and child resource declarations.
157
+ * @public
158
+ */
159
+ export interface IImporterResourceCollectionDecl {
160
+ readonly context?: IContainerContextDecl;
161
+ readonly candidates?: ReadonlyArray<IImporterResourceCandidateDecl>;
162
+ readonly resources?: ReadonlyArray<IImporterResourceDecl>;
163
+ readonly collections?: ReadonlyArray<IImporterResourceCollectionDecl>;
164
+ readonly metadata?: JsonObject;
122
165
  }
123
166
  //# sourceMappingURL=normalized.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalized.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/normalized.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACjD;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA4B,SAAQ,2BAA2B;IAC9E;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,wBAAwB,CAAC;IAEhD;;OAEG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,kBA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BAAuB;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACvD,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;IACpE,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"normalized.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/normalized.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { JsonObject } from '@fgv/ts-json-base';\nimport { ResourceValueMergeMethod } from '../common';\nimport { ILooseConditionDecl } from './json';\n\n/**\n * Normalized non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDecl = ReadonlyArray<ILooseConditionDecl>;\n\n/**\n * Normalized non-validated child declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface IChildResourceCandidateDecl {\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n}\n\n/**\n * Normalized non-validated loose declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface ILooseResourceCandidateDecl extends IChildResourceCandidateDecl {\n /**\n * The {@link ResourceId | id} of the resource.\n */\n readonly id: string;\n\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n\n /**\n * The type of the resource.\n */\n readonly resourceTypeName?: string;\n}\n\n/**\n * Normalized non-validated child declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface IChildResourceDecl {\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Normalized non-validated loose declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface ILooseResourceDecl extends IChildResourceDecl {\n /**\n * The id of the resource.\n */\n readonly id: string;\n\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree node.\n * @public\n */\nexport interface IResourceTreeChildNodeDecl {\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree root.\n * @public\n */\nexport interface IResourceTreeRootDecl extends IResourceTreeChildNodeDecl {\n readonly baseName?: string;\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a collection of resources.\n * @public\n */\nexport interface IResourceCollectionDecl {\n readonly baseName?: string;\n readonly baseConditions?: ConditionSetDecl;\n readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl>;\n readonly resources?: ReadonlyArray<ILooseResourceDecl>;\n readonly collections?: ReadonlyArray<IResourceCollectionDecl>;\n}\n"]}
1
+ {"version":3,"file":"normalized.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/normalized.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { JsonObject } from '@fgv/ts-json-base';\nimport { ResourceValueMergeMethod } from '../common';\nimport { ILooseConditionDecl } from './json';\n\n/**\n * Normalized non-validated declaration of a {@link Conditions.Condition | condition}.\n * @public\n */\nexport type ConditionSetDecl = ReadonlyArray<ILooseConditionDecl>;\n\n/**\n * Normalized non-validated child declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface IChildResourceCandidateDecl {\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n}\n\n/**\n * Normalized non-validated declaration of a resource candidate for import,\n * which can be either a loose or child resource candidate.\n * @public\n */\nexport interface IImporterResourceCandidateDecl extends IChildResourceCandidateDecl {\n /**\n * The {@link ResourceId | id} of the resource.\n */\n readonly id?: string;\n\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName?: string;\n}\n\n/**\n * Normalized non-validated loose declaration of a {@link Resources.ResourceCandidate | resource candidate}.\n * @public\n */\nexport interface ILooseResourceCandidateDecl extends IChildResourceCandidateDecl {\n /**\n * The {@link ResourceId | id} of the resource.\n */\n readonly id: string;\n\n /**\n * The JSON value of the resource.\n */\n readonly json: JsonObject;\n\n /**\n * The conditions that must be met for the resource to be selected.\n */\n readonly conditions?: ConditionSetDecl;\n\n /**\n * If true, the resource is only a partial representation of the full resource.\n */\n readonly isPartial?: boolean;\n\n /**\n * The merge method to be used when merging the resource into the existing resource.\n * default is 'augment'.\n */\n readonly mergeMethod?: ResourceValueMergeMethod;\n\n /**\n * The type of the resource.\n */\n readonly resourceTypeName?: string;\n}\n\n/**\n * Normalized non-validated child declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface IChildResourceDecl {\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Normalized non-validated loose declaration of a {@link Resources.Resource | resource}.\n * @public\n */\nexport interface ILooseResourceDecl extends IChildResourceDecl {\n /**\n * The id of the resource.\n */\n readonly id: string;\n\n /**\n * The name of the type of this resource.\n */\n readonly resourceTypeName: string;\n\n /**\n * Possible candidates for this value.\n */\n readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl>;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree node.\n * @public\n */\nexport interface IResourceTreeChildNodeDecl {\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n}\n\n/**\n * Declared context for a resource container.\n * @public\n */\nexport interface IContainerContextDecl {\n readonly baseId?: string;\n readonly conditions?: ConditionSetDecl;\n readonly mergeMethod?: ResourceValueMergeMethod;\n}\n\n/**\n * Normalized non-validated declaration of a {@link Resources.Resource | resource} tree root.\n * @public\n */\nexport interface IResourceTreeRootDecl extends IResourceTreeChildNodeDecl {\n readonly context?: IContainerContextDecl;\n readonly resources?: Record<string, IChildResourceDecl>;\n readonly children?: Record<string, IResourceTreeChildNodeDecl>;\n readonly metadata?: JsonObject;\n}\n\n/**\n * Normalized non-validated declaration of a collection of resources.\n * @public\n */\nexport interface IResourceCollectionDecl {\n readonly context?: IContainerContextDecl;\n readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl>;\n readonly resources?: ReadonlyArray<ILooseResourceDecl>;\n readonly collections?: ReadonlyArray<IResourceCollectionDecl>;\n readonly metadata?: JsonObject;\n}\n\n/**\n * Normalized non-validated declaration of a resource for import,\n * which can be either a loose or child resource.\n * @public\n */\nexport type IImporterResourceDecl = ILooseResourceDecl | IChildResourceDecl;\n\n/**\n * Normalized non-validated declaration of a collection of resources for importers.\n * This allows for a mix of loose and child resource declarations.\n * @public\n */\nexport interface IImporterResourceCollectionDecl {\n readonly context?: IContainerContextDecl;\n readonly candidates?: ReadonlyArray<IImporterResourceCandidateDecl>;\n readonly resources?: ReadonlyArray<IImporterResourceDecl>;\n readonly collections?: ReadonlyArray<IImporterResourceCollectionDecl>;\n readonly metadata?: JsonObject;\n}\n"]}
@@ -11,10 +11,14 @@ export declare class ResourceDeclCollection implements IResourceDeclContainer {
11
11
  * The {@link ResourceJson.Normalized.IResourceCollectionDecl | resource collection declaration}
12
12
  * being processed.
13
13
  */
14
- readonly collection: Normalized.IResourceCollectionDecl;
15
- protected _resources: Normalized.ILooseResourceDecl[];
16
- protected _candidates: Normalized.ILooseResourceCandidateDecl[];
17
- protected constructor(collection: Normalized.IResourceCollectionDecl);
14
+ readonly collection: Normalized.IImporterResourceCollectionDecl;
15
+ /**
16
+ * {@inheritdoc ResourceJson.IResourceDeclContainer.context}
17
+ */
18
+ get context(): Normalized.IContainerContextDecl | undefined;
19
+ protected _resources: Normalized.IImporterResourceDecl[];
20
+ protected _candidates: Normalized.IImporterResourceCandidateDecl[];
21
+ protected constructor(collection: Normalized.IImporterResourceCollectionDecl);
18
22
  /**
19
23
  * Creates a new {@link ResourceJson.ResourceDeclCollection | ResourceDeclCollection} from an
20
24
  * untyped {@link ResourceJson.Json.IResourceCollectionDecl | resource collection declaration}.
@@ -23,17 +27,17 @@ export declare class ResourceDeclCollection implements IResourceDeclContainer {
23
27
  */
24
28
  static create(from: unknown): Result<ResourceDeclCollection>;
25
29
  /**
26
- * Gets the loose resources extracted from the collection.
27
- * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}
30
+ * Gets the importer resources extracted from the collection.
31
+ * @returns The {@link ResourceJson.Normalized.IImporterResourceDecl | importer resource declarations}
28
32
  * extracted from the collection.
29
33
  */
30
- getLooseResources(): ReadonlyArray<Normalized.ILooseResourceDecl>;
34
+ getImporterResources(): ReadonlyArray<Normalized.IImporterResourceDecl>;
31
35
  /**
32
- * Gets the loose candidates extracted from the collection.
33
- * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}
36
+ * Gets the importer candidates extracted from the collection.
37
+ * @returns The {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate declarations}
34
38
  * extracted from the collection.
35
39
  */
36
- getLooseCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl>;
40
+ getImporterCandidates(): ReadonlyArray<Normalized.IImporterResourceCandidateDecl>;
37
41
  private _extract;
38
42
  }
39
43
  //# sourceMappingURL=resourceDeclCollection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resourceDeclCollection.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclCollection.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAgD,MAAM,EAAW,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AA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AAG,MAAM,CAAC,sBAAsB,CAAC;IASnE;;;;OAIG;IACI,oBAAoB,IAAI,aAAa,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAI9E;;;;OAIG;IACI,qBAAqB,IAAI,aAAa,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAIxF,OAAO,CAAC,QAAQ;CA2BjB"}
@@ -57,7 +57,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
57
57
  exports.ResourceDeclCollection = void 0;
58
58
  const ts_utils_1 = require("@fgv/ts-utils");
59
59
  const Convert = __importStar(require("./convert"));
60
- const common_1 = require("../common");
61
60
  const helpers_1 = require("./helpers");
62
61
  /**
63
62
  * Class that extracts resources and candidates from a
@@ -65,6 +64,12 @@ const helpers_1 = require("./helpers");
65
64
  * @public
66
65
  */
67
66
  class ResourceDeclCollection {
67
+ /**
68
+ * {@inheritdoc ResourceJson.IResourceDeclContainer.context}
69
+ */
70
+ get context() {
71
+ return this.collection.context;
72
+ }
68
73
  constructor(collection) {
69
74
  this._resources = [];
70
75
  this._candidates = [];
@@ -78,7 +83,7 @@ class ResourceDeclCollection {
78
83
  * @returns `Success` with the new collection if the JSON object is valid, otherwise `Failure`.
79
84
  */
80
85
  static create(from) {
81
- return Convert.resourceCollectionDecl
86
+ return Convert.importerResourceCollectionDecl
82
87
  .convert(from)
83
88
  .withErrorFormat((err) => `Invalid resource collection: ${err}`)
84
89
  .onSuccess((decl) => {
@@ -86,31 +91,30 @@ class ResourceDeclCollection {
86
91
  });
87
92
  }
88
93
  /**
89
- * Gets the loose resources extracted from the collection.
90
- * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}
94
+ * Gets the importer resources extracted from the collection.
95
+ * @returns The {@link ResourceJson.Normalized.IImporterResourceDecl | importer resource declarations}
91
96
  * extracted from the collection.
92
97
  */
93
- getLooseResources() {
98
+ getImporterResources() {
94
99
  return this._resources;
95
100
  }
96
101
  /**
97
- * Gets the loose candidates extracted from the collection.
98
- * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}
102
+ * Gets the importer candidates extracted from the collection.
103
+ * @returns The {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate declarations}
99
104
  * extracted from the collection.
100
105
  */
101
- getLooseCandidates() {
106
+ getImporterCandidates() {
102
107
  return this._candidates;
103
108
  }
104
109
  _extract(collection, parentName, parentConditions) {
105
110
  const errors = new ts_utils_1.MessageAggregator();
106
- return common_1.Helpers.joinOptionalResourceIds(parentName, collection.baseName).onSuccess((baseName) => {
107
- var _a, _b, _c, _d, _e, _f;
108
- const baseConditions = [...(parentConditions !== null && parentConditions !== void 0 ? parentConditions : []), ...((_a = collection.baseConditions) !== null && _a !== void 0 ? _a : [])];
109
- const mergedCandidates = (_c = (_b = collection.candidates) === null || _b === void 0 ? void 0 : _b.map((candidate) => (0, helpers_1.mergeLooseCandidate)(candidate, baseName, baseConditions))) !== null && _c !== void 0 ? _c : [];
111
+ return (0, helpers_1.mergeContextDecl)(collection.context, parentName, parentConditions).onSuccess(({ baseId: baseName, conditions: baseConditions }) => {
112
+ var _a, _b, _c, _d, _e;
113
+ const mergedCandidates = (_b = (_a = collection.candidates) === null || _a === void 0 ? void 0 : _a.map((candidate) => (0, helpers_1.mergeImporterCandidate)(candidate, baseName, baseConditions))) !== null && _b !== void 0 ? _b : [];
110
114
  this._candidates.push(...(0, ts_utils_1.mapResults)(mergedCandidates).aggregateError(errors).orDefault([]));
111
- const mergedResources = (_e = (_d = collection.resources) === null || _d === void 0 ? void 0 : _d.map((resource) => (0, helpers_1.mergeLooseResource)(resource, baseName, baseConditions))) !== null && _e !== void 0 ? _e : [];
115
+ const mergedResources = (_d = (_c = collection.resources) === null || _c === void 0 ? void 0 : _c.map((resource) => (0, helpers_1.mergeImporterResource)(resource, baseName, baseConditions))) !== null && _d !== void 0 ? _d : [];
112
116
  this._resources.push(...(0, ts_utils_1.mapResults)(mergedResources).aggregateError(errors).orDefault([]));
113
- (_f = collection.collections) === null || _f === void 0 ? void 0 : _f.forEach((subCollection) => {
117
+ (_e = collection.collections) === null || _e === void 0 ? void 0 : _e.forEach((subCollection) => {
114
118
  this._extract(subCollection, baseName, baseConditions).aggregateError(errors);
115
119
  });
116
120
  return errors.returnOrReport((0, ts_utils_1.succeed)(this));
@@ -1 +1 @@
1
- {"version":3,"file":"resourceDeclCollection.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclCollection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAA8F;AAE9F,mDAAqC;AAGrC,sCAAqD;AACrD,uCAAoE;AAEpE;;;;GAIG;AACH,MAAa,sBAAsB;IAUjC,YAAsB,UAA8C;QAH1D,eAAU,GAAoC,EAAE,CAAC;QACjD,gBAAW,GAA6C,EAAE,CAAC;QAGnE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,MAAM,CAAC,IAAa;QAChC,OAAO,OAAO,CAAC,sBAAsB;aAClC,OAAO,CAAC,IAAI,CAAC;aACb,eAAe,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,gCAAgC,GAAG,EAAE,CAAC;aAC/D,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;YAClB,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,iBAAiB;QACtB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,kBAAkB;QACvB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAEO,QAAQ,CACd,UAA8C,EAC9C,UAAmB,E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,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,cAAc,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxED,wDAwEC","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, mapResults, MessageAggregator, Result, succeed } from '@fgv/ts-utils';\nimport { IResourceDeclContainer } from './resourceDeclContainer';\nimport * as Convert from './convert';\nimport * as Normalized from './normalized';\nimport * as Json from './json';\nimport { Helpers as CommonHelpers } from '../common';\nimport { mergeLooseCandidate, mergeLooseResource } from './helpers';\n\n/**\n * Class that extracts resources and candidates from a\n * {@link ResourceJson.Json.IResourceCollectionDecl | resource collection declaration}.\n * @public\n */\nexport class ResourceDeclCollection implements IResourceDeclContainer {\n /**\n * The {@link ResourceJson.Normalized.IResourceCollectionDecl | resource collection declaration}\n * being processed.\n */\n public readonly collection: Normalized.IResourceCollectionDecl;\n\n protected _resources: Normalized.ILooseResourceDecl[] = [];\n protected _candidates: Normalized.ILooseResourceCandidateDecl[] = [];\n\n protected constructor(collection: Normalized.IResourceCollectionDecl) {\n this.collection = collection;\n this._extract(collection).orThrow();\n }\n\n /**\n * Creates a new {@link ResourceJson.ResourceDeclCollection | ResourceDeclCollection} from an\n * untyped {@link ResourceJson.Json.IResourceCollectionDecl | resource collection declaration}.\n * @param from - The JSON object to convert.\n * @returns `Success` with the new collection if the JSON object is valid, otherwise `Failure`.\n */\n public static create(from: unknown): Result<ResourceDeclCollection> {\n return Convert.resourceCollectionDecl\n .convert(from)\n .withErrorFormat((err) => `Invalid resource collection: ${err}`)\n .onSuccess((decl) => {\n return captureResult(() => new ResourceDeclCollection(decl));\n });\n }\n\n /**\n * Gets the loose resources extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}\n * extracted from the collection.\n */\n public getLooseResources(): ReadonlyArray<Normalized.ILooseResourceDecl> {\n return this._resources;\n }\n\n /**\n * Gets the loose candidates extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}\n * extracted from the collection.\n */\n public getLooseCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl> {\n return this._candidates;\n }\n\n private _extract(\n collection: Normalized.IResourceCollectionDecl,\n parentName?: string,\n parentConditions?: Json.ILooseConditionDecl[]\n ): Result<this> {\n const errors: MessageAggregator = new MessageAggregator();\n return CommonHelpers.joinOptionalResourceIds(parentName, collection.baseName).onSuccess((baseName) => {\n const baseConditions = [...(parentConditions ?? []), ...(collection.baseConditions ?? [])];\n\n const mergedCandidates =\n collection.candidates?.map((candidate) => mergeLooseCandidate(candidate, baseName, baseConditions)) ??\n [];\n this._candidates.push(...mapResults(mergedCandidates).aggregateError(errors).orDefault([]));\n\n const mergedResources =\n collection.resources?.map((resource) => mergeLooseResource(resource, baseName, baseConditions)) ?? [];\n this._resources.push(...mapResults(mergedResources).aggregateError(errors).orDefault([]));\n\n collection.collections?.forEach((subCollection) => {\n this._extract(subCollection, baseName, baseConditions).aggregateError(errors);\n });\n return errors.returnOrReport(succeed(this));\n });\n }\n}\n"]}
1
+ {"version":3,"file":"resourceDeclCollection.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclCollection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAA8F;AAE9F,mDAAqC;AAGrC,uCAA4F;AAE5F;;;;GAIG;AACH,MAAa,sBAAsB;IAOjC;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;IACjC,CAAC;IAKD,YAAsB,UAAsD;QAHlE,eAAU,GAAuC,EAAE,CAAC;QACpD,gBAAW,GAAgD,EAAE,CAAC;QAGtE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,MAAM,CAAC,IAAa;QAChC,OAAO,OAAO,CAAC,8BAA8B;aAC1C,OAAO,CAAC,IAAI,CAAC;aACb,eAAe,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,gCAAgC,GAAG,EAAE,CAAC;aAC/D,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;YAClB,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,oBAAoB;QACzB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,qBAAqB;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAEO,QAAQ,CACd,UAAsD,EACt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C,CACF,CAAC;IACJ,CAAC;CACF;AAlFD,wDAkFC","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, mapResults, MessageAggregator, Result, succeed } from '@fgv/ts-utils';\nimport { IResourceDeclContainer } from './resourceDeclContainer';\nimport * as Convert from './convert';\nimport * as Normalized from './normalized';\nimport * as Json from './json';\nimport { mergeContextDecl, mergeImporterCandidate, mergeImporterResource } from './helpers';\n\n/**\n * Class that extracts resources and candidates from a\n * {@link ResourceJson.Json.IResourceCollectionDecl | resource collection declaration}.\n * @public\n */\nexport class ResourceDeclCollection implements IResourceDeclContainer {\n /**\n * The {@link ResourceJson.Normalized.IResourceCollectionDecl | resource collection declaration}\n * being processed.\n */\n public readonly collection: Normalized.IImporterResourceCollectionDecl;\n\n /**\n * {@inheritdoc ResourceJson.IResourceDeclContainer.context}\n */\n public get context(): Normalized.IContainerContextDecl | undefined {\n return this.collection.context;\n }\n\n protected _resources: Normalized.IImporterResourceDecl[] = [];\n protected _candidates: Normalized.IImporterResourceCandidateDecl[] = [];\n\n protected constructor(collection: Normalized.IImporterResourceCollectionDecl) {\n this.collection = collection;\n this._extract(collection).orThrow();\n }\n\n /**\n * Creates a new {@link ResourceJson.ResourceDeclCollection | ResourceDeclCollection} from an\n * untyped {@link ResourceJson.Json.IResourceCollectionDecl | resource collection declaration}.\n * @param from - The JSON object to convert.\n * @returns `Success` with the new collection if the JSON object is valid, otherwise `Failure`.\n */\n public static create(from: unknown): Result<ResourceDeclCollection> {\n return Convert.importerResourceCollectionDecl\n .convert(from)\n .withErrorFormat((err) => `Invalid resource collection: ${err}`)\n .onSuccess((decl) => {\n return captureResult(() => new ResourceDeclCollection(decl));\n });\n }\n\n /**\n * Gets the importer resources extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.IImporterResourceDecl | importer resource declarations}\n * extracted from the collection.\n */\n public getImporterResources(): ReadonlyArray<Normalized.IImporterResourceDecl> {\n return this._resources;\n }\n\n /**\n * Gets the importer candidates extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate declarations}\n * extracted from the collection.\n */\n public getImporterCandidates(): ReadonlyArray<Normalized.IImporterResourceCandidateDecl> {\n return this._candidates;\n }\n\n private _extract(\n collection: Normalized.IImporterResourceCollectionDecl,\n parentName?: string,\n parentConditions?: ReadonlyArray<Json.ILooseConditionDecl>\n ): Result<this> {\n const errors: MessageAggregator = new MessageAggregator();\n return mergeContextDecl(collection.context, parentName, parentConditions).onSuccess(\n ({ baseId: baseName, conditions: baseConditions }) => {\n const mergedCandidates =\n collection.candidates?.map((candidate) =>\n mergeImporterCandidate(candidate, baseName, baseConditions)\n ) ?? [];\n this._candidates.push(...mapResults(mergedCandidates).aggregateError(errors).orDefault([]));\n\n const mergedResources =\n collection.resources?.map((resource) =>\n mergeImporterResource(resource, baseName, baseConditions)\n ) ?? [];\n this._resources.push(...mapResults(mergedResources).aggregateError(errors).orDefault([]));\n\n collection.collections?.forEach((subCollection) => {\n this._extract(subCollection, baseName, baseConditions).aggregateError(errors);\n });\n return errors.returnOrReport(succeed(this));\n }\n );\n }\n}\n"]}
@@ -5,7 +5,20 @@ import * as Normalized from './normalized';
5
5
  * @public
6
6
  */
7
7
  export interface IResourceDeclContainer {
8
- getLooseResources(): ReadonlyArray<Normalized.ILooseResourceDecl>;
9
- getLooseCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl>;
8
+ /**
9
+ * Optional initial {@link ResourceJson.Normalized.IContainerContextDecl | resource context}
10
+ * declaration for the container.
11
+ */
12
+ readonly context?: Normalized.IContainerContextDecl;
13
+ /**
14
+ * Gets a normalized array of {@link ResourceJson.Normalized.IImporterResourceDecl | importer resource}
15
+ * declarations for all resources in the container, including children.
16
+ */
17
+ getImporterResources(): ReadonlyArray<Normalized.IImporterResourceDecl>;
18
+ /**
19
+ * Gets a normalized array of {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate}
20
+ * declarations for all resources in the container, including children.
21
+ */
22
+ getImporterCandidates(): ReadonlyArray<Normalized.IImporterResourceCandidateDecl>;
10
23
  }
11
24
  //# sourceMappingURL=resourceDeclContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resourceDeclContainer.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclContainer.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,IAAI,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAClE,kBAAkB,IAAI,aAAa,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;CAC7E"}
1
+ {"version":3,"file":"resourceDeclContainer.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclContainer.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,qBAAqB,CAAC;IAEpD;;;OAGG;IACH,oBAAoB,IAAI,aAAa,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAExE;;;OAGG;IACH,qBAAqB,IAAI,aAAa,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;CACnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"resourceDeclContainer.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclContainer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Normalized from './normalized';\n\n/**\n * Generic container for resource and resource candidate\n * declarations.\n * @public\n */\nexport interface IResourceDeclContainer {\n getLooseResources(): ReadonlyArray<Normalized.ILooseResourceDecl>;\n getLooseCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl>;\n}\n"]}
1
+ {"version":3,"file":"resourceDeclContainer.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclContainer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Normalized from './normalized';\n\n/**\n * Generic container for resource and resource candidate\n * declarations.\n * @public\n */\nexport interface IResourceDeclContainer {\n /**\n * Optional initial {@link ResourceJson.Normalized.IContainerContextDecl | resource context}\n * declaration for the container.\n */\n readonly context?: Normalized.IContainerContextDecl;\n\n /**\n * Gets a normalized array of {@link ResourceJson.Normalized.IImporterResourceDecl | importer resource}\n * declarations for all resources in the container, including children.\n */\n getImporterResources(): ReadonlyArray<Normalized.IImporterResourceDecl>;\n\n /**\n * Gets a normalized array of {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate}\n * declarations for all resources in the container, including children.\n */\n getImporterCandidates(): ReadonlyArray<Normalized.IImporterResourceCandidateDecl>;\n}\n"]}
@@ -12,6 +12,10 @@ export declare class ResourceDeclTree implements IResourceDeclContainer {
12
12
  * being processed.
13
13
  */
14
14
  readonly tree: Normalized.IResourceTreeRootDecl;
15
+ /**
16
+ * {@inheritdoc ResourceJson.IResourceDeclContainer.context}
17
+ */
18
+ get context(): Normalized.IContainerContextDecl | undefined;
15
19
  protected _resources: Normalized.ILooseResourceDecl[];
16
20
  protected _candidates: Normalized.ILooseResourceCandidateDecl[];
17
21
  protected constructor(tree: Normalized.IResourceTreeRootDecl);
@@ -27,13 +31,13 @@ export declare class ResourceDeclTree implements IResourceDeclContainer {
27
31
  * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}
28
32
  * extracted from the collection.
29
33
  */
30
- getLooseResources(): ReadonlyArray<Normalized.ILooseResourceDecl>;
34
+ getImporterResources(): ReadonlyArray<Normalized.ILooseResourceDecl>;
31
35
  /**
32
36
  * Gets the loose candidates extracted from the collection.
33
37
  * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}
34
38
  * extracted from the collection.
35
39
  */
36
- getLooseCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl>;
40
+ getImporterCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl>;
37
41
  private _extract;
38
42
  }
39
43
  //# sourceMappingURL=resourceDeclTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resourceDeclTree.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclTree.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAgD,MAAM,EAAW,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAK3C;;;;GAIG;AACH,qBAAa,gBAAiB,YAAW,sBAAsB;IAC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,oBAAoB,IAAI,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAI3E;;;;OAIG;IACI,qBAAqB,IAAI,aAAa,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAIrF,OAAO,CAAC,QAAQ;CAuBjB"}
@@ -65,11 +65,20 @@ const helpers_1 = require("./helpers");
65
65
  * @public
66
66
  */
67
67
  class ResourceDeclTree {
68
+ /**
69
+ * {@inheritdoc ResourceJson.IResourceDeclContainer.context}
70
+ */
71
+ get context() {
72
+ return this.tree.context;
73
+ }
68
74
  constructor(tree) {
75
+ var _a, _b;
69
76
  this._resources = [];
70
77
  this._candidates = [];
71
78
  this.tree = tree;
72
- this._extract(tree, tree.baseName).orThrow();
79
+ const id = (_a = tree.context) === null || _a === void 0 ? void 0 : _a.baseId;
80
+ const conditions = (_b = tree.context) === null || _b === void 0 ? void 0 : _b.conditions;
81
+ this._extract(tree, id, conditions).orThrow();
73
82
  }
74
83
  /**
75
84
  * Creates a new {@link ResourceJson.ResourceDeclTree | ResourceDeclTree} from an
@@ -90,7 +99,7 @@ class ResourceDeclTree {
90
99
  * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}
91
100
  * extracted from the collection.
92
101
  */
93
- getLooseResources() {
102
+ getImporterResources() {
94
103
  return this._resources;
95
104
  }
96
105
  /**
@@ -98,7 +107,7 @@ class ResourceDeclTree {
98
107
  * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}
99
108
  * extracted from the collection.
100
109
  */
101
- getLooseCandidates() {
110
+ getImporterCandidates() {
102
111
  return this._candidates;
103
112
  }
104
113
  _extract(node, parentName, parentConditions) {
@@ -1 +1 @@
1
- {"version":3,"file":"resourceDeclTree.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclTree.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAA8F;AAE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CAAC,CACjE,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAA,qBAAU,EAAC,eAAe,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAE1F,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAA,IAAI,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC,CAAC;QACjE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE;YACrC,gBAAa,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC;iBAC5C,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE;gBACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YACtF,CAAC,CAAC;iBACD,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,cAAc,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AAvED,4CAuEC","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, mapResults, MessageAggregator, Result, succeed } from '@fgv/ts-utils';\nimport { IResourceDeclContainer } from './resourceDeclContainer';\nimport * as Convert from './convert';\nimport * as Normalized from './normalized';\nimport * as Json from './json';\nimport { Helpers as CommonHelpers } from '../common';\nimport { mergeChildResource } from './helpers';\n\n/**\n * Class that extracts resources and candidates from a\n * {@link ResourceJson.Json.IResourceTreeRootDecl | resource tree root}.\n * @public\n */\nexport class ResourceDeclTree implements IResourceDeclContainer {\n /**\n * The {@link ResourceJson.Normalized.IResourceTreeRootDecl | resource tree root declaration}\n * being processed.\n */\n public readonly tree: Normalized.IResourceTreeRootDecl;\n\n protected _resources: Normalized.ILooseResourceDecl[] = [];\n protected _candidates: Normalized.ILooseResourceCandidateDecl[] = [];\n\n protected constructor(tree: Normalized.IResourceTreeRootDecl) {\n this.tree = tree;\n this._extract(tree, tree.baseName).orThrow();\n }\n\n /**\n * Creates a new {@link ResourceJson.ResourceDeclTree | ResourceDeclTree} from an\n * untyped {@link ResourceJson.Json.IResourceTreeRootDecl | resource tree root declaration}.\n * @param from - The JSON object to convert.\n * @returns `Success` with the new tree if the JSON object is valid, otherwise `Failure`.\n */\n public static create(from: unknown): Result<ResourceDeclTree> {\n return Convert.resourceTreeRootDecl\n .convert(from)\n .withErrorFormat((err) => `Invalid resource tree: ${err}`)\n .onSuccess((decl) => {\n return captureResult(() => new ResourceDeclTree(decl));\n });\n }\n\n /**\n * Gets the loose resources extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}\n * extracted from the collection.\n */\n public getLooseResources(): ReadonlyArray<Normalized.ILooseResourceDecl> {\n return this._resources;\n }\n\n /**\n * Gets the loose candidates extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}\n * extracted from the collection.\n */\n public getLooseCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl> {\n return this._candidates;\n }\n\n private _extract(\n node: Normalized.IResourceTreeChildNodeDecl,\n parentName?: string,\n parentConditions?: Json.ILooseConditionDecl[]\n ): Result<this> {\n const errors: MessageAggregator = new MessageAggregator();\n\n const resourceEntries = Array.from(Object.entries(node.resources ?? {}));\n const mergedResources = resourceEntries.map(([name, resource]) =>\n mergeChildResource(resource, name, parentName, parentConditions)\n );\n this._resources.push(...mapResults(mergedResources).aggregateError(errors).orDefault([]));\n\n const children = Array.from(Object.entries(node.children ?? {}));\n children.forEach(([name, childNode]) => {\n CommonHelpers.joinResourceIds(parentName, name)\n .onSuccess((childName) => {\n return this._extract(childNode, childName, parentConditions).aggregateError(errors);\n })\n .aggregateError(errors);\n });\n return errors.returnOrReport(succeed(this));\n }\n}\n"]}
1
+ {"version":3,"file":"resourceDeclTree.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/resourceDeclTree.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAA8F;AAE9F,mDAAqC;AAGrC,sCAAqD;AACrD,uCAA+C;AAE/C;;;;GAIG;AACH,MAAa,gBAAgB;IAO3B;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;IAC3B,CAAC;IAKD,YAAsB,IAAsC;;QAHlD,eAAU,GAAoC,EAAE,CAAC;QACjD,gBAAW,GAA6C,EAAE,CAAC;QAGnE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,MAAM,EAAE,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,CAAC;QAChC,MAAM,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AC,CAAC,CAAC;QAE1F,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAA,IAAI,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC,CAAC;QACjE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE;YACrC,gBAAa,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC;iBAC5C,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE;gBACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YACtF,CAAC,CAAC;iBACD,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,cAAc,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AAhFD,4CAgFC","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, mapResults, MessageAggregator, Result, succeed } from '@fgv/ts-utils';\nimport { IResourceDeclContainer } from './resourceDeclContainer';\nimport * as Convert from './convert';\nimport * as Normalized from './normalized';\nimport * as Json from './json';\nimport { Helpers as CommonHelpers } from '../common';\nimport { mergeChildResource } from './helpers';\n\n/**\n * Class that extracts resources and candidates from a\n * {@link ResourceJson.Json.IResourceTreeRootDecl | resource tree root}.\n * @public\n */\nexport class ResourceDeclTree implements IResourceDeclContainer {\n /**\n * The {@link ResourceJson.Normalized.IResourceTreeRootDecl | resource tree root declaration}\n * being processed.\n */\n public readonly tree: Normalized.IResourceTreeRootDecl;\n\n /**\n * {@inheritdoc ResourceJson.IResourceDeclContainer.context}\n */\n public get context(): Normalized.IContainerContextDecl | undefined {\n return this.tree.context;\n }\n\n protected _resources: Normalized.ILooseResourceDecl[] = [];\n protected _candidates: Normalized.ILooseResourceCandidateDecl[] = [];\n\n protected constructor(tree: Normalized.IResourceTreeRootDecl) {\n this.tree = tree;\n const id = tree.context?.baseId;\n const conditions = tree.context?.conditions;\n this._extract(tree, id, conditions).orThrow();\n }\n\n /**\n * Creates a new {@link ResourceJson.ResourceDeclTree | ResourceDeclTree} from an\n * untyped {@link ResourceJson.Json.IResourceTreeRootDecl | resource tree root declaration}.\n * @param from - The JSON object to convert.\n * @returns `Success` with the new tree if the JSON object is valid, otherwise `Failure`.\n */\n public static create(from: unknown): Result<ResourceDeclTree> {\n return Convert.resourceTreeRootDecl\n .convert(from)\n .withErrorFormat((err) => `Invalid resource tree: ${err}`)\n .onSuccess((decl) => {\n return captureResult(() => new ResourceDeclTree(decl));\n });\n }\n\n /**\n * Gets the loose resources extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declarations}\n * extracted from the collection.\n */\n public getImporterResources(): ReadonlyArray<Normalized.ILooseResourceDecl> {\n return this._resources;\n }\n\n /**\n * Gets the loose candidates extracted from the collection.\n * @returns The {@link ResourceJson.Normalized.ILooseResourceCandidateDecl | loose resource candidate declarations}\n * extracted from the collection.\n */\n public getImporterCandidates(): ReadonlyArray<Normalized.ILooseResourceCandidateDecl> {\n return this._candidates;\n }\n\n private _extract(\n node: Normalized.IResourceTreeChildNodeDecl,\n parentName?: string,\n parentConditions?: ReadonlyArray<Json.ILooseConditionDecl>\n ): Result<this> {\n const errors: MessageAggregator = new MessageAggregator();\n\n const resourceEntries = Array.from(Object.entries(node.resources ?? {}));\n const mergedResources = resourceEntries.map(([name, resource]) =>\n mergeChildResource(resource, name, parentName, parentConditions)\n );\n this._resources.push(...mapResults(mergedResources).aggregateError(errors).orDefault([]));\n\n const children = Array.from(Object.entries(node.children ?? {}));\n children.forEach(([name, childNode]) => {\n CommonHelpers.joinResourceIds(parentName, name)\n .onSuccess((childName) => {\n return this._extract(childNode, childName, parentConditions).aggregateError(errors);\n })\n .aggregateError(errors);\n });\n return errors.returnOrReport(succeed(this));\n }\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { IResourceTypeConfig } from './json';
2
+ /**
3
+ * A `Converter` for {@link ResourceTypes.Config.IResourceTypeConfig | ResourceTypeConfig} objects.
4
+ * @returns A `Converter` for {@link ResourceTypes.Config.IResourceTypeConfig | ResourceTypeConfig} objects.
5
+ * @public
6
+ */
7
+ export declare const resourceTypeConfig: import("@fgv/ts-utils").ObjectConverter<IResourceTypeConfig, unknown>;
8
+ //# sourceMappingURL=convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-types/config/convert.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,uEAG7B,CAAC"}
@@ -0,0 +1,36 @@
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.resourceTypeConfig = void 0;
25
+ /* eslint-disable @rushstack/typedef-var */
26
+ const ts_utils_1 = require("@fgv/ts-utils");
27
+ /**
28
+ * A `Converter` for {@link ResourceTypes.Config.IResourceTypeConfig | ResourceTypeConfig} objects.
29
+ * @returns A `Converter` for {@link ResourceTypes.Config.IResourceTypeConfig | ResourceTypeConfig} objects.
30
+ * @public
31
+ */
32
+ exports.resourceTypeConfig = ts_utils_1.Converters.strictObject({
33
+ name: ts_utils_1.Converters.string,
34
+ typeName: ts_utils_1.Converters.string
35
+ });
36
+ //# sourceMappingURL=convert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/packlets/resource-types/config/convert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,2CAA2C;AAE3C,4CAA2C;AAG3C;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,qBAAU,CAAC,YAAY,CAAsB;IAC7E,IAAI,EAAE,qBAAU,CAAC,MAAM;IACvB,QAAQ,EAAE,qBAAU,CAAC,MAAM;CAC5B,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\n/* eslint-disable @rushstack/typedef-var */\n\nimport { Converters } from '@fgv/ts-utils';\nimport { IResourceTypeConfig } from './json';\n\n/**\n * A `Converter` for {@link ResourceTypes.Config.IResourceTypeConfig | ResourceTypeConfig} objects.\n * @returns A `Converter` for {@link ResourceTypes.Config.IResourceTypeConfig | ResourceTypeConfig} objects.\n * @public\n */\nexport const resourceTypeConfig = Converters.strictObject<IResourceTypeConfig>({\n name: Converters.string,\n typeName: Converters.string\n});\n"]}
@@ -0,0 +1,4 @@
1
+ import * as Convert from './convert';
2
+ export * from './json';
3
+ export { Convert };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-types/config/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc,QAAQ,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,CAAC"}