prismcast 1.10.3 → 1.11.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 (674) hide show
  1. package/dist/app.d.ts +1 -0
  2. package/dist/app.d.ts.map +1 -0
  3. package/dist/app.js +103 -50
  4. package/dist/app.js.map +1 -1
  5. package/dist/browser/blockedPage.d.ts +80 -0
  6. package/dist/browser/blockedPage.d.ts.map +1 -0
  7. package/dist/browser/blockedPage.js +209 -0
  8. package/dist/browser/blockedPage.js.map +1 -0
  9. package/dist/browser/browserSupervisor.d.ts +80 -0
  10. package/dist/browser/browserSupervisor.d.ts.map +1 -0
  11. package/dist/browser/browserSupervisor.js +186 -0
  12. package/dist/browser/browserSupervisor.js.map +1 -0
  13. package/dist/browser/cdp.d.ts +1 -0
  14. package/dist/browser/cdp.d.ts.map +1 -0
  15. package/dist/browser/cdp.js +6 -5
  16. package/dist/browser/cdp.js.map +1 -1
  17. package/dist/browser/channelSelection.d.ts +45 -14
  18. package/dist/browser/channelSelection.d.ts.map +1 -0
  19. package/dist/browser/channelSelection.js +81 -18
  20. package/dist/browser/channelSelection.js.map +1 -1
  21. package/dist/browser/consent.d.ts +152 -0
  22. package/dist/browser/consent.d.ts.map +1 -0
  23. package/dist/browser/consent.js +418 -0
  24. package/dist/browser/consent.js.map +1 -0
  25. package/dist/browser/display.d.ts +1 -0
  26. package/dist/browser/display.d.ts.map +1 -0
  27. package/dist/browser/hlsPlaylistObserver.d.ts +23 -6
  28. package/dist/browser/hlsPlaylistObserver.d.ts.map +1 -0
  29. package/dist/browser/hlsPlaylistObserver.js +27 -8
  30. package/dist/browser/hlsPlaylistObserver.js.map +1 -1
  31. package/dist/browser/index.d.ts +44 -27
  32. package/dist/browser/index.d.ts.map +1 -0
  33. package/dist/browser/index.js +427 -244
  34. package/dist/browser/index.js.map +1 -1
  35. package/dist/browser/launchGovernor.d.ts +89 -0
  36. package/dist/browser/launchGovernor.d.ts.map +1 -0
  37. package/dist/browser/launchGovernor.js +96 -0
  38. package/dist/browser/launchGovernor.js.map +1 -0
  39. package/dist/browser/login.d.ts +10 -2
  40. package/dist/browser/login.d.ts.map +1 -0
  41. package/dist/browser/login.js +36 -5
  42. package/dist/browser/login.js.map +1 -1
  43. package/dist/browser/manifestInterceptor.d.ts +88 -35
  44. package/dist/browser/manifestInterceptor.d.ts.map +1 -0
  45. package/dist/browser/manifestInterceptor.js +165 -77
  46. package/dist/browser/manifestInterceptor.js.map +1 -1
  47. package/dist/browser/pageStaleness.d.ts +30 -0
  48. package/dist/browser/pageStaleness.d.ts.map +1 -0
  49. package/dist/browser/pageStaleness.js +76 -0
  50. package/dist/browser/pageStaleness.js.map +1 -0
  51. package/dist/browser/precaching.d.ts +95 -3
  52. package/dist/browser/precaching.d.ts.map +1 -0
  53. package/dist/browser/precaching.js +499 -65
  54. package/dist/browser/precaching.js.map +1 -1
  55. package/dist/browser/tabNetworkObserver.d.ts +2 -1
  56. package/dist/browser/tabNetworkObserver.d.ts.map +1 -0
  57. package/dist/browser/tabNetworkObserver.js +7 -3
  58. package/dist/browser/tabNetworkObserver.js.map +1 -1
  59. package/dist/browser/tuning/cache.d.ts +61 -0
  60. package/dist/browser/tuning/cache.d.ts.map +1 -0
  61. package/dist/browser/tuning/cache.js +62 -0
  62. package/dist/browser/tuning/cache.js.map +1 -0
  63. package/dist/browser/tuning/comcastPolymer.d.ts +3 -2
  64. package/dist/browser/tuning/comcastPolymer.d.ts.map +1 -0
  65. package/dist/browser/tuning/comcastPolymer.js +79 -102
  66. package/dist/browser/tuning/comcastPolymer.js.map +1 -1
  67. package/dist/browser/tuning/cox.d.ts +1 -0
  68. package/dist/browser/tuning/cox.d.ts.map +1 -0
  69. package/dist/browser/tuning/directv.d.ts +1 -0
  70. package/dist/browser/tuning/directv.d.ts.map +1 -0
  71. package/dist/browser/tuning/directv.js +52 -46
  72. package/dist/browser/tuning/directv.js.map +1 -1
  73. package/dist/browser/tuning/fox.d.ts +1 -0
  74. package/dist/browser/tuning/fox.d.ts.map +1 -0
  75. package/dist/browser/tuning/fox.js +13 -12
  76. package/dist/browser/tuning/fox.js.map +1 -1
  77. package/dist/browser/tuning/gridSearch.d.ts +68 -0
  78. package/dist/browser/tuning/gridSearch.d.ts.map +1 -0
  79. package/dist/browser/tuning/gridSearch.js +85 -0
  80. package/dist/browser/tuning/gridSearch.js.map +1 -0
  81. package/dist/browser/tuning/hbo.d.ts +1 -0
  82. package/dist/browser/tuning/hbo.d.ts.map +1 -0
  83. package/dist/browser/tuning/hbo.js +73 -45
  84. package/dist/browser/tuning/hbo.js.map +1 -1
  85. package/dist/browser/tuning/hulu.d.ts +1 -0
  86. package/dist/browser/tuning/hulu.d.ts.map +1 -0
  87. package/dist/browser/tuning/hulu.js +128 -173
  88. package/dist/browser/tuning/hulu.js.map +1 -1
  89. package/dist/browser/tuning/shared.d.ts +75 -5
  90. package/dist/browser/tuning/shared.d.ts.map +1 -0
  91. package/dist/browser/tuning/shared.js +216 -6
  92. package/dist/browser/tuning/shared.js.map +1 -1
  93. package/dist/browser/tuning/sling.d.ts +1 -0
  94. package/dist/browser/tuning/sling.d.ts.map +1 -0
  95. package/dist/browser/tuning/sling.js +105 -126
  96. package/dist/browser/tuning/sling.js.map +1 -1
  97. package/dist/browser/tuning/spectrum.d.ts +1 -0
  98. package/dist/browser/tuning/spectrum.d.ts.map +1 -0
  99. package/dist/browser/tuning/spectrum.js +80 -125
  100. package/dist/browser/tuning/spectrum.js.map +1 -1
  101. package/dist/browser/tuning/thumbnailRow.d.ts +1 -0
  102. package/dist/browser/tuning/thumbnailRow.d.ts.map +1 -0
  103. package/dist/browser/tuning/thumbnailRow.js +8 -2
  104. package/dist/browser/tuning/thumbnailRow.js.map +1 -1
  105. package/dist/browser/tuning/tileClick.d.ts +1 -0
  106. package/dist/browser/tuning/tileClick.d.ts.map +1 -0
  107. package/dist/browser/tuning/tileClick.js +3 -2
  108. package/dist/browser/tuning/tileClick.js.map +1 -1
  109. package/dist/browser/tuning/xfinity.d.ts +1 -0
  110. package/dist/browser/tuning/xfinity.d.ts.map +1 -0
  111. package/dist/browser/tuning/youtubeTv.d.ts +1 -0
  112. package/dist/browser/tuning/youtubeTv.d.ts.map +1 -0
  113. package/dist/browser/tuning/youtubeTv.js +74 -127
  114. package/dist/browser/tuning/youtubeTv.js.map +1 -1
  115. package/dist/browser/video.d.ts +54 -14
  116. package/dist/browser/video.d.ts.map +1 -0
  117. package/dist/browser/video.js +296 -138
  118. package/dist/browser/video.js.map +1 -1
  119. package/dist/channels/index.d.ts +1 -0
  120. package/dist/channels/index.d.ts.map +1 -0
  121. package/dist/channels/index.js +12 -9
  122. package/dist/channels/index.js.map +1 -1
  123. package/dist/config/channelForm.d.ts +15 -1
  124. package/dist/config/channelForm.d.ts.map +1 -0
  125. package/dist/config/channelForm.js +28 -12
  126. package/dist/config/channelForm.js.map +1 -1
  127. package/dist/config/consistencyProbe.d.ts +1 -0
  128. package/dist/config/consistencyProbe.d.ts.map +1 -0
  129. package/dist/config/consistencyProbe.js +15 -11
  130. package/dist/config/consistencyProbe.js.map +1 -1
  131. package/dist/config/health.d.ts +41 -8
  132. package/dist/config/health.d.ts.map +1 -0
  133. package/dist/config/health.js +189 -38
  134. package/dist/config/health.js.map +1 -1
  135. package/dist/config/index.d.ts +55 -3
  136. package/dist/config/index.d.ts.map +1 -0
  137. package/dist/config/index.js +320 -69
  138. package/dist/config/index.js.map +1 -1
  139. package/dist/config/paths.d.ts +7 -1
  140. package/dist/config/paths.d.ts.map +1 -0
  141. package/dist/config/paths.js +8 -1
  142. package/dist/config/paths.js.map +1 -1
  143. package/dist/config/persistence.context.d.ts +1 -0
  144. package/dist/config/persistence.context.d.ts.map +1 -0
  145. package/dist/config/persistence.d.ts +13 -10
  146. package/dist/config/persistence.d.ts.map +1 -0
  147. package/dist/config/persistence.js +40 -21
  148. package/dist/config/persistence.js.map +1 -1
  149. package/dist/config/presets.d.ts +1 -0
  150. package/dist/config/presets.d.ts.map +1 -0
  151. package/dist/config/profiles.d.ts +21 -14
  152. package/dist/config/profiles.d.ts.map +1 -0
  153. package/dist/config/profiles.js +77 -43
  154. package/dist/config/profiles.js.map +1 -1
  155. package/dist/config/providerLineups.d.ts +47 -0
  156. package/dist/config/providerLineups.d.ts.map +1 -0
  157. package/dist/config/providerLineups.js +137 -0
  158. package/dist/config/providerLineups.js.map +1 -0
  159. package/dist/config/reactivity.d.ts +84 -0
  160. package/dist/config/reactivity.d.ts.map +1 -0
  161. package/dist/config/reactivity.js +226 -0
  162. package/dist/config/reactivity.js.map +1 -0
  163. package/dist/config/servicePacks.d.ts +18 -2
  164. package/dist/config/servicePacks.d.ts.map +1 -0
  165. package/dist/config/servicePacks.js +53 -11
  166. package/dist/config/servicePacks.js.map +1 -1
  167. package/dist/config/services.d.ts +16 -10
  168. package/dist/config/services.d.ts.map +1 -0
  169. package/dist/config/services.js +27 -16
  170. package/dist/config/services.js.map +1 -1
  171. package/dist/config/sites.d.ts +4 -2
  172. package/dist/config/sites.d.ts.map +1 -0
  173. package/dist/config/sites.js +9 -5
  174. package/dist/config/sites.js.map +1 -1
  175. package/dist/config/userChannels.d.ts +23 -18
  176. package/dist/config/userChannels.d.ts.map +1 -0
  177. package/dist/config/userChannels.js +45 -34
  178. package/dist/config/userChannels.js.map +1 -1
  179. package/dist/config/userConfig.d.ts +14 -9
  180. package/dist/config/userConfig.d.ts.map +1 -0
  181. package/dist/config/userConfig.js +87 -25
  182. package/dist/config/userConfig.js.map +1 -1
  183. package/dist/config/userProfiles.d.ts +8 -4
  184. package/dist/config/userProfiles.d.ts.map +1 -0
  185. package/dist/config/userProfiles.js +48 -23
  186. package/dist/config/userProfiles.js.map +1 -1
  187. package/dist/hdhr/channelMap.d.ts +1 -0
  188. package/dist/hdhr/channelMap.d.ts.map +1 -0
  189. package/dist/hdhr/deviceId.d.ts +1 -0
  190. package/dist/hdhr/deviceId.d.ts.map +1 -0
  191. package/dist/hdhr/discover.d.ts +1 -0
  192. package/dist/hdhr/discover.d.ts.map +1 -0
  193. package/dist/hdhr/discover.js +48 -47
  194. package/dist/hdhr/discover.js.map +1 -1
  195. package/dist/hdhr/getHandlers.d.ts +29 -0
  196. package/dist/hdhr/getHandlers.d.ts.map +1 -0
  197. package/dist/hdhr/getHandlers.js +196 -0
  198. package/dist/hdhr/getHandlers.js.map +1 -0
  199. package/dist/hdhr/identity.d.ts +36 -0
  200. package/dist/hdhr/identity.d.ts.map +1 -0
  201. package/dist/hdhr/identity.js +51 -0
  202. package/dist/hdhr/identity.js.map +1 -0
  203. package/dist/hdhr/index.d.ts +22 -4
  204. package/dist/hdhr/index.d.ts.map +1 -0
  205. package/dist/hdhr/index.js +229 -54
  206. package/dist/hdhr/index.js.map +1 -1
  207. package/dist/hdhr/protocol.d.ts +75 -0
  208. package/dist/hdhr/protocol.d.ts.map +1 -0
  209. package/dist/hdhr/protocol.js +264 -0
  210. package/dist/hdhr/protocol.js.map +1 -0
  211. package/dist/hdhr/tunerState.d.ts +24 -0
  212. package/dist/hdhr/tunerState.d.ts.map +1 -0
  213. package/dist/hdhr/tunerState.js +67 -0
  214. package/dist/hdhr/tunerState.js.map +1 -0
  215. package/dist/hdhr/udp.d.ts +43 -0
  216. package/dist/hdhr/udp.d.ts.map +1 -0
  217. package/dist/hdhr/udp.js +277 -0
  218. package/dist/hdhr/udp.js.map +1 -0
  219. package/dist/identity.d.ts +1 -0
  220. package/dist/identity.d.ts.map +1 -0
  221. package/dist/identity.js +13 -11
  222. package/dist/identity.js.map +1 -1
  223. package/dist/index.d.ts +1 -0
  224. package/dist/index.d.ts.map +1 -0
  225. package/dist/index.js +4 -3
  226. package/dist/index.js.map +1 -1
  227. package/dist/native/codecInference.d.ts +1 -0
  228. package/dist/native/codecInference.d.ts.map +1 -0
  229. package/dist/native/codecInference.js +50 -5
  230. package/dist/native/codecInference.js.map +1 -1
  231. package/dist/native/decrypt.d.ts +6 -2
  232. package/dist/native/decrypt.d.ts.map +1 -0
  233. package/dist/native/decrypt.js +15 -8
  234. package/dist/native/decrypt.js.map +1 -1
  235. package/dist/native/index.d.ts +39 -16
  236. package/dist/native/index.d.ts.map +1 -0
  237. package/dist/native/index.js +273 -103
  238. package/dist/native/index.js.map +1 -1
  239. package/dist/native/probe.d.ts +114 -18
  240. package/dist/native/probe.d.ts.map +1 -0
  241. package/dist/native/probe.js +452 -115
  242. package/dist/native/probe.js.map +1 -1
  243. package/dist/native/proxy.d.ts +56 -1
  244. package/dist/native/proxy.d.ts.map +1 -0
  245. package/dist/native/proxy.js +604 -161
  246. package/dist/native/proxy.js.map +1 -1
  247. package/dist/native/tokenExpiry.d.ts +1 -0
  248. package/dist/native/tokenExpiry.d.ts.map +1 -0
  249. package/dist/native/tokenExpiry.js +1 -1
  250. package/dist/routes/assets.d.ts +1 -0
  251. package/dist/routes/assets.d.ts.map +1 -0
  252. package/dist/routes/assets.js +4 -2
  253. package/dist/routes/assets.js.map +1 -1
  254. package/dist/routes/auth.d.ts +1 -0
  255. package/dist/routes/auth.d.ts.map +1 -0
  256. package/dist/routes/auth.js +0 -1
  257. package/dist/routes/auth.js.map +1 -1
  258. package/dist/routes/cdp.d.ts +5 -5
  259. package/dist/routes/cdp.d.ts.map +1 -0
  260. package/dist/routes/cdp.js +59 -20
  261. package/dist/routes/cdp.js.map +1 -1
  262. package/dist/routes/channels.d.ts +1 -0
  263. package/dist/routes/channels.d.ts.map +1 -0
  264. package/dist/routes/channels.js +2 -1
  265. package/dist/routes/channels.js.map +1 -1
  266. package/dist/routes/clientActions.d.ts +4 -3
  267. package/dist/routes/clientActions.d.ts.map +1 -0
  268. package/dist/routes/components.d.ts +1 -0
  269. package/dist/routes/components.d.ts.map +1 -0
  270. package/dist/routes/components.js +2 -2
  271. package/dist/routes/components.js.map +1 -1
  272. package/dist/routes/config/channels/endpoints/browse.d.ts +1 -0
  273. package/dist/routes/config/channels/endpoints/browse.d.ts.map +1 -0
  274. package/dist/routes/config/channels/endpoints/browse.js +23 -10
  275. package/dist/routes/config/channels/endpoints/browse.js.map +1 -1
  276. package/dist/routes/config/channels/endpoints/bulk.d.ts +1 -0
  277. package/dist/routes/config/channels/endpoints/bulk.d.ts.map +1 -0
  278. package/dist/routes/config/channels/endpoints/bulk.js +5 -3
  279. package/dist/routes/config/channels/endpoints/bulk.js.map +1 -1
  280. package/dist/routes/config/channels/endpoints/crud.d.ts +1 -0
  281. package/dist/routes/config/channels/endpoints/crud.d.ts.map +1 -0
  282. package/dist/routes/config/channels/endpoints/crud.js +49 -22
  283. package/dist/routes/config/channels/endpoints/crud.js.map +1 -1
  284. package/dist/routes/config/channels/endpoints/importExport.d.ts +1 -0
  285. package/dist/routes/config/channels/endpoints/importExport.d.ts.map +1 -0
  286. package/dist/routes/config/channels/endpoints/importExport.js +6 -3
  287. package/dist/routes/config/channels/endpoints/importExport.js.map +1 -1
  288. package/dist/routes/config/channels/endpoints/predefined.d.ts +1 -0
  289. package/dist/routes/config/channels/endpoints/predefined.d.ts.map +1 -0
  290. package/dist/routes/config/channels/endpoints/prefs.d.ts +1 -0
  291. package/dist/routes/config/channels/endpoints/prefs.d.ts.map +1 -0
  292. package/dist/routes/config/channels/endpoints/prefs.js +2 -1
  293. package/dist/routes/config/channels/endpoints/prefs.js.map +1 -1
  294. package/dist/routes/config/channels/endpoints/service.d.ts +2 -1
  295. package/dist/routes/config/channels/endpoints/service.d.ts.map +1 -0
  296. package/dist/routes/config/channels/endpoints/service.js +3 -1
  297. package/dist/routes/config/channels/endpoints/service.js.map +1 -1
  298. package/dist/routes/config/channels/endpoints/tags.d.ts +1 -0
  299. package/dist/routes/config/channels/endpoints/tags.d.ts.map +1 -0
  300. package/dist/routes/config/channels/endpoints/tags.js +13 -7
  301. package/dist/routes/config/channels/endpoints/tags.js.map +1 -1
  302. package/dist/routes/config/channels/healthBridge.d.ts +1 -0
  303. package/dist/routes/config/channels/healthBridge.d.ts.map +1 -0
  304. package/dist/routes/config/channels/healthBridge.js +2 -2
  305. package/dist/routes/config/channels/http/handler.d.ts +1 -0
  306. package/dist/routes/config/channels/http/handler.d.ts.map +1 -0
  307. package/dist/routes/config/channels/http/playlistHint.d.ts +2 -1
  308. package/dist/routes/config/channels/http/playlistHint.d.ts.map +1 -0
  309. package/dist/routes/config/channels/http/playlistHint.js +16 -2
  310. package/dist/routes/config/channels/http/playlistHint.js.map +1 -1
  311. package/dist/routes/config/channels/http/serviceWarning.d.ts +4 -2
  312. package/dist/routes/config/channels/http/serviceWarning.d.ts.map +1 -0
  313. package/dist/routes/config/channels/http/serviceWarning.js +3 -2
  314. package/dist/routes/config/channels/http/serviceWarning.js.map +1 -1
  315. package/dist/routes/config/channels/index.d.ts +1 -0
  316. package/dist/routes/config/channels/index.d.ts.map +1 -0
  317. package/dist/routes/config/channels/setup.d.ts +1 -0
  318. package/dist/routes/config/channels/setup.d.ts.map +1 -0
  319. package/dist/routes/config/channels/table.d.ts +3 -3
  320. package/dist/routes/config/channels/table.d.ts.map +1 -0
  321. package/dist/routes/config/channels/table.js +55 -27
  322. package/dist/routes/config/channels/table.js.map +1 -1
  323. package/dist/routes/config/http/envelope.d.ts +1 -0
  324. package/dist/routes/config/http/envelope.d.ts.map +1 -0
  325. package/dist/routes/config/index.d.ts +35 -3
  326. package/dist/routes/config/index.d.ts.map +1 -0
  327. package/dist/routes/config/index.js +51 -2
  328. package/dist/routes/config/index.js.map +1 -1
  329. package/dist/routes/config/services.d.ts +5 -4
  330. package/dist/routes/config/services.d.ts.map +1 -0
  331. package/dist/routes/config/services.js +35 -24
  332. package/dist/routes/config/services.js.map +1 -1
  333. package/dist/routes/config/settings.d.ts +1 -0
  334. package/dist/routes/config/settings.d.ts.map +1 -0
  335. package/dist/routes/config/settings.js +89 -43
  336. package/dist/routes/config/settings.js.map +1 -1
  337. package/dist/routes/debug.d.ts +1 -0
  338. package/dist/routes/debug.d.ts.map +1 -0
  339. package/dist/routes/debug.js +2 -2
  340. package/dist/routes/debug.js.map +1 -1
  341. package/dist/routes/health.d.ts +39 -1
  342. package/dist/routes/health.d.ts.map +1 -0
  343. package/dist/routes/health.js +33 -27
  344. package/dist/routes/health.js.map +1 -1
  345. package/dist/routes/hls.d.ts +1 -0
  346. package/dist/routes/hls.d.ts.map +1 -0
  347. package/dist/routes/icons.d.ts +1 -0
  348. package/dist/routes/icons.d.ts.map +1 -0
  349. package/dist/routes/icons.js +1 -1
  350. package/dist/routes/index.d.ts +1 -0
  351. package/dist/routes/index.d.ts.map +1 -0
  352. package/dist/routes/logs.d.ts +1 -0
  353. package/dist/routes/logs.d.ts.map +1 -0
  354. package/dist/routes/logs.js +13 -3
  355. package/dist/routes/logs.js.map +1 -1
  356. package/dist/routes/mpegts.d.ts +1 -0
  357. package/dist/routes/mpegts.d.ts.map +1 -0
  358. package/dist/routes/play.d.ts +1 -0
  359. package/dist/routes/play.d.ts.map +1 -0
  360. package/dist/routes/playlist.d.ts +1 -0
  361. package/dist/routes/playlist.d.ts.map +1 -0
  362. package/dist/routes/playlist.js +7 -2
  363. package/dist/routes/playlist.js.map +1 -1
  364. package/dist/routes/root/content.d.ts +8 -5
  365. package/dist/routes/root/content.d.ts.map +1 -0
  366. package/dist/routes/root/content.js +11 -12
  367. package/dist/routes/root/content.js.map +1 -1
  368. package/dist/routes/root/index.d.ts +2 -1
  369. package/dist/routes/root/index.d.ts.map +1 -0
  370. package/dist/routes/root/index.js +10 -8
  371. package/dist/routes/root/index.js.map +1 -1
  372. package/dist/routes/root/scripts/channels.d.ts +6 -0
  373. package/dist/routes/root/scripts/channels.d.ts.map +1 -0
  374. package/dist/routes/root/scripts/channels.js +147 -97
  375. package/dist/routes/root/scripts/channels.js.map +1 -1
  376. package/dist/routes/root/scripts/clientEscape.d.ts +22 -0
  377. package/dist/routes/root/scripts/clientEscape.d.ts.map +1 -0
  378. package/dist/routes/root/scripts/clientEscape.js +41 -0
  379. package/dist/routes/root/scripts/clientEscape.js.map +1 -0
  380. package/dist/routes/root/scripts/clientUrl.d.ts +23 -0
  381. package/dist/routes/root/scripts/clientUrl.d.ts.map +1 -0
  382. package/dist/routes/root/scripts/clientUrl.js +44 -0
  383. package/dist/routes/root/scripts/clientUrl.js.map +1 -0
  384. package/dist/routes/root/scripts/config.d.ts +6 -0
  385. package/dist/routes/root/scripts/config.d.ts.map +1 -0
  386. package/dist/routes/root/scripts/config.js +39 -22
  387. package/dist/routes/root/scripts/config.js.map +1 -1
  388. package/dist/routes/root/scripts/index.d.ts +1 -0
  389. package/dist/routes/root/scripts/index.d.ts.map +1 -0
  390. package/dist/routes/root/scripts/shared.d.ts +1 -0
  391. package/dist/routes/root/scripts/shared.d.ts.map +1 -0
  392. package/dist/routes/root/scripts/shared.js +52 -26
  393. package/dist/routes/root/scripts/shared.js.map +1 -1
  394. package/dist/routes/root/scripts/status.d.ts +1 -0
  395. package/dist/routes/root/scripts/status.d.ts.map +1 -0
  396. package/dist/routes/root/scripts/status.handlers.d.ts +18 -6
  397. package/dist/routes/root/scripts/status.handlers.d.ts.map +1 -0
  398. package/dist/routes/root/scripts/status.handlers.js +38 -32
  399. package/dist/routes/root/scripts/status.handlers.js.map +1 -1
  400. package/dist/routes/root/scripts/status.js +15 -7
  401. package/dist/routes/root/scripts/status.js.map +1 -1
  402. package/dist/routes/root/styles.d.ts +1 -0
  403. package/dist/routes/root/styles.d.ts.map +1 -0
  404. package/dist/routes/root/styles.js +7 -4
  405. package/dist/routes/root/styles.js.map +1 -1
  406. package/dist/routes/services.d.ts +13 -1
  407. package/dist/routes/services.d.ts.map +1 -0
  408. package/dist/routes/services.js +81 -68
  409. package/dist/routes/services.js.map +1 -1
  410. package/dist/routes/sse.d.ts +1 -0
  411. package/dist/routes/sse.d.ts.map +1 -0
  412. package/dist/routes/sse.js +1 -1
  413. package/dist/routes/sse.js.map +1 -1
  414. package/dist/routes/streams.d.ts +2 -1
  415. package/dist/routes/streams.d.ts.map +1 -0
  416. package/dist/routes/streams.js +1 -1
  417. package/dist/routes/theme.d.ts +3 -2
  418. package/dist/routes/theme.d.ts.map +1 -0
  419. package/dist/routes/theme.js +6 -5
  420. package/dist/routes/theme.js.map +1 -1
  421. package/dist/routes/ui.d.ts +3 -1
  422. package/dist/routes/ui.d.ts.map +1 -0
  423. package/dist/routes/ui.js +16 -4
  424. package/dist/routes/ui.js.map +1 -1
  425. package/dist/routes/upgrade.d.ts +1 -0
  426. package/dist/routes/upgrade.d.ts.map +1 -0
  427. package/dist/routes/upgrade.js +6 -2
  428. package/dist/routes/upgrade.js.map +1 -1
  429. package/dist/service/commands.context.d.ts +1 -0
  430. package/dist/service/commands.context.d.ts.map +1 -0
  431. package/dist/service/commands.context.js +3 -2
  432. package/dist/service/commands.context.js.map +1 -1
  433. package/dist/service/commands.d.ts +1 -0
  434. package/dist/service/commands.d.ts.map +1 -0
  435. package/dist/service/commands.js +10 -13
  436. package/dist/service/commands.js.map +1 -1
  437. package/dist/service/generators.context.d.ts +1 -0
  438. package/dist/service/generators.context.d.ts.map +1 -0
  439. package/dist/service/generators.d.ts +3 -2
  440. package/dist/service/generators.d.ts.map +1 -0
  441. package/dist/service/generators.js +108 -20
  442. package/dist/service/generators.js.map +1 -1
  443. package/dist/service/index.d.ts +1 -0
  444. package/dist/service/index.d.ts.map +1 -0
  445. package/dist/streaming/captureLock.d.ts +44 -0
  446. package/dist/streaming/captureLock.d.ts.map +1 -0
  447. package/dist/streaming/captureLock.js +95 -0
  448. package/dist/streaming/captureLock.js.map +1 -0
  449. package/dist/streaming/captureSession.d.ts +31 -0
  450. package/dist/streaming/captureSession.d.ts.map +1 -0
  451. package/dist/streaming/captureSession.js +54 -0
  452. package/dist/streaming/captureSession.js.map +1 -0
  453. package/dist/streaming/clients.d.ts +1 -0
  454. package/dist/streaming/clients.d.ts.map +1 -0
  455. package/dist/streaming/codec.d.ts +1 -0
  456. package/dist/streaming/codec.d.ts.map +1 -0
  457. package/dist/streaming/fmp4Segmenter.d.ts +29 -2
  458. package/dist/streaming/fmp4Segmenter.d.ts.map +1 -0
  459. package/dist/streaming/fmp4Segmenter.js +79 -26
  460. package/dist/streaming/fmp4Segmenter.js.map +1 -1
  461. package/dist/streaming/hls.d.ts +18 -7
  462. package/dist/streaming/hls.d.ts.map +1 -0
  463. package/dist/streaming/hls.js +219 -115
  464. package/dist/streaming/hls.js.map +1 -1
  465. package/dist/streaming/hlsResume.d.ts +1 -0
  466. package/dist/streaming/hlsResume.d.ts.map +1 -0
  467. package/dist/streaming/hlsResume.js +1 -1
  468. package/dist/streaming/hlsResume.js.map +1 -1
  469. package/dist/streaming/hlsSegments.d.ts +58 -1
  470. package/dist/streaming/hlsSegments.d.ts.map +1 -0
  471. package/dist/streaming/hlsSegments.js +147 -17
  472. package/dist/streaming/hlsSegments.js.map +1 -1
  473. package/dist/streaming/lifecycle.d.ts +4 -1
  474. package/dist/streaming/lifecycle.d.ts.map +1 -0
  475. package/dist/streaming/lifecycle.js +65 -85
  476. package/dist/streaming/lifecycle.js.map +1 -1
  477. package/dist/streaming/monitor.d.ts +6 -4
  478. package/dist/streaming/monitor.d.ts.map +1 -0
  479. package/dist/streaming/monitor.js +343 -145
  480. package/dist/streaming/monitor.js.map +1 -1
  481. package/dist/streaming/mp4Parser.d.ts +5 -4
  482. package/dist/streaming/mp4Parser.d.ts.map +1 -0
  483. package/dist/streaming/mp4Parser.js +36 -13
  484. package/dist/streaming/mp4Parser.js.map +1 -1
  485. package/dist/streaming/mpegts.d.ts +16 -0
  486. package/dist/streaming/mpegts.d.ts.map +1 -0
  487. package/dist/streaming/mpegts.js +61 -17
  488. package/dist/streaming/mpegts.js.map +1 -1
  489. package/dist/streaming/playlistBuilder.d.ts +1 -0
  490. package/dist/streaming/playlistBuilder.d.ts.map +1 -0
  491. package/dist/streaming/preroll.d.ts +31 -4
  492. package/dist/streaming/preroll.d.ts.map +1 -0
  493. package/dist/streaming/preroll.js +69 -27
  494. package/dist/streaming/preroll.js.map +1 -1
  495. package/dist/streaming/pretune.d.ts +26 -1
  496. package/dist/streaming/pretune.d.ts.map +1 -0
  497. package/dist/streaming/pretune.js +22 -24
  498. package/dist/streaming/pretune.js.map +1 -1
  499. package/dist/streaming/pretuneTimers.d.ts +24 -0
  500. package/dist/streaming/pretuneTimers.d.ts.map +1 -0
  501. package/dist/streaming/pretuneTimers.js +56 -0
  502. package/dist/streaming/pretuneTimers.js.map +1 -0
  503. package/dist/streaming/recovery.d.ts +139 -5
  504. package/dist/streaming/recovery.d.ts.map +1 -0
  505. package/dist/streaming/recovery.js +160 -16
  506. package/dist/streaming/recovery.js.map +1 -1
  507. package/dist/streaming/registry.d.ts +27 -9
  508. package/dist/streaming/registry.d.ts.map +1 -0
  509. package/dist/streaming/registry.js +21 -3
  510. package/dist/streaming/registry.js.map +1 -1
  511. package/dist/streaming/setup.d.ts +157 -29
  512. package/dist/streaming/setup.d.ts.map +1 -0
  513. package/dist/streaming/setup.js +1034 -458
  514. package/dist/streaming/setup.js.map +1 -1
  515. package/dist/streaming/showInfo.d.ts +21 -1
  516. package/dist/streaming/showInfo.d.ts.map +1 -0
  517. package/dist/streaming/showInfo.js +31 -16
  518. package/dist/streaming/showInfo.js.map +1 -1
  519. package/dist/streaming/statusEmitter.d.ts +5 -2
  520. package/dist/streaming/statusEmitter.d.ts.map +1 -0
  521. package/dist/streaming/statusEmitter.js +5 -3
  522. package/dist/streaming/statusEmitter.js.map +1 -1
  523. package/dist/types/channels.d.ts +15 -12
  524. package/dist/types/channels.d.ts.map +1 -0
  525. package/dist/types/channels.js +4 -2
  526. package/dist/types/channels.js.map +1 -1
  527. package/dist/types/config.d.ts +16 -5
  528. package/dist/types/config.d.ts.map +1 -0
  529. package/dist/types/index.d.ts +3 -2
  530. package/dist/types/index.d.ts.map +1 -0
  531. package/dist/types/profiles.d.ts +4 -2
  532. package/dist/types/profiles.d.ts.map +1 -0
  533. package/dist/types/selection.d.ts +31 -3
  534. package/dist/types/selection.d.ts.map +1 -0
  535. package/dist/types/selection.js +4 -2
  536. package/dist/types/selection.js.map +1 -1
  537. package/dist/types/shared.d.ts +1 -0
  538. package/dist/types/shared.d.ts.map +1 -0
  539. package/dist/types/streaming.d.ts +8 -0
  540. package/dist/types/streaming.d.ts.map +1 -0
  541. package/dist/upgrade/commands.context.d.ts +1 -0
  542. package/dist/upgrade/commands.context.d.ts.map +1 -0
  543. package/dist/upgrade/commands.d.ts +1 -0
  544. package/dist/upgrade/commands.d.ts.map +1 -0
  545. package/dist/upgrade/commands.js +1 -1
  546. package/dist/upgrade/commands.js.map +1 -1
  547. package/dist/upgrade/detection.context.d.ts +1 -0
  548. package/dist/upgrade/detection.context.d.ts.map +1 -0
  549. package/dist/upgrade/detection.context.js +2 -0
  550. package/dist/upgrade/detection.context.js.map +1 -1
  551. package/dist/upgrade/detection.d.ts +7 -6
  552. package/dist/upgrade/detection.d.ts.map +1 -0
  553. package/dist/upgrade/detection.js +4 -4
  554. package/dist/upgrade/index.d.ts +1 -0
  555. package/dist/upgrade/index.d.ts.map +1 -0
  556. package/dist/upgrade/lifecycle.context.d.ts +1 -0
  557. package/dist/upgrade/lifecycle.context.d.ts.map +1 -0
  558. package/dist/upgrade/lifecycle.d.ts +7 -7
  559. package/dist/upgrade/lifecycle.d.ts.map +1 -0
  560. package/dist/upgrade/lifecycle.js +9 -10
  561. package/dist/upgrade/lifecycle.js.map +1 -1
  562. package/dist/upgrade/pathHandle.d.ts +5 -3
  563. package/dist/upgrade/pathHandle.d.ts.map +1 -0
  564. package/dist/upgrade/pathHandle.js +3 -2
  565. package/dist/upgrade/pathHandle.js.map +1 -1
  566. package/dist/utils/bootSession.context.d.ts +1 -0
  567. package/dist/utils/bootSession.context.d.ts.map +1 -0
  568. package/dist/utils/bootSession.context.js +6 -5
  569. package/dist/utils/bootSession.context.js.map +1 -1
  570. package/dist/utils/bootSession.d.ts +1 -0
  571. package/dist/utils/bootSession.d.ts.map +1 -0
  572. package/dist/utils/bootSession.js.map +1 -1
  573. package/dist/utils/chromeFetch.d.ts +1 -0
  574. package/dist/utils/chromeFetch.d.ts.map +1 -0
  575. package/dist/utils/cliOutput.d.ts +1 -0
  576. package/dist/utils/cliOutput.d.ts.map +1 -0
  577. package/dist/utils/clock.d.ts +5 -4
  578. package/dist/utils/clock.d.ts.map +1 -0
  579. package/dist/utils/clock.js +19 -16
  580. package/dist/utils/clock.js.map +1 -1
  581. package/dist/utils/debugFilter.d.ts +9 -1
  582. package/dist/utils/debugFilter.d.ts.map +1 -0
  583. package/dist/utils/debugFilter.js +60 -33
  584. package/dist/utils/debugFilter.js.map +1 -1
  585. package/dist/utils/delay.d.ts +48 -15
  586. package/dist/utils/delay.d.ts.map +1 -0
  587. package/dist/utils/delay.js +73 -20
  588. package/dist/utils/delay.js.map +1 -1
  589. package/dist/utils/errors.d.ts +32 -0
  590. package/dist/utils/errors.d.ts.map +1 -0
  591. package/dist/utils/errors.js +45 -4
  592. package/dist/utils/errors.js.map +1 -1
  593. package/dist/utils/evaluate.d.ts +1 -0
  594. package/dist/utils/evaluate.d.ts.map +1 -0
  595. package/dist/utils/evaluate.js +29 -23
  596. package/dist/utils/evaluate.js.map +1 -1
  597. package/dist/utils/ffmpeg.context.d.ts +1 -0
  598. package/dist/utils/ffmpeg.context.d.ts.map +1 -0
  599. package/dist/utils/ffmpeg.context.js.map +1 -1
  600. package/dist/utils/ffmpeg.d.ts +29 -7
  601. package/dist/utils/ffmpeg.d.ts.map +1 -0
  602. package/dist/utils/ffmpeg.js +31 -13
  603. package/dist/utils/ffmpeg.js.map +1 -1
  604. package/dist/utils/fileLogger.d.ts +3 -1
  605. package/dist/utils/fileLogger.d.ts.map +1 -0
  606. package/dist/utils/fileLogger.js +64 -29
  607. package/dist/utils/fileLogger.js.map +1 -1
  608. package/dist/utils/format.d.ts +14 -1
  609. package/dist/utils/format.d.ts.map +1 -0
  610. package/dist/utils/format.js +19 -5
  611. package/dist/utils/format.js.map +1 -1
  612. package/dist/utils/index.d.ts +1 -0
  613. package/dist/utils/index.d.ts.map +1 -0
  614. package/dist/utils/logEmitter.d.ts +1 -0
  615. package/dist/utils/logEmitter.d.ts.map +1 -0
  616. package/dist/utils/logger.d.ts +1 -0
  617. package/dist/utils/logger.d.ts.map +1 -0
  618. package/dist/utils/logger.js +10 -6
  619. package/dist/utils/logger.js.map +1 -1
  620. package/dist/utils/m3u.d.ts +3 -2
  621. package/dist/utils/m3u.d.ts.map +1 -0
  622. package/dist/utils/m3u.js +4 -3
  623. package/dist/utils/m3u.js.map +1 -1
  624. package/dist/utils/markup.d.ts +4 -2
  625. package/dist/utils/markup.d.ts.map +1 -0
  626. package/dist/utils/markup.js +6 -5
  627. package/dist/utils/markup.js.map +1 -1
  628. package/dist/utils/memo.d.ts +3 -2
  629. package/dist/utils/memo.d.ts.map +1 -0
  630. package/dist/utils/memo.js +3 -3
  631. package/dist/utils/morganStream.d.ts +1 -0
  632. package/dist/utils/morganStream.d.ts.map +1 -0
  633. package/dist/utils/network.d.ts +1 -0
  634. package/dist/utils/network.d.ts.map +1 -0
  635. package/dist/utils/network.js +2 -2
  636. package/dist/utils/pid.d.ts +1 -0
  637. package/dist/utils/pid.d.ts.map +1 -0
  638. package/dist/utils/pid.js +3 -3
  639. package/dist/utils/platform.d.ts +3 -1
  640. package/dist/utils/platform.d.ts.map +1 -0
  641. package/dist/utils/platform.js +2 -1
  642. package/dist/utils/platform.js.map +1 -1
  643. package/dist/utils/processInspector.context.d.ts +1 -0
  644. package/dist/utils/processInspector.context.d.ts.map +1 -0
  645. package/dist/utils/processInspector.context.js +3 -1
  646. package/dist/utils/processInspector.context.js.map +1 -1
  647. package/dist/utils/processInspector.d.ts +4 -3
  648. package/dist/utils/processInspector.d.ts.map +1 -0
  649. package/dist/utils/processInspector.js +2 -0
  650. package/dist/utils/processInspector.js.map +1 -1
  651. package/dist/utils/retry.d.ts +24 -1
  652. package/dist/utils/retry.d.ts.map +1 -0
  653. package/dist/utils/retry.js +32 -5
  654. package/dist/utils/retry.js.map +1 -1
  655. package/dist/utils/runtimeIdentity.context.d.ts +1 -0
  656. package/dist/utils/runtimeIdentity.context.d.ts.map +1 -0
  657. package/dist/utils/runtimeIdentity.context.js +30 -0
  658. package/dist/utils/runtimeIdentity.context.js.map +1 -1
  659. package/dist/utils/runtimeIdentity.d.ts +6 -4
  660. package/dist/utils/runtimeIdentity.d.ts.map +1 -0
  661. package/dist/utils/runtimeIdentity.js +15 -5
  662. package/dist/utils/runtimeIdentity.js.map +1 -1
  663. package/dist/utils/sanitize.d.ts +1 -0
  664. package/dist/utils/sanitize.d.ts.map +1 -0
  665. package/dist/utils/streamContext.d.ts +2 -1
  666. package/dist/utils/streamContext.d.ts.map +1 -0
  667. package/dist/utils/streamContext.js +1 -1
  668. package/dist/utils/timing.d.ts +1 -0
  669. package/dist/utils/timing.d.ts.map +1 -0
  670. package/dist/utils/version.d.ts +1 -0
  671. package/dist/utils/version.d.ts.map +1 -0
  672. package/dist/utils/version.js +7 -3
  673. package/dist/utils/version.js.map +1 -1
  674. package/package.json +26 -20
