@fgv/ts-res 4.5.0-0

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 (293) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/ts-res.d.ts +4282 -0
  4. package/dist/tsdoc-metadata.json +11 -0
  5. package/lib/index.d.ts +12 -0
  6. package/lib/index.d.ts.map +1 -0
  7. package/lib/index.js +79 -0
  8. package/lib/index.js.map +1 -0
  9. package/lib/packlets/common/conditions.d.ts +148 -0
  10. package/lib/packlets/common/conditions.d.ts.map +1 -0
  11. package/lib/packlets/common/conditions.js +50 -0
  12. package/lib/packlets/common/conditions.js.map +1 -0
  13. package/lib/packlets/common/convert.d.ts +111 -0
  14. package/lib/packlets/common/convert.d.ts.map +1 -0
  15. package/lib/packlets/common/convert.js +173 -0
  16. package/lib/packlets/common/convert.js.map +1 -0
  17. package/lib/packlets/common/helpers/conditions.d.ts +39 -0
  18. package/lib/packlets/common/helpers/conditions.d.ts.map +1 -0
  19. package/lib/packlets/common/helpers/conditions.js +105 -0
  20. package/lib/packlets/common/helpers/conditions.js.map +1 -0
  21. package/lib/packlets/common/helpers/index.d.ts +3 -0
  22. package/lib/packlets/common/helpers/index.d.ts.map +1 -0
  23. package/lib/packlets/common/helpers/index.js +40 -0
  24. package/lib/packlets/common/helpers/index.js.map +1 -0
  25. package/lib/packlets/common/helpers/resources.d.ts +34 -0
  26. package/lib/packlets/common/helpers/resources.d.ts.map +1 -0
  27. package/lib/packlets/common/helpers/resources.js +81 -0
  28. package/lib/packlets/common/helpers/resources.js.map +1 -0
  29. package/lib/packlets/common/index.d.ts +7 -0
  30. package/lib/packlets/common/index.d.ts.map +1 -0
  31. package/lib/packlets/common/index.js +69 -0
  32. package/lib/packlets/common/index.js.map +1 -0
  33. package/lib/packlets/common/resources.d.ts +41 -0
  34. package/lib/packlets/common/resources.d.ts.map +1 -0
  35. package/lib/packlets/common/resources.js +30 -0
  36. package/lib/packlets/common/resources.js.map +1 -0
  37. package/lib/packlets/common/validate/conditions.d.ts +248 -0
  38. package/lib/packlets/common/validate/conditions.d.ts.map +1 -0
  39. package/lib/packlets/common/validate/conditions.js +436 -0
  40. package/lib/packlets/common/validate/conditions.js.map +1 -0
  41. package/lib/packlets/common/validate/index.d.ts +5 -0
  42. package/lib/packlets/common/validate/index.d.ts.map +1 -0
  43. package/lib/packlets/common/validate/index.js +65 -0
  44. package/lib/packlets/common/validate/index.js.map +1 -0
  45. package/lib/packlets/common/validate/regularExpressions.d.ts +39 -0
  46. package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -0
  47. package/lib/packlets/common/validate/regularExpressions.js +63 -0
  48. package/lib/packlets/common/validate/regularExpressions.js.map +1 -0
  49. package/lib/packlets/common/validate/resources.d.ts +97 -0
  50. package/lib/packlets/common/validate/resources.d.ts.map +1 -0
  51. package/lib/packlets/common/validate/resources.js +171 -0
  52. package/lib/packlets/common/validate/resources.js.map +1 -0
  53. package/lib/packlets/conditions/condition.d.ts +91 -0
  54. package/lib/packlets/conditions/condition.d.ts.map +1 -0
  55. package/lib/packlets/conditions/condition.js +146 -0
  56. package/lib/packlets/conditions/condition.js.map +1 -0
  57. package/lib/packlets/conditions/conditionCollector.d.ts +54 -0
  58. package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -0
  59. package/lib/packlets/conditions/conditionCollector.js +72 -0
  60. package/lib/packlets/conditions/conditionCollector.js.map +1 -0
  61. package/lib/packlets/conditions/conditionDecls.d.ts +26 -0
  62. package/lib/packlets/conditions/conditionDecls.d.ts.map +1 -0
  63. package/lib/packlets/conditions/conditionDecls.js +24 -0
  64. package/lib/packlets/conditions/conditionDecls.js.map +1 -0
  65. package/lib/packlets/conditions/conditionSet.d.ts +99 -0
  66. package/lib/packlets/conditions/conditionSet.d.ts.map +1 -0
  67. package/lib/packlets/conditions/conditionSet.js +164 -0
  68. package/lib/packlets/conditions/conditionSet.js.map +1 -0
  69. package/lib/packlets/conditions/conditionSetCollector.d.ts +65 -0
  70. package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -0
  71. package/lib/packlets/conditions/conditionSetCollector.js +90 -0
  72. package/lib/packlets/conditions/conditionSetCollector.js.map +1 -0
  73. package/lib/packlets/conditions/conditionSetDecls.d.ts +18 -0
  74. package/lib/packlets/conditions/conditionSetDecls.d.ts.map +1 -0
  75. package/lib/packlets/conditions/conditionSetDecls.js +24 -0
  76. package/lib/packlets/conditions/conditionSetDecls.js.map +1 -0
  77. package/lib/packlets/conditions/conditionToken.d.ts +86 -0
  78. package/lib/packlets/conditions/conditionToken.d.ts.map +1 -0
  79. package/lib/packlets/conditions/conditionToken.js +150 -0
  80. package/lib/packlets/conditions/conditionToken.js.map +1 -0
  81. package/lib/packlets/conditions/convert/conditionSetDecls.d.ts +24 -0
  82. package/lib/packlets/conditions/convert/conditionSetDecls.d.ts.map +1 -0
  83. package/lib/packlets/conditions/convert/conditionSetDecls.js +54 -0
  84. package/lib/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
  85. package/lib/packlets/conditions/convert/decls.d.ts +24 -0
  86. package/lib/packlets/conditions/convert/decls.d.ts.map +1 -0
  87. package/lib/packlets/conditions/convert/decls.js +111 -0
  88. package/lib/packlets/conditions/convert/decls.js.map +1 -0
  89. package/lib/packlets/conditions/convert/index.d.ts +3 -0
  90. package/lib/packlets/conditions/convert/index.d.ts.map +1 -0
  91. package/lib/packlets/conditions/convert/index.js +40 -0
  92. package/lib/packlets/conditions/convert/index.js.map +1 -0
  93. package/lib/packlets/conditions/index.d.ts +10 -0
  94. package/lib/packlets/conditions/index.d.ts.map +1 -0
  95. package/lib/packlets/conditions/index.js +70 -0
  96. package/lib/packlets/conditions/index.js.map +1 -0
  97. package/lib/packlets/decisions/abstractDecision.d.ts +39 -0
  98. package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -0
  99. package/lib/packlets/decisions/abstractDecision.js +63 -0
  100. package/lib/packlets/decisions/abstractDecision.js.map +1 -0
  101. package/lib/packlets/decisions/abstractDecisionCollector.d.ts +59 -0
  102. package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -0
  103. package/lib/packlets/decisions/abstractDecisionCollector.js +92 -0
  104. package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -0
  105. package/lib/packlets/decisions/candidate.d.ts +58 -0
  106. package/lib/packlets/decisions/candidate.d.ts.map +1 -0
  107. package/lib/packlets/decisions/candidate.js +80 -0
  108. package/lib/packlets/decisions/candidate.js.map +1 -0
  109. package/lib/packlets/decisions/common.d.ts +15 -0
  110. package/lib/packlets/decisions/common.d.ts.map +1 -0
  111. package/lib/packlets/decisions/common.js +24 -0
  112. package/lib/packlets/decisions/common.js.map +1 -0
  113. package/lib/packlets/decisions/concreteDecision.d.ts +74 -0
  114. package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -0
  115. package/lib/packlets/decisions/concreteDecision.js +114 -0
  116. package/lib/packlets/decisions/concreteDecision.js.map +1 -0
  117. package/lib/packlets/decisions/decision.d.ts +91 -0
  118. package/lib/packlets/decisions/decision.d.ts.map +1 -0
  119. package/lib/packlets/decisions/decision.js +126 -0
  120. package/lib/packlets/decisions/decision.js.map +1 -0
  121. package/lib/packlets/decisions/index.d.ts +7 -0
  122. package/lib/packlets/decisions/index.d.ts.map +1 -0
  123. package/lib/packlets/decisions/index.js +44 -0
  124. package/lib/packlets/decisions/index.js.map +1 -0
  125. package/lib/packlets/import/fsItem.d.ts +99 -0
  126. package/lib/packlets/import/fsItem.d.ts.map +1 -0
  127. package/lib/packlets/import/fsItem.js +174 -0
  128. package/lib/packlets/import/fsItem.js.map +1 -0
  129. package/lib/packlets/import/importContext.d.ts +85 -0
  130. package/lib/packlets/import/importContext.d.ts.map +1 -0
  131. package/lib/packlets/import/importContext.js +94 -0
  132. package/lib/packlets/import/importContext.js.map +1 -0
  133. package/lib/packlets/import/importManager.d.ts +93 -0
  134. package/lib/packlets/import/importManager.d.ts.map +1 -0
  135. package/lib/packlets/import/importManager.js +133 -0
  136. package/lib/packlets/import/importManager.js.map +1 -0
  137. package/lib/packlets/import/importable.d.ts +71 -0
  138. package/lib/packlets/import/importable.d.ts.map +1 -0
  139. package/lib/packlets/import/importable.js +35 -0
  140. package/lib/packlets/import/importable.js.map +1 -0
  141. package/lib/packlets/import/importers/collectionImporter.d.ts +60 -0
  142. package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -0
  143. package/lib/packlets/import/importers/collectionImporter.js +146 -0
  144. package/lib/packlets/import/importers/collectionImporter.js.map +1 -0
  145. package/lib/packlets/import/importers/fsItemImporter.d.ts +49 -0
  146. package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -0
  147. package/lib/packlets/import/importers/fsItemImporter.js +120 -0
  148. package/lib/packlets/import/importers/fsItemImporter.js.map +1 -0
  149. package/lib/packlets/import/importers/importer.d.ts +31 -0
  150. package/lib/packlets/import/importers/importer.d.ts.map +1 -0
  151. package/lib/packlets/import/importers/importer.js +24 -0
  152. package/lib/packlets/import/importers/importer.js.map +1 -0
  153. package/lib/packlets/import/importers/index.d.ts +6 -0
  154. package/lib/packlets/import/importers/index.d.ts.map +1 -0
  155. package/lib/packlets/import/importers/index.js +43 -0
  156. package/lib/packlets/import/importers/index.js.map +1 -0
  157. package/lib/packlets/import/importers/jsonImporter.d.ts +32 -0
  158. package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -0
  159. package/lib/packlets/import/importers/jsonImporter.js +140 -0
  160. package/lib/packlets/import/importers/jsonImporter.js.map +1 -0
  161. package/lib/packlets/import/importers/pathImporter.d.ts +61 -0
  162. package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -0
  163. package/lib/packlets/import/importers/pathImporter.js +87 -0
  164. package/lib/packlets/import/importers/pathImporter.js.map +1 -0
  165. package/lib/packlets/import/index.d.ts +7 -0
  166. package/lib/packlets/import/index.d.ts.map +1 -0
  167. package/lib/packlets/import/index.js +67 -0
  168. package/lib/packlets/import/index.js.map +1 -0
  169. package/lib/packlets/qualifier-types/convert.d.ts +19 -0
  170. package/lib/packlets/qualifier-types/convert.d.ts.map +1 -0
  171. package/lib/packlets/qualifier-types/convert.js +45 -0
  172. package/lib/packlets/qualifier-types/convert.js.map +1 -0
  173. package/lib/packlets/qualifier-types/index.d.ts +8 -0
  174. package/lib/packlets/qualifier-types/index.d.ts.map +1 -0
  175. package/lib/packlets/qualifier-types/index.js +68 -0
  176. package/lib/packlets/qualifier-types/index.js.map +1 -0
  177. package/lib/packlets/qualifier-types/languageQualifierType.d.ts +56 -0
  178. package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -0
  179. package/lib/packlets/qualifier-types/languageQualifierType.js +87 -0
  180. package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -0
  181. package/lib/packlets/qualifier-types/literalQualifierType.d.ts +92 -0
  182. package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -0
  183. package/lib/packlets/qualifier-types/literalQualifierType.js +114 -0
  184. package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -0
  185. package/lib/packlets/qualifier-types/qualifierType.d.ts +184 -0
  186. package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -0
  187. package/lib/packlets/qualifier-types/qualifierType.js +173 -0
  188. package/lib/packlets/qualifier-types/qualifierType.js.map +1 -0
  189. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts +40 -0
  190. package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -0
  191. package/lib/packlets/qualifier-types/qualifierTypeCollector.js +102 -0
  192. package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
  193. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +74 -0
  194. package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -0
  195. package/lib/packlets/qualifier-types/territoryQualifierType.js +113 -0
  196. package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
  197. package/lib/packlets/qualifiers/convert/decls.d.ts +23 -0
  198. package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -0
  199. package/lib/packlets/qualifiers/convert/decls.js +71 -0
  200. package/lib/packlets/qualifiers/convert/decls.js.map +1 -0
  201. package/lib/packlets/qualifiers/convert/index.d.ts +3 -0
  202. package/lib/packlets/qualifiers/convert/index.d.ts.map +1 -0
  203. package/lib/packlets/qualifiers/convert/index.js +40 -0
  204. package/lib/packlets/qualifiers/convert/index.js.map +1 -0
  205. package/lib/packlets/qualifiers/convert/qualifier.d.ts +17 -0
  206. package/lib/packlets/qualifiers/convert/qualifier.d.ts.map +1 -0
  207. package/lib/packlets/qualifiers/convert/qualifier.js +43 -0
  208. package/lib/packlets/qualifiers/convert/qualifier.js.map +1 -0
  209. package/lib/packlets/qualifiers/index.d.ts +6 -0
  210. package/lib/packlets/qualifiers/index.d.ts.map +1 -0
  211. package/lib/packlets/qualifiers/index.js +66 -0
  212. package/lib/packlets/qualifiers/index.js.map +1 -0
  213. package/lib/packlets/qualifiers/qualifier.d.ts +68 -0
  214. package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -0
  215. package/lib/packlets/qualifiers/qualifier.js +87 -0
  216. package/lib/packlets/qualifiers/qualifier.js.map +1 -0
  217. package/lib/packlets/qualifiers/qualifierCollector.d.ts +90 -0
  218. package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -0
  219. package/lib/packlets/qualifiers/qualifierCollector.js +157 -0
  220. package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -0
  221. package/lib/packlets/qualifiers/qualifierDecl.d.ts +46 -0
  222. package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -0
  223. package/lib/packlets/qualifiers/qualifierDecl.js +24 -0
  224. package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -0
  225. package/lib/packlets/resource-json/convert.d.ts +54 -0
  226. package/lib/packlets/resource-json/convert.d.ts.map +1 -0
  227. package/lib/packlets/resource-json/convert.js +139 -0
  228. package/lib/packlets/resource-json/convert.js.map +1 -0
  229. package/lib/packlets/resource-json/helpers.d.ts +41 -0
  230. package/lib/packlets/resource-json/helpers.d.ts.map +1 -0
  231. package/lib/packlets/resource-json/helpers.js +96 -0
  232. package/lib/packlets/resource-json/helpers.js.map +1 -0
  233. package/lib/packlets/resource-json/index.d.ts +9 -0
  234. package/lib/packlets/resource-json/index.d.ts.map +1 -0
  235. package/lib/packlets/resource-json/index.js +72 -0
  236. package/lib/packlets/resource-json/index.js.map +1 -0
  237. package/lib/packlets/resource-json/json.d.ts +182 -0
  238. package/lib/packlets/resource-json/json.d.ts.map +1 -0
  239. package/lib/packlets/resource-json/json.js +24 -0
  240. package/lib/packlets/resource-json/json.js.map +1 -0
  241. package/lib/packlets/resource-json/normalized.d.ts +123 -0
  242. package/lib/packlets/resource-json/normalized.d.ts.map +1 -0
  243. package/lib/packlets/resource-json/normalized.js +24 -0
  244. package/lib/packlets/resource-json/normalized.js.map +1 -0
  245. package/lib/packlets/resource-json/resourceDeclCollection.d.ts +39 -0
  246. package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -0
  247. package/lib/packlets/resource-json/resourceDeclCollection.js +121 -0
  248. package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -0
  249. package/lib/packlets/resource-json/resourceDeclContainer.d.ts +11 -0
  250. package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -0
  251. package/lib/packlets/resource-json/resourceDeclContainer.js +24 -0
  252. package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -0
  253. package/lib/packlets/resource-json/resourceDeclTree.d.ts +39 -0
  254. package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -0
  255. package/lib/packlets/resource-json/resourceDeclTree.js +122 -0
  256. package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -0
  257. package/lib/packlets/resource-types/index.d.ts +4 -0
  258. package/lib/packlets/resource-types/index.d.ts.map +1 -0
  259. package/lib/packlets/resource-types/index.js +41 -0
  260. package/lib/packlets/resource-types/index.js.map +1 -0
  261. package/lib/packlets/resource-types/jsonResourceType.d.ts +65 -0
  262. package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -0
  263. package/lib/packlets/resource-types/jsonResourceType.js +63 -0
  264. package/lib/packlets/resource-types/jsonResourceType.js.map +1 -0
  265. package/lib/packlets/resource-types/resourceType.d.ts +87 -0
  266. package/lib/packlets/resource-types/resourceType.d.ts.map +1 -0
  267. package/lib/packlets/resource-types/resourceType.js +62 -0
  268. package/lib/packlets/resource-types/resourceType.js.map +1 -0
  269. package/lib/packlets/resource-types/resourceTypeCollector.d.ts +30 -0
  270. package/lib/packlets/resource-types/resourceTypeCollector.d.ts.map +1 -0
  271. package/lib/packlets/resource-types/resourceTypeCollector.js +65 -0
  272. package/lib/packlets/resource-types/resourceTypeCollector.js.map +1 -0
  273. package/lib/packlets/resources/index.d.ts +5 -0
  274. package/lib/packlets/resources/index.d.ts.map +1 -0
  275. package/lib/packlets/resources/index.js +42 -0
  276. package/lib/packlets/resources/index.js.map +1 -0
  277. package/lib/packlets/resources/resource.d.ts +75 -0
  278. package/lib/packlets/resources/resource.d.ts.map +1 -0
  279. package/lib/packlets/resources/resource.js +109 -0
  280. package/lib/packlets/resources/resource.js.map +1 -0
  281. package/lib/packlets/resources/resourceBuilder.d.ts +112 -0
  282. package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -0
  283. package/lib/packlets/resources/resourceBuilder.js +162 -0
  284. package/lib/packlets/resources/resourceBuilder.js.map +1 -0
  285. package/lib/packlets/resources/resourceCandidate.d.ts +102 -0
  286. package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -0
  287. package/lib/packlets/resources/resourceCandidate.js +180 -0
  288. package/lib/packlets/resources/resourceCandidate.js.map +1 -0
  289. package/lib/packlets/resources/resourceManager.d.ts +104 -0
  290. package/lib/packlets/resources/resourceManager.d.ts.map +1 -0
  291. package/lib/packlets/resources/resourceManager.js +193 -0
  292. package/lib/packlets/resources/resourceManager.js.map +1 -0
  293. package/package.json +76 -0
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.52.1"
9
+ }
10
+ ]
11
+ }
package/lib/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import * as QualifierTypes from './packlets/qualifier-types';
2
+ import * as Qualifiers from './packlets/qualifiers';
3
+ import * as Conditions from './packlets/conditions';
4
+ import * as Decisions from './packlets/decisions';
5
+ import * as ResourceJson from './packlets/resource-json';
6
+ import * as Resources from './packlets/resources';
7
+ import * as ResourceTypes from './packlets/resource-types';
8
+ import * as Import from './packlets/import';
9
+ export * from './packlets/common';
10
+ export * from './packlets/common';
11
+ export { Conditions, Decisions, Import, QualifierTypes, Qualifiers, ResourceJson, Resources, ResourceTypes };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2025 Erik Fortune
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in all
13
+ * copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ * SOFTWARE.
22
+ */
23
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ var desc = Object.getOwnPropertyDescriptor(m, k);
26
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
27
+ desc = { enumerable: true, get: function() { return m[k]; } };
28
+ }
29
+ Object.defineProperty(o, k2, desc);
30
+ }) : (function(o, m, k, k2) {
31
+ if (k2 === undefined) k2 = k;
32
+ o[k2] = m[k];
33
+ }));
34
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
35
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
36
+ }) : function(o, v) {
37
+ o["default"] = v;
38
+ });
39
+ var __importStar = (this && this.__importStar) || (function () {
40
+ var ownKeys = function(o) {
41
+ ownKeys = Object.getOwnPropertyNames || function (o) {
42
+ var ar = [];
43
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
44
+ return ar;
45
+ };
46
+ return ownKeys(o);
47
+ };
48
+ return function (mod) {
49
+ if (mod && mod.__esModule) return mod;
50
+ var result = {};
51
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
52
+ __setModuleDefault(result, mod);
53
+ return result;
54
+ };
55
+ })();
56
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
57
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
58
+ };
59
+ Object.defineProperty(exports, "__esModule", { value: true });
60
+ exports.ResourceTypes = exports.Resources = exports.ResourceJson = exports.Qualifiers = exports.QualifierTypes = exports.Import = exports.Decisions = exports.Conditions = void 0;
61
+ const QualifierTypes = __importStar(require("./packlets/qualifier-types"));
62
+ exports.QualifierTypes = QualifierTypes;
63
+ const Qualifiers = __importStar(require("./packlets/qualifiers"));
64
+ exports.Qualifiers = Qualifiers;
65
+ const Conditions = __importStar(require("./packlets/conditions"));
66
+ exports.Conditions = Conditions;
67
+ const Decisions = __importStar(require("./packlets/decisions"));
68
+ exports.Decisions = Decisions;
69
+ const ResourceJson = __importStar(require("./packlets/resource-json"));
70
+ exports.ResourceJson = ResourceJson;
71
+ const Resources = __importStar(require("./packlets/resources"));
72
+ exports.Resources = Resources;
73
+ const ResourceTypes = __importStar(require("./packlets/resource-types"));
74
+ exports.ResourceTypes = ResourceTypes;
75
+ const Import = __importStar(require("./packlets/import"));
76
+ exports.Import = Import;
77
+ __exportStar(require("./packlets/common"), exports);
78
+ __exportStar(require("./packlets/common"), exports);
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2EAA6D;AAYrB,wCAAc;AAXtD,kEAAoD;AAWI,gCAAU;AAVlE,kEAAoD;AAU3C,gCAAU;AATnB,gEAAkD;AAS7B,8BAAS;AAR9B,uEAAyD;AAQW,oCAAY;AAPhF,gEAAkD;AAOgC,8BAAS;AAN3F,yEAA2D;AAMkC,sCAAa;AAL1G,0DAA4C;AAKZ,wBAAM;AAHtC,oDAAkC;AAClC,oDAAkC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as QualifierTypes from './packlets/qualifier-types';\nimport * as Qualifiers from './packlets/qualifiers';\nimport * as Conditions from './packlets/conditions';\nimport * as Decisions from './packlets/decisions';\nimport * as ResourceJson from './packlets/resource-json';\nimport * as Resources from './packlets/resources';\nimport * as ResourceTypes from './packlets/resource-types';\nimport * as Import from './packlets/import';\n\nexport * from './packlets/common';\nexport * from './packlets/common';\n\nexport { Conditions, Decisions, Import, QualifierTypes, Qualifiers, ResourceJson, Resources, ResourceTypes };\n"]}
@@ -0,0 +1,148 @@
1
+ import { Brand } from '@fgv/ts-utils';
2
+ /**
3
+ * Branded string representing a validated qualifier name.
4
+ * @public
5
+ */
6
+ export type QualifierName = Brand<string, 'QualifierName'>;
7
+ /**
8
+ * Branded number representing a validated qualifier index.
9
+ * @public
10
+ */
11
+ export type QualifierIndex = Brand<number, 'QualifierIndex'>;
12
+ /**
13
+ * Branded string representing a validated qualifier type name.
14
+ * @public
15
+ */
16
+ export type QualifierTypeName = Brand<string, 'QualifierTypeName'>;
17
+ /**
18
+ * Branded number representing a validated qualifier type index.
19
+ * @public
20
+ */
21
+ export type QualifierTypeIndex = Brand<number, 'QualifierTypeIndex'>;
22
+ /**
23
+ * Branded type for a validated qualifier condition value - i.e. a value
24
+ * that has been determined to be valid for use in a condition attached
25
+ * to some resource.
26
+ *
27
+ * @example
28
+ * For a language qualifier type, it is likely that a single language
29
+ * tag can be used for either a condition or a context value. However,
30
+ * a list of languages would likely only be valid as a context value.
31
+ * @public
32
+ */
33
+ export type QualifierConditionValue = Brand<string, 'QualifierConditionValue'>;
34
+ /**
35
+ * Branded type for a validated qualifier context value - i.e. a value
36
+ * that has been determined to be valid for use in some runtime context.
37
+ * @example
38
+ * For a language qualifier type, it is likely that a single language
39
+ * tag can be used for either a condition or a context value. However,
40
+ * a list of languages would likely only be valid as a context value.
41
+ * @public
42
+ */
43
+ export type QualifierContextValue = Brand<string, 'QualifierContextValue'>;
44
+ /**
45
+ * Branded number representing a score in the range 0.0 (no match) .. 1.0 (perfect match)
46
+ * which results from evaluating some condition.
47
+ * @public
48
+ */
49
+ export type QualifierMatchScore = Brand<number, 'QualifierMatchScore'>;
50
+ /**
51
+ * {@link QualifierMatchScore | Match score} indicating no match.
52
+ * @public
53
+ */
54
+ export declare const NoMatch: QualifierMatchScore;
55
+ /**
56
+ * {@link QualifierMatchScore | Match score} indicating a perfect match.
57
+ * @public
58
+ */
59
+ export declare const PerfectMatch: QualifierMatchScore;
60
+ /**
61
+ * Branded number representing a validated condition priority.
62
+ * @public
63
+ */
64
+ export type ConditionPriority = Brand<number, 'ConditionPriority'>;
65
+ /**
66
+ * Minimum valid priority for a condition.
67
+ * @public
68
+ */
69
+ export declare const MinConditionPriority: ConditionPriority;
70
+ /**
71
+ * Maximum valid priority for a condition.
72
+ * @public
73
+ */
74
+ export declare const MaxConditionPriority: ConditionPriority;
75
+ /**
76
+ * Condition operators for use in conditions.
77
+ * @public
78
+ */
79
+ export type ConditionOperator = 'always' | 'never' | 'matches';
80
+ /**
81
+ * Array of all valid condition operators.
82
+ * @public
83
+ */
84
+ export declare const allConditionOperators: ConditionOperator[];
85
+ /**
86
+ * Branded number representing a validated condition index.
87
+ * @public
88
+ */
89
+ export type ConditionIndex = Brand<number, 'ConditionIndex'>;
90
+ /**
91
+ * A branded string representing a validated condition key. A condition key is a
92
+ * string value which fully describes the condition apart from index. The condition
93
+ * key can be used to quickly determine if two conditions are identical apart from
94
+ * index, or for inspection.
95
+ * @public
96
+ */
97
+ export type ConditionKey = Brand<string, 'ConditionKey'>;
98
+ /**
99
+ * A string representing a validated condition token. Condition tokens are
100
+ * typically extracted from the name of some resource (e.g. file or folder)
101
+ * being imported. A condition token has the form `<qualifierName>=<value>`
102
+ * or `<value>`.
103
+ * @public
104
+ */
105
+ export type ConditionToken = Brand<string, 'ConditionToken'>;
106
+ /**
107
+ * Branded number representing a validated condition set index.
108
+ * @public
109
+ */
110
+ export type ConditionSetIndex = Brand<number, 'ConditionSetIndex'>;
111
+ /**
112
+ * Branded string representing a validated condition set key. A condition set key
113
+ * is a string value which fully describes the condition set apart from index. The
114
+ * condition set key can be used to quickly determine if two condition sets are
115
+ * identical apart from index, or for inspection.
116
+ * @public
117
+ */
118
+ export type ConditionSetKey = Brand<string, 'ConditionSetKey'>;
119
+ /**
120
+ * A string representing a validated condition set token. Condition set tokens are
121
+ * typically extracted from the name of some resource (e.g. file or folder) being
122
+ * imported. A condition set token is a comma-separated list of one or more
123
+ * {@link ConditionToken | condition tokens}, where a condition token has either
124
+ * the form `<qualifierName>=<value>` or `<value>`.
125
+ * @public
126
+ */
127
+ export type ConditionSetToken = Brand<string, 'ConditionSetToken'>;
128
+ /**
129
+ * Branded string representing a hash value for a condition set. The hash value
130
+ * is an 8-character string derived from the crc32 hash of the condition set key
131
+ * and is used to quickly and compactly identify a condition set or compare for
132
+ * equality.
133
+ * @public
134
+ */
135
+ export type ConditionSetHash = Brand<string, 'ConditionSetHash'>;
136
+ /**
137
+ * Branded string representing a validated decision key. A decision key is a string
138
+ * value which fully describes the decision apart from index. The decision key can
139
+ * be used to quickly determine if two decisions are identical apart from index.
140
+ * @public
141
+ */
142
+ export type DecisionKey = Brand<string, 'DecisionKey'>;
143
+ /**
144
+ * Branded number representing a validated decision index.
145
+ * @public
146
+ */
147
+ export type DecisionIndex = Brand<number, 'DecisionIndex'>;
148
+ //# sourceMappingURL=conditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../../src/packlets/common/conditions.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,MAAM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E,mBAAmB,CAAC,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC"}
@@ -0,0 +1,50 @@
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.allConditionOperators = exports.MaxConditionPriority = exports.MinConditionPriority = exports.PerfectMatch = exports.NoMatch = void 0;
25
+ /**
26
+ * {@link QualifierMatchScore | Match score} indicating no match.
27
+ * @public
28
+ */
29
+ exports.NoMatch = 0.0;
30
+ /**
31
+ * {@link QualifierMatchScore | Match score} indicating a perfect match.
32
+ * @public
33
+ */
34
+ exports.PerfectMatch = 1.0;
35
+ /**
36
+ * Minimum valid priority for a condition.
37
+ * @public
38
+ */
39
+ exports.MinConditionPriority = 0;
40
+ /**
41
+ * Maximum valid priority for a condition.
42
+ * @public
43
+ */
44
+ exports.MaxConditionPriority = 1000;
45
+ /**
46
+ * Array of all valid condition operators.
47
+ * @public
48
+ */
49
+ exports.allConditionOperators = ['always', 'never', 'matches'];
50
+ //# sourceMappingURL=conditions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../../src/packlets/common/conditions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AA2DH;;;GAGG;AACU,QAAA,OAAO,GAAwB,GAA0B,CAAC;AAEvE;;;GAGG;AACU,QAAA,YAAY,GAAwB,GAA0B,CAAC;AAQ5E;;;GAGG;AACU,QAAA,oBAAoB,GAAsB,CAAsB,CAAC;AAE9E;;;GAGG;AACU,QAAA,oBAAoB,GAAsB,IAAyB,CAAC;AAQjF;;;GAGG;AACU,QAAA,qBAAqB,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Brand } from '@fgv/ts-utils';\n\n/**\n * Branded string representing a validated qualifier name.\n * @public\n */\nexport type QualifierName = Brand<string, 'QualifierName'>;\n\n/**\n * Branded number representing a validated qualifier index.\n * @public\n */\nexport type QualifierIndex = Brand<number, 'QualifierIndex'>;\n\n/**\n * Branded string representing a validated qualifier type name.\n * @public\n */\nexport type QualifierTypeName = Brand<string, 'QualifierTypeName'>;\n\n/**\n * Branded number representing a validated qualifier type index.\n * @public\n */\nexport type QualifierTypeIndex = Brand<number, 'QualifierTypeIndex'>;\n\n/**\n * Branded type for a validated qualifier condition value - i.e. a value\n * that has been determined to be valid for use in a condition attached\n * to some resource.\n *\n * @example\n * For a language qualifier type, it is likely that a single language\n * tag can be used for either a condition or a context value. However,\n * a list of languages would likely only be valid as a context value.\n * @public\n */\nexport type QualifierConditionValue = Brand<string, 'QualifierConditionValue'>;\n\n/**\n * Branded type for a validated qualifier context value - i.e. a value\n * that has been determined to be valid for use in some runtime context.\n * @example\n * For a language qualifier type, it is likely that a single language\n * tag can be used for either a condition or a context value. However,\n * a list of languages would likely only be valid as a context value.\n * @public\n */\nexport type QualifierContextValue = Brand<string, 'QualifierContextValue'>;\n\n/**\n * Branded number representing a score in the range 0.0 (no match) .. 1.0 (perfect match)\n * which results from evaluating some condition.\n * @public\n */\nexport type QualifierMatchScore = Brand<number, 'QualifierMatchScore'>;\n\n/**\n * {@link QualifierMatchScore | Match score} indicating no match.\n * @public\n */\nexport const NoMatch: QualifierMatchScore = 0.0 as QualifierMatchScore;\n\n/**\n * {@link QualifierMatchScore | Match score} indicating a perfect match.\n * @public\n */\nexport const PerfectMatch: QualifierMatchScore = 1.0 as QualifierMatchScore;\n\n/**\n * Branded number representing a validated condition priority.\n * @public\n */\nexport type ConditionPriority = Brand<number, 'ConditionPriority'>;\n\n/**\n * Minimum valid priority for a condition.\n * @public\n */\nexport const MinConditionPriority: ConditionPriority = 0 as ConditionPriority;\n\n/**\n * Maximum valid priority for a condition.\n * @public\n */\nexport const MaxConditionPriority: ConditionPriority = 1000 as ConditionPriority;\n\n/**\n * Condition operators for use in conditions.\n * @public\n */\nexport type ConditionOperator = 'always' | 'never' | 'matches';\n\n/**\n * Array of all valid condition operators.\n * @public\n */\nexport const allConditionOperators: ConditionOperator[] = ['always', 'never', 'matches'];\n\n/**\n * Branded number representing a validated condition index.\n * @public\n */\nexport type ConditionIndex = Brand<number, 'ConditionIndex'>;\n\n/**\n * A branded string representing a validated condition key. A condition key is a\n * string value which fully describes the condition apart from index. The condition\n * key can be used to quickly determine if two conditions are identical apart from\n * index, or for inspection.\n * @public\n */\nexport type ConditionKey = Brand<string, 'ConditionKey'>;\n\n/**\n * A string representing a validated condition token. Condition tokens are\n * typically extracted from the name of some resource (e.g. file or folder)\n * being imported. A condition token has the form `<qualifierName>=<value>`\n * or `<value>`.\n * @public\n */\nexport type ConditionToken = Brand<string, 'ConditionToken'>;\n\n/**\n * Branded number representing a validated condition set index.\n * @public\n */\nexport type ConditionSetIndex = Brand<number, 'ConditionSetIndex'>;\n\n/**\n * Branded string representing a validated condition set key. A condition set key\n * is a string value which fully describes the condition set apart from index. The\n * condition set key can be used to quickly determine if two condition sets are\n * identical apart from index, or for inspection.\n * @public\n */\nexport type ConditionSetKey = Brand<string, 'ConditionSetKey'>;\n\n/**\n * A string representing a validated condition set token. Condition set tokens are\n * typically extracted from the name of some resource (e.g. file or folder) being\n * imported. A condition set token is a comma-separated list of one or more\n * {@link ConditionToken | condition tokens}, where a condition token has either\n * the form `<qualifierName>=<value>` or `<value>`.\n * @public\n */\nexport type ConditionSetToken = Brand<string, 'ConditionSetToken'>;\n\n/**\n * Branded string representing a hash value for a condition set. The hash value\n * is an 8-character string derived from the crc32 hash of the condition set key\n * and is used to quickly and compactly identify a condition set or compare for\n * equality.\n * @public\n */\nexport type ConditionSetHash = Brand<string, 'ConditionSetHash'>;\n\n/**\n * Branded string representing a validated decision key. A decision key is a string\n * value which fully describes the decision apart from index. The decision key can\n * be used to quickly determine if two decisions are identical apart from index.\n * @public\n */\nexport type DecisionKey = Brand<string, 'DecisionKey'>;\n\n/**\n * Branded number representing a validated decision index.\n * @public\n */\nexport type DecisionIndex = Brand<number, 'DecisionIndex'>;\n"]}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * `Converter` which validates an `unknown` value as a {@link QualifierName | QualifierName}.
3
+ * @public
4
+ */
5
+ export declare const qualifierName: import("@fgv/ts-utils").Converter<import("./conditions").QualifierName, unknown>;
6
+ /**
7
+ * `Converter` which validates an `unknown` value as a {@link QualifierIndex | QualifierIndex}.
8
+ * @public
9
+ */
10
+ export declare const qualifierIndex: import("@fgv/ts-utils").Converter<import("./conditions").QualifierIndex, unknown>;
11
+ /**
12
+ * `Converter` which validates an `unknown` value as a {@link QualifierTypeName | QualifierTypeName}.
13
+ * @public
14
+ */
15
+ export declare const qualifierTypeName: import("@fgv/ts-utils").Converter<import("./conditions").QualifierTypeName, unknown>;
16
+ /**
17
+ * `Converter` which validates an `unknown` value as a {@link QualifierTypeIndex | QualifierTypeIndex}.
18
+ * @public
19
+ */
20
+ export declare const qualifierTypeIndex: import("@fgv/ts-utils").Converter<import("./conditions").QualifierTypeIndex, unknown>;
21
+ /**
22
+ * `Converter` which validates an `unknown` value as a {@link QualifierConditionValue | QualifierConditionValue}.
23
+ * @public
24
+ */
25
+ export declare const qualifierMatchScore: import("@fgv/ts-utils").Converter<import("./conditions").QualifierMatchScore, unknown>;
26
+ /**
27
+ * `Converter` which validates an `unknown` value as a {@link ConditionPriority | ConditionPriority}.
28
+ * @public
29
+ */
30
+ export declare const conditionPriority: import("@fgv/ts-utils").Converter<import("./conditions").ConditionPriority, unknown>;
31
+ /**
32
+ * `Converter` which validates an `unknown` value as a {@link ConditionOperator | ConditionOperator}.
33
+ * @public
34
+ */
35
+ export declare const conditionOperator: import("@fgv/ts-utils").Converter<import("./conditions").ConditionOperator, import("./conditions").ConditionOperator[]>;
36
+ /**
37
+ * `Converter` which validates an `unknown` value as a {@link ConditionIndex | ConditionIndex}.
38
+ * @public
39
+ */
40
+ export declare const conditionIndex: import("@fgv/ts-utils").Converter<import("./conditions").ConditionIndex, unknown>;
41
+ /**
42
+ * `Converter` which validates an `unknown` value as a {@link ConditionKey | ConditionKey}.
43
+ * @public
44
+ */
45
+ export declare const conditionKey: import("@fgv/ts-utils").Converter<import("./conditions").ConditionKey, unknown>;
46
+ /**
47
+ * `Converter` which validates an `unknown` value as a {@link ConditionToken | ConditionToken}.
48
+ * @public
49
+ */
50
+ export declare const conditionToken: import("@fgv/ts-utils").Converter<import("./conditions").ConditionToken, unknown>;
51
+ /**
52
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetIndex | ConditionSetIndex}.
53
+ * @public
54
+ */
55
+ export declare const conditionSetIndex: import("@fgv/ts-utils").Converter<import("./conditions").ConditionSetIndex, unknown>;
56
+ /**
57
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetKey | ConditionSetKey}.
58
+ * @public
59
+ */
60
+ export declare const conditionSetKey: import("@fgv/ts-utils").Converter<import("./conditions").ConditionSetKey, unknown>;
61
+ /**
62
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetToken | ConditionSetToken}.
63
+ * @public
64
+ */
65
+ export declare const conditionSetToken: import("@fgv/ts-utils").Converter<import("./conditions").ConditionSetToken, unknown>;
66
+ /**
67
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetHash | ConditionSetHash}.
68
+ * @public
69
+ */
70
+ export declare const conditionSetHash: import("@fgv/ts-utils").Converter<import("./conditions").ConditionSetHash, unknown>;
71
+ /**
72
+ * `Converter` which validates an `unknown` value as a {@link DecisionIndex | DecisionIndex}.
73
+ * @public
74
+ */
75
+ export declare const decisionIndex: import("@fgv/ts-utils").Converter<import("./conditions").DecisionIndex, unknown>;
76
+ /**
77
+ * `Converter` which validates an `unknown` value as a {@link DecisionKey | DecisionKey}.
78
+ * @public
79
+ */
80
+ export declare const decisionKey: import("@fgv/ts-utils").Converter<import("./conditions").DecisionKey, unknown>;
81
+ /**
82
+ * `Converter` which validates an `unknown` value as a {@link ResourceId | ResourceId}.
83
+ * @public
84
+ */
85
+ export declare const resourceId: import("@fgv/ts-utils").Converter<import("./resources").ResourceId, unknown>;
86
+ /**
87
+ * `Converter` which validates an `unknown` value as a {@link ResourceName | ResourceName}.
88
+ * @public
89
+ */
90
+ export declare const resourceName: import("@fgv/ts-utils").Converter<import("./resources").ResourceName, unknown>;
91
+ /**
92
+ * `Converter` which validates an `unknown` value as a {@link ResourceIndex | ResourceIndex}.
93
+ * @public
94
+ */
95
+ export declare const resourceIndex: import("@fgv/ts-utils").Converter<import("./resources").ResourceIndex, unknown>;
96
+ /**
97
+ * `Converter` which validates an `unknown` value as a {@link ResourceTypeName | ResourceTypeName}.
98
+ * @public
99
+ */
100
+ export declare const resourceTypeName: import("@fgv/ts-utils").Converter<import("./resources").ResourceTypeName, unknown>;
101
+ /**
102
+ * `Converter` which validates an `unknown` value as a {@link ResourceTypeIndex | ResourceTypeIndex}.
103
+ * @public
104
+ */
105
+ export declare const resourceTypeIndex: import("@fgv/ts-utils").Converter<import("./resources").ResourceTypeIndex, unknown>;
106
+ /**
107
+ * `Converter` for a resource value merge method.
108
+ * @public
109
+ */
110
+ export declare const resourceValueMergeMethod: import("@fgv/ts-utils").Converter<import("./resources").ResourceValueMergeMethod, import("./resources").ResourceValueMergeMethod[]>;
111
+ //# sourceMappingURL=convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/packlets/common/convert.ts"],"names":[],"mappings":"AA6BA;;;GAGG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Erik Fortune
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in all
13
+ * copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ * SOFTWARE.
22
+ */
23
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ var desc = Object.getOwnPropertyDescriptor(m, k);
26
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
27
+ desc = { enumerable: true, get: function() { return m[k]; } };
28
+ }
29
+ Object.defineProperty(o, k2, desc);
30
+ }) : (function(o, m, k, k2) {
31
+ if (k2 === undefined) k2 = k;
32
+ o[k2] = m[k];
33
+ }));
34
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
35
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
36
+ }) : function(o, v) {
37
+ o["default"] = v;
38
+ });
39
+ var __importStar = (this && this.__importStar) || (function () {
40
+ var ownKeys = function(o) {
41
+ ownKeys = Object.getOwnPropertyNames || function (o) {
42
+ var ar = [];
43
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
44
+ return ar;
45
+ };
46
+ return ownKeys(o);
47
+ };
48
+ return function (mod) {
49
+ if (mod && mod.__esModule) return mod;
50
+ var result = {};
51
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
52
+ __setModuleDefault(result, mod);
53
+ return result;
54
+ };
55
+ })();
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.resourceValueMergeMethod = exports.resourceTypeIndex = exports.resourceTypeName = exports.resourceIndex = exports.resourceName = exports.resourceId = exports.decisionKey = exports.decisionIndex = exports.conditionSetHash = exports.conditionSetToken = exports.conditionSetKey = exports.conditionSetIndex = exports.conditionToken = exports.conditionKey = exports.conditionIndex = exports.conditionOperator = exports.conditionPriority = exports.qualifierMatchScore = exports.qualifierTypeIndex = exports.qualifierTypeName = exports.qualifierIndex = exports.qualifierName = void 0;
58
+ const ts_utils_1 = require("@fgv/ts-utils");
59
+ const Validate = __importStar(require("./validate"));
60
+ const conditions_1 = require("./conditions");
61
+ const resources_1 = require("./resources");
62
+ /* eslint-disable @rushstack/typedef-var */
63
+ /**
64
+ * `Converter` which validates an `unknown` value as a {@link QualifierName | QualifierName}.
65
+ * @public
66
+ */
67
+ exports.qualifierName = ts_utils_1.Converters.string.map(Validate.toQualifierName);
68
+ /**
69
+ * `Converter` which validates an `unknown` value as a {@link QualifierIndex | QualifierIndex}.
70
+ * @public
71
+ */
72
+ exports.qualifierIndex = ts_utils_1.Converters.number.map(Validate.toQualifierIndex);
73
+ /**
74
+ * `Converter` which validates an `unknown` value as a {@link QualifierTypeName | QualifierTypeName}.
75
+ * @public
76
+ */
77
+ exports.qualifierTypeName = ts_utils_1.Converters.string.map(Validate.toQualifierTypeName);
78
+ /**
79
+ * `Converter` which validates an `unknown` value as a {@link QualifierTypeIndex | QualifierTypeIndex}.
80
+ * @public
81
+ */
82
+ exports.qualifierTypeIndex = ts_utils_1.Converters.number.map(Validate.toQualifierTypeIndex);
83
+ /**
84
+ * `Converter` which validates an `unknown` value as a {@link QualifierConditionValue | QualifierConditionValue}.
85
+ * @public
86
+ */
87
+ exports.qualifierMatchScore = ts_utils_1.Converters.number.map(Validate.toQualifierMatchScore);
88
+ /**
89
+ * `Converter` which validates an `unknown` value as a {@link ConditionPriority | ConditionPriority}.
90
+ * @public
91
+ */
92
+ exports.conditionPriority = ts_utils_1.Converters.number.map(Validate.toConditionPriority);
93
+ /**
94
+ * `Converter` which validates an `unknown` value as a {@link ConditionOperator | ConditionOperator}.
95
+ * @public
96
+ */
97
+ exports.conditionOperator = ts_utils_1.Converters.enumeratedValue(conditions_1.allConditionOperators);
98
+ /**
99
+ * `Converter` which validates an `unknown` value as a {@link ConditionIndex | ConditionIndex}.
100
+ * @public
101
+ */
102
+ exports.conditionIndex = ts_utils_1.Converters.number.map(Validate.toConditionIndex);
103
+ /**
104
+ * `Converter` which validates an `unknown` value as a {@link ConditionKey | ConditionKey}.
105
+ * @public
106
+ */
107
+ exports.conditionKey = ts_utils_1.Converters.string.map(Validate.toConditionKey);
108
+ /**
109
+ * `Converter` which validates an `unknown` value as a {@link ConditionToken | ConditionToken}.
110
+ * @public
111
+ */
112
+ exports.conditionToken = ts_utils_1.Converters.string.map(Validate.toConditionToken);
113
+ /**
114
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetIndex | ConditionSetIndex}.
115
+ * @public
116
+ */
117
+ exports.conditionSetIndex = ts_utils_1.Converters.number.map(Validate.toConditionSetIndex);
118
+ /**
119
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetKey | ConditionSetKey}.
120
+ * @public
121
+ */
122
+ exports.conditionSetKey = ts_utils_1.Converters.string.map(Validate.toConditionSetKey);
123
+ /**
124
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetToken | ConditionSetToken}.
125
+ * @public
126
+ */
127
+ exports.conditionSetToken = ts_utils_1.Converters.string.map(Validate.toConditionSetToken);
128
+ /**
129
+ * `Converter` which validates an `unknown` value as a {@link ConditionSetHash | ConditionSetHash}.
130
+ * @public
131
+ */
132
+ exports.conditionSetHash = ts_utils_1.Converters.string.map(Validate.toConditionSetHash);
133
+ /**
134
+ * `Converter` which validates an `unknown` value as a {@link DecisionIndex | DecisionIndex}.
135
+ * @public
136
+ */
137
+ exports.decisionIndex = ts_utils_1.Converters.number.map(Validate.toDecisionIndex);
138
+ /**
139
+ * `Converter` which validates an `unknown` value as a {@link DecisionKey | DecisionKey}.
140
+ * @public
141
+ */
142
+ exports.decisionKey = ts_utils_1.Converters.string.map(Validate.toDecisionKey);
143
+ /**
144
+ * `Converter` which validates an `unknown` value as a {@link ResourceId | ResourceId}.
145
+ * @public
146
+ */
147
+ exports.resourceId = ts_utils_1.Converters.string.map(Validate.toResourceId);
148
+ /**
149
+ * `Converter` which validates an `unknown` value as a {@link ResourceName | ResourceName}.
150
+ * @public
151
+ */
152
+ exports.resourceName = ts_utils_1.Converters.string.map(Validate.toResourceName);
153
+ /**
154
+ * `Converter` which validates an `unknown` value as a {@link ResourceIndex | ResourceIndex}.
155
+ * @public
156
+ */
157
+ exports.resourceIndex = ts_utils_1.Converters.number.map(Validate.toResourceIndex);
158
+ /**
159
+ * `Converter` which validates an `unknown` value as a {@link ResourceTypeName | ResourceTypeName}.
160
+ * @public
161
+ */
162
+ exports.resourceTypeName = ts_utils_1.Converters.string.map(Validate.toResourceTypeName);
163
+ /**
164
+ * `Converter` which validates an `unknown` value as a {@link ResourceTypeIndex | ResourceTypeIndex}.
165
+ * @public
166
+ */
167
+ exports.resourceTypeIndex = ts_utils_1.Converters.number.map(Validate.toResourceTypeIndex);
168
+ /**
169
+ * `Converter` for a resource value merge method.
170
+ * @public
171
+ */
172
+ exports.resourceValueMergeMethod = ts_utils_1.Converters.enumeratedValue(resources_1.allResourceValueMergeMethods);
173
+ //# sourceMappingURL=convert.js.map
@@ -0,0 +1 @@
1
+ {"version":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,CAAC,mBAAmB,CAAC,CAAC;AAErF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,qBAAU,CAAC,eAAe,CAAC,wCAA4B,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Converters } from '@fgv/ts-utils';\nimport * as Validate from './validate';\nimport { allConditionOperators } from './conditions';\nimport { allResourceValueMergeMethods } from './resources';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierName | QualifierName}.\n * @public\n */\nexport const qualifierName = Converters.string.map(Validate.toQualifierName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierIndex | QualifierIndex}.\n * @public\n */\nexport const qualifierIndex = Converters.number.map(Validate.toQualifierIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierTypeName | QualifierTypeName}.\n * @public\n */\nexport const qualifierTypeName = Converters.string.map(Validate.toQualifierTypeName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierTypeIndex | QualifierTypeIndex}.\n * @public\n */\nexport const qualifierTypeIndex = Converters.number.map(Validate.toQualifierTypeIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierConditionValue | QualifierConditionValue}.\n * @public\n */\nexport const qualifierMatchScore = Converters.number.map(Validate.toQualifierMatchScore);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionPriority | ConditionPriority}.\n * @public\n */\nexport const conditionPriority = Converters.number.map(Validate.toConditionPriority);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionOperator | ConditionOperator}.\n * @public\n */\nexport const conditionOperator = Converters.enumeratedValue(allConditionOperators);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionIndex | ConditionIndex}.\n * @public\n */\nexport const conditionIndex = Converters.number.map(Validate.toConditionIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionKey | ConditionKey}.\n * @public\n */\nexport const conditionKey = Converters.string.map(Validate.toConditionKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionToken | ConditionToken}.\n * @public\n */\nexport const conditionToken = Converters.string.map(Validate.toConditionToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetIndex | ConditionSetIndex}.\n * @public\n */\nexport const conditionSetIndex = Converters.number.map(Validate.toConditionSetIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetKey | ConditionSetKey}.\n * @public\n */\nexport const conditionSetKey = Converters.string.map(Validate.toConditionSetKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetToken | ConditionSetToken}.\n * @public\n */\nexport const conditionSetToken = Converters.string.map(Validate.toConditionSetToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetHash | ConditionSetHash}.\n * @public\n */\nexport const conditionSetHash = Converters.string.map(Validate.toConditionSetHash);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link DecisionIndex | DecisionIndex}.\n * @public\n */\nexport const decisionIndex = Converters.number.map(Validate.toDecisionIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link DecisionKey | DecisionKey}.\n * @public\n */\nexport const decisionKey = Converters.string.map(Validate.toDecisionKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceId | ResourceId}.\n * @public\n */\nexport const resourceId = Converters.string.map(Validate.toResourceId);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceName | ResourceName}.\n * @public\n */\nexport const resourceName = Converters.string.map(Validate.toResourceName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceIndex | ResourceIndex}.\n * @public\n */\nexport const resourceIndex = Converters.number.map(Validate.toResourceIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceTypeName | ResourceTypeName}.\n * @public\n */\nexport const resourceTypeName = Converters.string.map(Validate.toResourceTypeName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceTypeIndex | ResourceTypeIndex}.\n * @public\n */\nexport const resourceTypeIndex = Converters.number.map(Validate.toResourceTypeIndex);\n\n/**\n * `Converter` for a resource value merge method.\n * @public\n */\nexport const resourceValueMergeMethod = Converters.enumeratedValue(allResourceValueMergeMethods);\n"]}