@@ -106,8 +106,8 @@ declare function classifyEntry(key: string, stored: StoredChannel | undefined):
106
106
  * Computes the field-name allowlist for a stored entry's expected shape. Stored entries fall into two structural shapes determined by classification:
107
107
  *
108
108
  * - Canonical-shaped (kind = canonical or standalone): allowed fields are DELTA_ELIGIBLE_IDENTITY_KEYS ∪ DELTA_ELIGIBLE_BINDING_KEYS. The full delta surface.
109
- * - Variant-shaped (kind = variant): allowed fields are DELTA_ELIGIBLE_BINDING_KEYS plus the structural canonicalKey discriminator. Identity inherits from the
110
- * canonical and must not appear on variants per the architectural principle.
109
+ * - Variant-shaped (kind = variant): allowed fields are DELTA_ELIGIBLE_BINDING_KEYS plus the structural canonicalKey field that marks the kind. Identity
110
+ * inherits from the canonical and must not appear on variants per the architectural principle.
111
111
  *
112
112
  * Single source of truth for the shape rule. Used by filterToDeltaSurface (normalizer pre-strip) and by the customization accessor's per-pass walks. Routes
113
113
  * shape determination through classifyEntry so any caller automatically picks up classifier improvements - no parallel logic for "is this a variant?".
@@ -269,9 +269,10 @@ export declare function inferTargetVariant(canonicalKey: string, submittedUrl: s
269
269
  */
270
270
  declare function normalizeChannelDeltas(data: ChannelsFileData): void;
271
271
  /**
272
- * Prepares channels data for writing to disk. Injects metadata from module state (serviceSelections, tagRegistry) into the serializable output. The metadata
273
- * is always pulled from module state rather than from the file data, because route handlers may have modified metadata in memory since the last file read.
274
- * Delta normalization is handled by mutateChannels() before the data reaches this hook.
272
+ * Prepares channels data for writing to disk. This is a pure function of the passed envelope: channels, schemaVersion, migrationsApplied, serviceSelections,
273
+ * and tagRegistry are all sourced from `data`, never from module-state caches. The framework guarantees `data` is the source of truth at write time, so reading
274
+ * module state here would be a side channel that breaks correctness when the boot persist runs before module state is populated. Delta normalization is handled
275
+ * by mutateChannels() before the data reaches this hook.
275
276
  * @param data - The compound channels data with already-normalized channels.
276
277
  * @returns The serializable output with channels and current metadata.
277
278
  */
@@ -339,7 +340,7 @@ export declare function mutateChannels(fn: (data: ChannelsFileData) => void): Pr
339
340
  * - Canonical-binding overlap heal: invoked indirectly by the post-callback normalizer (normalizeChannelDeltas) which runs against the freshly-read data
340
341
  * inside mutateChannels. Any canonical override carrying binding whose URL extracts to a sibling variant's domain is healed in place - binding stripped
341
342
  * from the canonical, propagated to the matching variant entry, serviceSelections updated. The normalizer always runs post-callback; the heal happening
342
- * automatically is the load-bearing behavior, not the explicit body of this function.
343
+ * automatically is required for the cleanup to take effect, not the explicit body of this function.
343
344
  *
344
345
  * Existence as a named function is the architectural point: a bare `mutateChannels(() => {})` would correctly trigger the normalizer but obscure the intent
345
346
  * at the call site. The name documents what the pass does so callers see "run startup cleanup" rather than "do nothing inside a mutation."
@@ -433,7 +434,7 @@ declare function overlayDelta(base: ResolvedChannel, stored: StoredChannel): Res
433
434
  * Shared overlay kernel used by overlayDelta and overlayVariantBinding. Walks the stored entry's fields and applies them to a clone of base under three rules:
434
435
  * fields in allowedFields apply with delta semantics (null clears, undefined skips, value overrides); non-allowed fields either pass through (delta) or are
435
436
  * silently dropped (variant overlay) per passThroughOthers; canonicalKey is always allowed regardless of the gate so resolved variants retain their relationship
436
- * metadata. The kernel exists to keep the two overlays from drifting - identical control flow lived in both call sites before this consolidation.
437
+ * metadata. The kernel exists to keep the two overlays from drifting - both share one control-flow path rather than duplicating it in each call site.
437
438
  * @param base - The base channel to clone and overlay onto.
438
439
  * @param stored - The stored entry whose fields override the base.
439
440
  * @param options - allowedFields selects which fields apply with delta semantics; passThroughOthers controls whether non-allowed fields flow through or are
@@ -527,7 +528,7 @@ export declare function getVisibleChannels(): ChannelListingEntry[];
527
528
  export declare function getAllChannels(): ResolvedChannelMap;
528
529
  /**
529
530
  * Returns a copy of the raw stored user channels map - the unresolved entries as they exist in channels.json. Used by the consistency probe to check
530
- * cross-store invariants without applying delta resolution. Callers should not rely on the shape for anything beyond key/canonicalKey inspection.
531
+ * cross-store consistency rules without applying delta resolution. Callers should not rely on the shape for anything beyond key/canonicalKey inspection.
531
532
  * @returns Shallow copy of the loaded user channels.
532
533
  */
533
534
  export declare function getStoredUserChannels(): StoredChannelMap;
@@ -711,7 +712,8 @@ export declare function getChannelLogo(channelKey: string): string | undefined;
711
712
  export declare function isUserChannel(key: string): boolean;
712
713
  /**
713
714
  * Checks if a predefined channel is disabled. The disabled state is determined solely by the disabledPredefined list in config - the user's explicit visibility
714
- * intent. Property overrides (HDHR toggle, name change, tag edits) stored as deltas in channels.json are orthogonal and do not affect the enabled/disabled state.
715
+ * intent. Property overrides (HDHR toggle, name change, tag edits) stored as deltas in channels.json are independent and do not affect the enabled/disabled
716
+ * state.
715
717
  * @param key - The channel key to check.
716
718
  * @returns True if the channel is predefined and disabled.
717
719
  */
@@ -722,19 +724,20 @@ export declare function isPredefinedChannelDisabled(key: string): boolean;
722
724
  */
723
725
  export declare function getDisabledPredefinedChannels(): string[];
724
726
  /**
725
- * Disables one or more predefined channels by adding their keys to the disabledPredefined list in user config. Idempotent.
726
- * @param keys - The predefined channel keys to disable. Duplicates within the input array and pre-existing disabled entries are handled idempotently.
727
+ * Disables one or more predefined channels by adding their keys to the disabledPredefined list in user config. Safe to call again with the same keys.
728
+ * @param keys - The predefined channel keys to disable. Duplicates within the input array and pre-existing disabled entries are handled without producing
729
+ * duplicate list entries.
727
730
  */
728
731
  export declare function disablePredefinedChannels(keys: readonly string[]): Promise<void>;
729
732
  /**
730
- * Enables one or more predefined channels by removing their keys from the disabledPredefined list in user config. Idempotent.
733
+ * Enables one or more predefined channels by removing their keys from the disabledPredefined list in user config. Safe to call again with the same keys.
731
734
  * @param keys - The predefined channel keys to enable. Entries that aren't in the disabled list are ignored.
732
735
  */
733
736
  export declare function enablePredefinedChannels(keys: readonly string[]): Promise<void>;
734
737
  /**
735
738
  * Persists a partial update of channel-table display preferences (sort field, sort direction, visible columns) to config.json. Only fields present in `prefs`
736
739
  * are written; absent fields are left untouched. The mutate fn copies the new values into data and the runtime CONFIG cache is updated post-write to match.
737
- * Single-call replacement for the prior set-then-save pattern, consistent with mutateServiceSelections, mutateEnabledServices, and setTagRegistry.
740
+ * Persists and hydrates the runtime cache in a single call, consistent with mutateServiceSelections, mutateEnabledServices, and setTagRegistry.
738
741
  * @param prefs - Subset of display preferences to update.
739
742
  * @throws FileStoreParseError if config.json contains invalid JSON and the .bak rotation is also unparseable.
740
743
  */
@@ -828,10 +831,11 @@ export declare function validateChannelName(name: string): string | undefined;
828
831
  /**
829
832
  * Validates a profile name.
830
833
  * @param profile - The profile name to validate (can be empty for autodetect).
831
- * @param validProfiles - Array of valid profile names.
834
+ * @param isKnownProfile - Predicate answering whether a profile name exists. Callers test each name against the single builtin lookup plus the user's own
835
+ * profiles, so that a channel may reference a provider profile as well as a general or user-defined one.
832
836
  * @returns Error message if invalid, undefined if valid.
833
837
  */
834
- export declare function validateChannelProfile(profile: string | undefined, validProfiles: string[]): string | undefined;
838
+ export declare function validateChannelProfile(profile: string | undefined, isKnownProfile: (name: string) => boolean): string | undefined;
835
839
  /**
836
840
  * Result of validating imported channels.
837
841
  */
@@ -843,14 +847,14 @@ export interface ChannelsValidationResult {
843
847
  /**
844
848
  * Validates an imported channels object for structure and content.
845
849
  * @param data - The raw imported data to validate.
846
- * @param validProfiles - Array of valid profile names.
850
+ * @param isKnownProfile - Predicate answering whether a referenced profile name exists, passed through to the per-channel profile check.
847
851
  * @returns Validation result with errors if invalid.
848
852
  */
849
- export declare function validateImportedChannels(data: unknown, validProfiles: string[]): ChannelsValidationResult;
853
+ export declare function validateImportedChannels(data: unknown, isKnownProfile: (name: string) => boolean): ChannelsValidationResult;
850
854
  /**
851
855
  * Sorts tags case-insensitively using locale-aware comparison. This is the single source of truth for tag ordering. Every write path (parseTagInput, PATCH
852
856
  * handlers, computePredefinedDelta, transformChannelTags, setTagRegistry) routes through this so stored tag arrays share one canonical ordering. The channels
853
- * normalizer is a READER of that invariant - it uses sortTags on both sides when comparing a delta's tags against a predefined's tags, making the
857
+ * normalizer depends on that ordering guarantee - it uses sortTags on both sides when comparing a delta's tags against a predefined's tags, making the
854
858
  * isDeepStrictEqual comparison canonical regardless of how either side was originally populated.
855
859
  * @param tags - Any iterable of tag strings (array, Set, generator). Not mutated.
856
860
  * @returns A new array with the same elements in canonical case-insensitive order.
@@ -885,3 +889,4 @@ export declare const __internalForTests: {
885
889
  warnDanglingCanonical: typeof warnDanglingCanonical;
886
890
  };
887
891
  export {};
892
+ //# sourceMappingURL=userChannels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userChannels.d.ts","sourceRoot":"","sources":["../../src/config/userChannels.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAC7J,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG5E,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AA2BnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,cAA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AgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAQnD;AAOD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAC"}
@@ -46,8 +46,9 @@ export function getChannelsParseErrorMessage() {
46
46
  return userChannelsParseErrorMessage;
47
47
  }
48
48
  /* Transactional store for channels.json. The store uses a compound type that carries channel data alongside metadata (serviceSelections, tagRegistry). The parse
49
- * function extracts all three from the JSON file. The mutateChannels() wrapper normalizes predefined channel deltas before the write and adapts the compound
50
- * type so callers work directly with StoredChannelMap. The beforeWrite hook injects metadata from module state.
49
+ * function extracts the channel data and its metadata fields from the JSON file. The mutateChannels() wrapper normalizes predefined channel deltas before the
50
+ * write and adapts the compound type so callers work directly with StoredChannelMap. The beforeWrite hook (prepareChannelsForWrite) derives every field of the
51
+ * on-disk shape from the mutation's data envelope itself, never from module state.
51
52
  */
52
53
  /* Current schema version for channels.json. Migrations are declared in channelsMigrations below; the framework runs them in order from the file's stored
53
54
  * version up to this constant, stamps the new version after each, and records the audit trail in migrationsApplied.
@@ -58,7 +59,7 @@ export function getChannelsParseErrorMessage() {
58
59
  * stamping canonicalKey on entries whose identity fields match the canonical (shape-compatible with a legitimate variant) and skipping entries whose
59
60
  * fields differ (user standalones that happened to share a hyphenated key with a predefined canonical).
60
61
  * 3 - Foxone-era service naming. The v2 -> v3 migration renames "foxcom" -> "foxone" in service selections and channel keys, and the special-case
61
- * "fox-site" -> "fox-foxone" rename for the FoxOne variant briefly mis-keyed in v1.8.0. Bumping this version also flushes parser-side legacy field
62
+ * "fox-site" -> "fox-foxone" rename for the FoxOne variant stored under the "fox-site" key. Bumping this version also flushes parser-side legacy field
62
63
  * cleanups (provider -> service field, providerSelections -> serviceSelections key) to disk on the same write that lands the foxone rename.
63
64
  */
64
65
  const CURRENT_CHANNELS_SCHEMA_VERSION = 3;
@@ -79,7 +80,7 @@ function parseChannelsFile(raw) {
79
80
  let schemaVersion = 1;
80
81
  for (const [key, value] of Object.entries(parsed)) {
81
82
  if (key === "schemaVersion") {
82
- // Tolerate bad data by falling back to version 1 - any plausibly-legacy value is fine, since migrations are idempotent when no work is needed.
83
+ // Tolerate bad data by falling back to version 1 - any plausibly-legacy value is fine, since migrations are a no-op when no work is needed.
83
84
  if ((typeof value === "number") && Number.isFinite(value) && (value >= 1)) {
84
85
  schemaVersion = Math.floor(value);
85
86
  }
@@ -237,8 +238,8 @@ function classifyEntry(key, stored) {
237
238
  * Computes the field-name allowlist for a stored entry's expected shape. Stored entries fall into two structural shapes determined by classification:
238
239
  *
239
240
  * - Canonical-shaped (kind = canonical or standalone): allowed fields are DELTA_ELIGIBLE_IDENTITY_KEYS ∪ DELTA_ELIGIBLE_BINDING_KEYS. The full delta surface.
240
- * - Variant-shaped (kind = variant): allowed fields are DELTA_ELIGIBLE_BINDING_KEYS plus the structural canonicalKey discriminator. Identity inherits from the
241
- * canonical and must not appear on variants per the architectural principle.
241
+ * - Variant-shaped (kind = variant): allowed fields are DELTA_ELIGIBLE_BINDING_KEYS plus the structural canonicalKey field that marks the kind. Identity
242
+ * inherits from the canonical and must not appear on variants per the architectural principle.
242
243
  *
243
244
  * Single source of truth for the shape rule. Used by filterToDeltaSurface (normalizer pre-strip) and by the customization accessor's per-pass walks. Routes
244
245
  * shape determination through classifyEntry so any caller automatically picks up classifier improvements - no parallel logic for "is this a variant?".
@@ -297,7 +298,7 @@ function filterToDeltaSurface(key, stored) {
297
298
  function resolveVariant(canonical, predefined, stored) {
298
299
  // Identity-only base. The url field (required on ResolvedChannel) is supplied by the predefined variant or stored delta below; the cast acknowledges that
299
300
  // intermediate state. After the chain completes, the result has url populated when at least one of the binding-bearing layers (predefined or stored) is
300
- // present - which is the documented invariant for any well-formed variant entry.
301
+ // present - which is the documented guarantee for any well-formed variant entry.
301
302
  let resolved = pickIdentity(canonical);
302
303
  // Variant overlays apply binding fields only - identity stays from the canonical per the architectural principle that variants are pure tuning data. Both
303
304
  // the predefined variant and the user's stored variant entry use the same binding-only overlay.
@@ -350,7 +351,7 @@ function warnDanglingCanonical(variantKey, canonicalKey) {
350
351
  */
351
352
  function buildResolvedCanonicals(stored) {
352
353
  const result = {};
353
- const allKeys = new Set([...Object.keys(PREDEFINED_CHANNELS), ...Object.keys(stored)]);
354
+ const allKeys = new Set(Object.keys(PREDEFINED_CHANNELS)).union(new Set(Object.keys(stored)));
354
355
  for (const key of allKeys) {
355
356
  const classification = classifyEntry(key, stored[key]);
356
357
  if (classification.kind === "variant") {
@@ -515,7 +516,7 @@ export function inferTargetVariant(canonicalKey, submittedUrl, channels) {
515
516
  }
516
517
  }
517
518
  // Sort for deterministic pick when multiple siblings share a domain.
518
- const sortedKeys = [...siblingKeys].sort();
519
+ const sortedKeys = Array.from(siblingKeys).toSorted();
519
520
  for (const siblingKey of sortedKeys) {
520
521
  // Effective URL: user override (when string-valued) takes precedence over the predefined variant's URL. A null delta value clears the field, falling back
521
522
  // to the predefined; an absent field inherits, also falling back. Both collapse to "use the predefined URL."
@@ -645,7 +646,7 @@ function normalizeChannelDeltas(data) {
645
646
  continue;
646
647
  }
647
648
  // Variant. The normalization base is identity-from-canonical layered with the predefined variant's binding (if any) - the same shape the user sees in the
648
- // form/table, so the delta records only what differs from that. Critically, this matches the inheritance shape used by resolveVariant: identity from
649
+ // form/table, so the delta records only what differs from that. This matches the inheritance shape used by resolveVariant: identity from
649
650
  // canonical, binding from variant. Without the pickIdentity strip, the canonical service's binding would leak into the normalization base and stored
650
651
  // overrides matching the canonical's binding would be incorrectly stripped as no-ops. A dangling canonical falls back to standalone-style normalization so
651
652
  // the user does not silently lose data.
@@ -668,9 +669,10 @@ function normalizeChannelDeltas(data) {
668
669
  }
669
670
  }
670
671
  /**
671
- * Prepares channels data for writing to disk. Injects metadata from module state (serviceSelections, tagRegistry) into the serializable output. The metadata
672
- * is always pulled from module state rather than from the file data, because route handlers may have modified metadata in memory since the last file read.
673
- * Delta normalization is handled by mutateChannels() before the data reaches this hook.
672
+ * Prepares channels data for writing to disk. This is a pure function of the passed envelope: channels, schemaVersion, migrationsApplied, serviceSelections,
673
+ * and tagRegistry are all sourced from `data`, never from module-state caches. The framework guarantees `data` is the source of truth at write time, so reading
674
+ * module state here would be a side channel that breaks correctness when the boot persist runs before module state is populated. Delta normalization is handled
675
+ * by mutateChannels() before the data reaches this hook.
674
676
  * @param data - The compound channels data with already-normalized channels.
675
677
  * @returns The serializable output with channels and current metadata.
676
678
  */
@@ -718,6 +720,7 @@ const channelsMigrations = {
718
720
  // persist that writes the cleaned shape via prepareChannelsForWrite.
719
721
  for (const [canonicalKey, selectedVariant] of Object.entries(data.serviceSelections)) {
720
722
  if (selectedVariant.endsWith("-foxcom")) {
723
+ // Strip only "foxcom" (6 chars), not the full "-foxcom" guard (7), so the separating hyphen survives into the foxone-suffixed result.
721
724
  data.serviceSelections[canonicalKey] = selectedVariant.slice(0, -6) + "foxone";
722
725
  }
723
726
  if ((canonicalKey === "fox") && (selectedVariant === "fox-site")) {
@@ -726,6 +729,7 @@ const channelsMigrations = {
726
729
  }
727
730
  for (const [key, value] of Object.entries(data.channels)) {
728
731
  if (key.endsWith("-foxcom")) {
732
+ // Strip only "foxcom" (6 chars), not the full "-foxcom" guard (7), so the separating hyphen survives into the foxone-suffixed result.
729
733
  data.channels[key.slice(0, -6) + "foxone"] = value;
730
734
  Reflect.deleteProperty(data.channels, key);
731
735
  }
@@ -920,7 +924,7 @@ export async function mutateChannels(fn) {
920
924
  * - Canonical-binding overlap heal: invoked indirectly by the post-callback normalizer (normalizeChannelDeltas) which runs against the freshly-read data
921
925
  * inside mutateChannels. Any canonical override carrying binding whose URL extracts to a sibling variant's domain is healed in place - binding stripped
922
926
  * from the canonical, propagated to the matching variant entry, serviceSelections updated. The normalizer always runs post-callback; the heal happening
923
- * automatically is the load-bearing behavior, not the explicit body of this function.
927
+ * automatically is required for the cleanup to take effect, not the explicit body of this function.
924
928
  *
925
929
  * Existence as a named function is the architectural point: a bare `mutateChannels(() => {})` would correctly trigger the normalizer but obscure the intent
926
930
  * at the call site. The name documents what the pass does so callers see "run startup cleanup" rather than "do nothing inside a mutation."
@@ -1146,7 +1150,7 @@ export async function initializeUserChannels() {
1146
1150
  const VARIANT_OVERLAY_ALLOWED_FIELDS = new Set(CHANNEL_BINDING_KEYS);
1147
1151
  // The runtime delta surface: every field that may legitimately appear in a stored ChannelDelta override. Derived from the partition arrays in types/channels.ts
1148
1152
  // so adding or removing a delta-eligible field in one place propagates everywhere. Typed as Set<string> for ergonomics at .has() call sites that take string-keyed
1149
- // values from Object.entries iteration; the contents are statically-known CustomizableField values via the spread above.
1153
+ // values from Object.entries iteration; the contents are statically-known CustomizableField values via the spread below.
1150
1154
  const DELTA_ALLOWED_FIELDS = new Set([...DELTA_ELIGIBLE_IDENTITY_KEYS, ...DELTA_ELIGIBLE_BINDING_KEYS]);
1151
1155
  /**
1152
1156
  * Extracts the identity-only subset of a channel. Used by resolveVariant and normalizeChannelDeltas to compute the inheritance base for variants: a variant
@@ -1196,7 +1200,7 @@ function overlayDelta(base, stored) {
1196
1200
  * Shared overlay kernel used by overlayDelta and overlayVariantBinding. Walks the stored entry's fields and applies them to a clone of base under three rules:
1197
1201
  * fields in allowedFields apply with delta semantics (null clears, undefined skips, value overrides); non-allowed fields either pass through (delta) or are
1198
1202
  * silently dropped (variant overlay) per passThroughOthers; canonicalKey is always allowed regardless of the gate so resolved variants retain their relationship
1199
- * metadata. The kernel exists to keep the two overlays from drifting - identical control flow lived in both call sites before this consolidation.
1203
+ * metadata. The kernel exists to keep the two overlays from drifting - both share one control-flow path rather than duplicating it in each call site.
1200
1204
  * @param base - The base channel to clone and overlay onto.
1201
1205
  * @param stored - The stored entry whose fields override the base.
1202
1206
  * @param options - allowedFields selects which fields apply with delta semantics; passThroughOthers controls whether non-allowed fields flow through or are
@@ -1280,7 +1284,7 @@ export function resolveStoredChannel(key, stored) {
1280
1284
  */
1281
1285
  function getMergedChannelMap() {
1282
1286
  const result = buildResolvedCanonicals(loadedUserChannels);
1283
- const allKeys = new Set([...Object.keys(PREDEFINED_CHANNELS), ...Object.keys(loadedUserChannels)]);
1287
+ const allKeys = new Set(Object.keys(PREDEFINED_CHANNELS)).union(new Set(Object.keys(loadedUserChannels)));
1284
1288
  for (const key of allKeys) {
1285
1289
  const stored = loadedUserChannels[key];
1286
1290
  const classification = classifyEntry(key, stored);
@@ -1333,7 +1337,7 @@ function getMergedChannelMap() {
1333
1337
  * @returns Sorted array of channel listing entries.
1334
1338
  */
1335
1339
  export function getChannelListing() {
1336
- const allKeys = new Set([...Object.keys(PREDEFINED_CHANNELS), ...Object.keys(loadedUserChannels)]);
1340
+ const allKeys = new Set(Object.keys(PREDEFINED_CHANNELS)).union(new Set(Object.keys(loadedUserChannels)));
1337
1341
  const listing = [];
1338
1342
  for (const key of allKeys) {
1339
1343
  // Skip service variants - they're accessed via service selection, not as separate channels.
@@ -1414,7 +1418,7 @@ export function getAllChannels() {
1414
1418
  }
1415
1419
  /**
1416
1420
  * Returns a copy of the raw stored user channels map - the unresolved entries as they exist in channels.json. Used by the consistency probe to check
1417
- * cross-store invariants without applying delta resolution. Callers should not rely on the shape for anything beyond key/canonicalKey inspection.
1421
+ * cross-store consistency rules without applying delta resolution. Callers should not rely on the shape for anything beyond key/canonicalKey inspection.
1418
1422
  * @returns Shallow copy of the loaded user channels.
1419
1423
  */
1420
1424
  export function getStoredUserChannels() {
@@ -1767,7 +1771,8 @@ export function getChannelStationId(channelKey) {
1767
1771
  return resolveStoredChannel(effectiveKey, userEntry).stationId;
1768
1772
  }
1769
1773
  // PREDEFINED_CHANNELS is a discriminated union; only canonicals carry stationId. The lookup here is by canonical-equivalent key (Pacific resolved to East),
1770
- // so a hit is structurally a canonical. Narrow via the canonicalKey discriminator: a defined canonicalKey marks a VariantChannel, which has no stationId.
1774
+ // so a hit is structurally a canonical. Narrow via the canonicalKey field that marks the kind: a defined canonicalKey marks a VariantChannel, which has no
1775
+ // stationId.
1771
1776
  const predefined = PREDEFINED_CHANNELS[effectiveKey];
1772
1777
  if (!predefined || (predefined.canonicalKey !== undefined)) {
1773
1778
  return undefined;
@@ -1800,7 +1805,8 @@ export function isUserChannel(key) {
1800
1805
  */
1801
1806
  /**
1802
1807
  * Checks if a predefined channel is disabled. The disabled state is determined solely by the disabledPredefined list in config - the user's explicit visibility
1803
- * intent. Property overrides (HDHR toggle, name change, tag edits) stored as deltas in channels.json are orthogonal and do not affect the enabled/disabled state.
1808
+ * intent. Property overrides (HDHR toggle, name change, tag edits) stored as deltas in channels.json are independent and do not affect the enabled/disabled
1809
+ * state.
1804
1810
  * @param key - The channel key to check.
1805
1811
  * @returns True if the channel is predefined and disabled.
1806
1812
  */
@@ -1842,14 +1848,15 @@ async function mutateDisabledPredefined(op, keys) {
1842
1848
  CONFIG.channels.disabledPredefined = updatedList;
1843
1849
  }
1844
1850
  /**
1845
- * Disables one or more predefined channels by adding their keys to the disabledPredefined list in user config. Idempotent.
1846
- * @param keys - The predefined channel keys to disable. Duplicates within the input array and pre-existing disabled entries are handled idempotently.
1851
+ * Disables one or more predefined channels by adding their keys to the disabledPredefined list in user config. Safe to call again with the same keys.
1852
+ * @param keys - The predefined channel keys to disable. Duplicates within the input array and pre-existing disabled entries are handled without producing
1853
+ * duplicate list entries.
1847
1854
  */
1848
1855
  export async function disablePredefinedChannels(keys) {
1849
1856
  await mutateDisabledPredefined("add", keys);
1850
1857
  }
1851
1858
  /**
1852
- * Enables one or more predefined channels by removing their keys from the disabledPredefined list in user config. Idempotent.
1859
+ * Enables one or more predefined channels by removing their keys from the disabledPredefined list in user config. Safe to call again with the same keys.
1853
1860
  * @param keys - The predefined channel keys to enable. Entries that aren't in the disabled list are ignored.
1854
1861
  */
1855
1862
  export async function enablePredefinedChannels(keys) {
@@ -1858,7 +1865,7 @@ export async function enablePredefinedChannels(keys) {
1858
1865
  /**
1859
1866
  * Persists a partial update of channel-table display preferences (sort field, sort direction, visible columns) to config.json. Only fields present in `prefs`
1860
1867
  * are written; absent fields are left untouched. The mutate fn copies the new values into data and the runtime CONFIG cache is updated post-write to match.
1861
- * Single-call replacement for the prior set-then-save pattern, consistent with mutateServiceSelections, mutateEnabledServices, and setTagRegistry.
1868
+ * Persists and hydrates the runtime cache in a single call, consistent with mutateServiceSelections, mutateEnabledServices, and setTagRegistry.
1862
1869
  * @param prefs - Subset of display preferences to update.
1863
1870
  * @throws FileStoreParseError if config.json contains invalid JSON and the .bak rotation is also unparseable.
1864
1871
  */
@@ -2075,27 +2082,31 @@ export function validateChannelName(name) {
2075
2082
  /**
2076
2083
  * Validates a profile name.
2077
2084
  * @param profile - The profile name to validate (can be empty for autodetect).
2078
- * @param validProfiles - Array of valid profile names.
2085
+ * @param isKnownProfile - Predicate answering whether a profile name exists. Callers test each name against the single builtin lookup plus the user's own
2086
+ * profiles, so that a channel may reference a provider profile as well as a general or user-defined one.
2079
2087
  * @returns Error message if invalid, undefined if valid.
2080
2088
  */
2081
- export function validateChannelProfile(profile, validProfiles) {
2089
+ export function validateChannelProfile(profile, isKnownProfile) {
2082
2090
  // Empty profile means autodetect, which is valid.
2083
2091
  if (!profile || (profile.trim() === "")) {
2084
2092
  return undefined;
2085
2093
  }
2086
- // Check if profile exists.
2087
- if (!validProfiles.includes(profile)) {
2088
- return "Unknown profile: " + profile + ". Valid profiles: " + validProfiles.join(", ") + ".";
2094
+ /* Check if profile exists. The message names the rejected value alone. The set of acceptable names includes the provider profiles, which the web UI's profile
2095
+ * picker deliberately omits, so spelling that set out here would offer names the picker will never present. The picker is the discovery surface for a valid
2096
+ * profile name; this message's job is to say which value was not one.
2097
+ */
2098
+ if (!isKnownProfile(profile)) {
2099
+ return "Unknown profile: " + profile + ".";
2089
2100
  }
2090
2101
  return undefined;
2091
2102
  }
2092
2103
  /**
2093
2104
  * Validates an imported channels object for structure and content.
2094
2105
  * @param data - The raw imported data to validate.
2095
- * @param validProfiles - Array of valid profile names.
2106
+ * @param isKnownProfile - Predicate answering whether a referenced profile name exists, passed through to the per-channel profile check.
2096
2107
  * @returns Validation result with errors if invalid.
2097
2108
  */
2098
- export function validateImportedChannels(data, validProfiles) {
2109
+ export function validateImportedChannels(data, isKnownProfile) {
2099
2110
  const errors = [];
2100
2111
  // Check that input is an object.
2101
2112
  if ((typeof data !== "object") || (data === null) || Array.isArray(data)) {
@@ -2140,7 +2151,7 @@ export function validateImportedChannels(data, validProfiles) {
2140
2151
  }
2141
2152
  // Validate optional profile field. Sanitize after type check.
2142
2153
  const profile = (typeof channelData["profile"] === "string") ? sanitizeString(channelData["profile"]) : undefined;
2143
- const profileError = validateChannelProfile(profile, validProfiles);
2154
+ const profileError = validateChannelProfile(profile, isKnownProfile);
2144
2155
  if (profileError) {
2145
2156
  errors.push("Channel '" + key + "': " + profileError);
2146
2157
  continue;
@@ -2201,7 +2212,7 @@ export function validateImportedChannels(data, validProfiles) {
2201
2212
  /**
2202
2213
  * Sorts tags case-insensitively using locale-aware comparison. This is the single source of truth for tag ordering. Every write path (parseTagInput, PATCH
2203
2214
  * handlers, computePredefinedDelta, transformChannelTags, setTagRegistry) routes through this so stored tag arrays share one canonical ordering. The channels
2204
- * normalizer is a READER of that invariant - it uses sortTags on both sides when comparing a delta's tags against a predefined's tags, making the
2215
+ * normalizer depends on that ordering guarantee - it uses sortTags on both sides when comparing a delta's tags against a predefined's tags, making the
2205
2216
  * isDeepStrictEqual comparison canonical regardless of how either side was originally populated.
2206
2217
  * @param tags - Any iterable of tag strings (array, Set, generator). Not mutated.
2207
2218
  * @returns A new array with the same elements in canonical case-insensitive order.