fundus 0.17.2 → 0.19.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 (221) hide show
  1. package/README.md +60 -121
  2. package/build/client/_app/immutable/assets/2.C-1MfvLQ.css +1 -0
  3. package/build/client/_app/immutable/assets/2.C-1MfvLQ.css.br +0 -0
  4. package/build/client/_app/immutable/assets/2.C-1MfvLQ.css.gz +0 -0
  5. package/build/client/_app/immutable/assets/{3.66PJT3JC.css → 3.q3CUOEpz.css} +1 -1
  6. package/build/client/_app/immutable/assets/3.q3CUOEpz.css.br +0 -0
  7. package/build/client/_app/immutable/assets/3.q3CUOEpz.css.gz +0 -0
  8. package/build/client/_app/immutable/assets/{AssetSourceMenu.Buj2UxUg.css → AssetSourceMenu.CgyMTAb6.css} +1 -1
  9. package/build/client/_app/immutable/assets/AssetSourceMenu.CgyMTAb6.css.br +0 -0
  10. package/build/client/_app/immutable/assets/AssetSourceMenu.CgyMTAb6.css.gz +0 -0
  11. package/build/client/_app/immutable/chunks/Bly9uffh.js +1 -0
  12. package/build/client/_app/immutable/chunks/Bly9uffh.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/Bly9uffh.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/{R0o69z6O.js → BpsKkIFc.js} +1 -1
  15. package/build/client/_app/immutable/chunks/BpsKkIFc.js.br +2 -0
  16. package/build/client/_app/immutable/chunks/BpsKkIFc.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/{jEVVu5G9.js → CrIZjnDr.js} +1 -1
  18. package/build/client/_app/immutable/chunks/CrIZjnDr.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/CrIZjnDr.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/ZGU9Utak.js +108 -0
  21. package/build/client/_app/immutable/chunks/ZGU9Utak.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/ZGU9Utak.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/lw3KP4og.js +2 -0
  24. package/build/client/_app/immutable/chunks/lw3KP4og.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/lw3KP4og.js.gz +0 -0
  26. package/build/client/_app/immutable/entry/{app.DxYfHxs-.js → app.D-lO1MC-.js} +2 -2
  27. package/build/client/_app/immutable/entry/app.D-lO1MC-.js.br +0 -0
  28. package/build/client/_app/immutable/entry/app.D-lO1MC-.js.gz +0 -0
  29. package/build/client/_app/immutable/entry/start.BrSEFrid.js +1 -0
  30. package/build/client/_app/immutable/entry/start.BrSEFrid.js.br +1 -0
  31. package/build/client/_app/immutable/entry/start.BrSEFrid.js.gz +0 -0
  32. package/build/client/_app/immutable/nodes/{0.Do0MsVUC.js → 0.BPGg3A-F.js} +1 -1
  33. package/build/client/_app/immutable/nodes/0.BPGg3A-F.js.br +0 -0
  34. package/build/client/_app/immutable/nodes/0.BPGg3A-F.js.gz +0 -0
  35. package/build/client/_app/immutable/nodes/{1.DhfAdUbg.js → 1.-VJ5Mlss.js} +1 -1
  36. package/build/client/_app/immutable/nodes/1.-VJ5Mlss.js.br +1 -0
  37. package/build/client/_app/immutable/nodes/1.-VJ5Mlss.js.gz +0 -0
  38. package/build/client/_app/immutable/nodes/2.Dhyvb4bF.js +3 -0
  39. package/build/client/_app/immutable/nodes/2.Dhyvb4bF.js.br +0 -0
  40. package/build/client/_app/immutable/nodes/2.Dhyvb4bF.js.gz +0 -0
  41. package/build/client/_app/immutable/nodes/3.D9Fgsq-b.js +1 -0
  42. package/build/client/_app/immutable/nodes/3.D9Fgsq-b.js.br +0 -0
  43. package/build/client/_app/immutable/nodes/3.D9Fgsq-b.js.gz +0 -0
  44. package/build/client/_app/immutable/nodes/{4.gPNAednG.js → 4.DErtysFP.js} +1 -1
  45. package/build/client/_app/immutable/nodes/4.DErtysFP.js.br +0 -0
  46. package/build/client/_app/immutable/nodes/4.DErtysFP.js.gz +0 -0
  47. package/build/client/_app/version.json +1 -1
  48. package/build/client/_app/version.json.br +0 -0
  49. package/build/client/_app/version.json.gz +0 -0
  50. package/build/handler.js +7 -7
  51. package/build/index.js +7 -7
  52. package/build/server/chunks/chunks/{context.js-Dh0ibRIF.js → context.js-BIgcUcEl.js} +216 -604
  53. package/build/server/chunks/chunks/context.js-BIgcUcEl.js.map +1 -0
  54. package/build/server/chunks/chunks/{contract.js-_LTMZBo2.js → contract.js-B6KBK8D9.js} +59 -95
  55. package/build/server/chunks/chunks/contract.js-B6KBK8D9.js.map +1 -0
  56. package/build/server/chunks/chunks/{core.js-CTyKR4bu.js → core.js-Bp-ReC60.js} +38 -38
  57. package/build/server/chunks/chunks/core.js-Bp-ReC60.js.map +1 -0
  58. package/build/server/chunks/chunks/dependencies.js-pUkjICr5.js +45 -0
  59. package/build/server/chunks/chunks/dependencies.js-pUkjICr5.js.map +1 -0
  60. package/build/server/chunks/chunks/{exports.js-gUMFfqhw.js → exports.js-bhKV7cEL.js} +2 -2
  61. package/build/server/chunks/chunks/{exports.js-gUMFfqhw.js.map → exports.js-bhKV7cEL.js.map} +1 -1
  62. package/build/server/chunks/chunks/{http.js-BiqUcAuu.js → http.js-BTq44nR5.js} +2 -2
  63. package/build/server/chunks/chunks/{http.js-BiqUcAuu.js.map → http.js-BTq44nR5.js.map} +1 -1
  64. package/build/server/chunks/chunks/{internal.js-DvC1GD8s.js → internal.js-7MmaxxwZ.js} +3 -3
  65. package/build/server/chunks/chunks/{internal.js-DvC1GD8s.js.map → internal.js-7MmaxxwZ.js.map} +1 -1
  66. package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -1
  67. package/build/server/chunks/chunks/{manifest-membership.js-at1ixQdW.js → manifest-membership.js-Dj3WwZgz.js} +2 -2
  68. package/build/server/chunks/chunks/{manifest-membership.js-at1ixQdW.js.map → manifest-membership.js-Dj3WwZgz.js.map} +1 -1
  69. package/build/server/chunks/chunks/{raw-reconciliation.js-CUH8IIJx.js → raw-reconciliation.js-mWOAOdgL.js} +3 -3
  70. package/build/server/chunks/chunks/raw-reconciliation.js-mWOAOdgL.js.map +1 -0
  71. package/build/server/chunks/chunks/{raw-reconciliation2.js-z4xl5zw2.js → raw-reconciliation2.js-Bo1jJgvd.js} +2 -2
  72. package/build/server/chunks/chunks/{raw-reconciliation2.js-z4xl5zw2.js.map → raw-reconciliation2.js-Bo1jJgvd.js.map} +1 -1
  73. package/build/server/chunks/chunks/{shared.js-nXNT--BO.js → shared.js-B0m3s2U9.js} +2 -2
  74. package/build/server/chunks/chunks/{shared.js-nXNT--BO.js.map → shared.js-B0m3s2U9.js.map} +1 -1
  75. package/build/server/chunks/chunks/{utils.js-C5pr7OK-.js → utils.js-BXV0zq44.js} +3 -3
  76. package/build/server/chunks/chunks/{utils.js-C5pr7OK-.js.map → utils.js-BXV0zq44.js.map} +1 -1
  77. package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CdDjuW0r.js → _server.ts.js-B_aa_zh7.js} +6 -6
  78. package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CdDjuW0r.js.map → _server.ts.js-B_aa_zh7.js.map} +1 -1
  79. package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-OWM1eORG.js → _server.ts.js-DbEPdkbO.js} +8 -8
  80. package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-OWM1eORG.js.map → _server.ts.js-DbEPdkbO.js.map} +1 -1
  81. package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-DoG-7ZpZ.js → _server.ts.js-BzA96yBM.js} +8 -8
  82. package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-DoG-7ZpZ.js.map → _server.ts.js-BzA96yBM.js.map} +1 -1
  83. package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-CAWjVeGd.js → _server.ts.js-fQAXFRLh.js} +8 -8
  84. package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-CAWjVeGd.js.map → _server.ts.js-fQAXFRLh.js.map} +1 -1
  85. package/build/server/chunks/entries/endpoints/api/assets/_id_/retag/{_server.ts.js-CqS4aALY.js → _server.ts.js-RTBrlhk5.js} +8 -8
  86. package/build/server/chunks/entries/endpoints/api/assets/_id_/retag/{_server.ts.js-CqS4aALY.js.map → _server.ts.js-RTBrlhk5.js.map} +1 -1
  87. package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-Bo_EsYXJ.js → _server.ts.js-Baz4gPRd.js} +8 -8
  88. package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-Bo_EsYXJ.js.map → _server.ts.js-Baz4gPRd.js.map} +1 -1
  89. package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-DW4w0XAr.js → _server.ts.js-CnqdPxWQ.js} +8 -8
  90. package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-DW4w0XAr.js.map → _server.ts.js-CnqdPxWQ.js.map} +1 -1
  91. package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-_MiNPnSy.js → _server.ts.js-bvrtSRDz.js} +8 -8
  92. package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-_MiNPnSy.js.map → _server.ts.js-bvrtSRDz.js.map} +1 -1
  93. package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-DwbrQnBc.js → _server.ts.js-cgYcVXgU.js} +8 -8
  94. package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-DwbrQnBc.js.map → _server.ts.js-cgYcVXgU.js.map} +1 -1
  95. package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-CEnHQf3b.js → _server.ts.js-DbXw3YEr.js} +8 -8
  96. package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-CEnHQf3b.js.map → _server.ts.js-DbXw3YEr.js.map} +1 -1
  97. package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BZDuJZtF.js → _server.ts.js-D0PEYlzG.js} +8 -8
  98. package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BZDuJZtF.js.map → _server.ts.js-D0PEYlzG.js.map} +1 -1
  99. package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-DRgdpKKd.js → _server.ts.js-Dt9Wfgs7.js} +8 -8
  100. package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-DRgdpKKd.js.map → _server.ts.js-Dt9Wfgs7.js.map} +1 -1
  101. package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-CP5QyIhz.js → _server.ts.js-BBuZYakQ.js} +8 -8
  102. package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-CP5QyIhz.js.map → _server.ts.js-BBuZYakQ.js.map} +1 -1
  103. package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BKEvt065.js → _server.ts.js-DQ_CWMTu.js} +8 -8
  104. package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BKEvt065.js.map → _server.ts.js-DQ_CWMTu.js.map} +1 -1
  105. package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-C_zihkDS.js → _server.ts.js-B3TVoDCl.js} +8 -8
  106. package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-C_zihkDS.js.map → _server.ts.js-B3TVoDCl.js.map} +1 -1
  107. package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-watkBmy6.js → _server.ts.js--2C2x6Q0.js} +8 -8
  108. package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-watkBmy6.js.map → _server.ts.js--2C2x6Q0.js.map} +1 -1
  109. package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-YtumLIou.js → _server.ts.js-DD2Hz15k.js} +8 -8
  110. package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-YtumLIou.js.map → _server.ts.js-DD2Hz15k.js.map} +1 -1
  111. package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-Dkouuu-M.js → _server.ts.js-Ei98ilB5.js} +8 -8
  112. package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-Dkouuu-M.js.map → _server.ts.js-Ei98ilB5.js.map} +1 -1
  113. package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-DwsEQeuf.js → _server.ts.js-NNuDGwyK.js} +8 -8
  114. package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-DwsEQeuf.js.map → _server.ts.js-NNuDGwyK.js.map} +1 -1
  115. package/build/server/chunks/entries/endpoints/api/usage/{_server.ts.js-CdQxfhV3.js → _server.ts.js-6_Wl_k0H.js} +8 -8
  116. package/build/server/chunks/entries/endpoints/api/usage/{_server.ts.js-CdQxfhV3.js.map → _server.ts.js-6_Wl_k0H.js.map} +1 -1
  117. package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DDdMocWj.js → _server.ts.js-DkYQlG9U.js} +6 -6
  118. package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DDdMocWj.js.map → _server.ts.js-DkYQlG9U.js.map} +1 -1
  119. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-DbzjbH32.js → _server.ts.js-Dft0Zgh3.js} +8 -8
  120. package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-DbzjbH32.js.map → _server.ts.js-Dft0Zgh3.js.map} +1 -1
  121. package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-K_JbXZsU.js → _server.ts.js-rlV0QRQS.js} +8 -8
  122. package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-K_JbXZsU.js.map → _server.ts.js-rlV0QRQS.js.map} +1 -1
  123. package/build/server/chunks/entries/{hooks.server.js-DgZAVFbQ.js → hooks.server.js-C345JVQ2.js} +7 -7
  124. package/build/server/chunks/entries/{hooks.server.js-DgZAVFbQ.js.map → hooks.server.js-C345JVQ2.js.map} +1 -1
  125. package/build/server/chunks/{handler-C4m7sKKb.js → handler-C_S3CtEF.js} +5 -5
  126. package/build/server/chunks/{handler-C4m7sKKb.js.map → handler-C_S3CtEF.js.map} +1 -1
  127. package/build/server/chunks/{index.js-pAnkrzRH.js → index.js-CSCxgyyg.js} +5 -5
  128. package/build/server/chunks/{index.js-pAnkrzRH.js.map → index.js-CSCxgyyg.js.map} +1 -1
  129. package/build/server/chunks/{manifest.js-CXQHeYnS.js → manifest.js-CO6AjAUm.js} +30 -30
  130. package/build/server/chunks/{manifest.js-CXQHeYnS.js.map → manifest.js-CO6AjAUm.js.map} +1 -1
  131. package/build/server/chunks/nodes/{0.js-lmQMhWZd.js → 0.js-CRc8onmc.js} +2 -2
  132. package/build/server/chunks/nodes/{0.js-lmQMhWZd.js.map → 0.js-CRc8onmc.js.map} +1 -1
  133. package/build/server/chunks/nodes/1.js-CZm_Doa7.js +7 -0
  134. package/build/server/chunks/nodes/{1.js-CdH3UJI2.js.map → 1.js-CZm_Doa7.js.map} +1 -1
  135. package/build/server/chunks/nodes/2.js-B92vn1Hu.js +7 -0
  136. package/build/server/chunks/nodes/2.js-B92vn1Hu.js.map +1 -0
  137. package/build/server/chunks/nodes/3.js-C14BP7Jm.js +7 -0
  138. package/build/server/chunks/nodes/3.js-C14BP7Jm.js.map +1 -0
  139. package/build/server/chunks/nodes/4.js-BLNdVCa1.js +7 -0
  140. package/build/server/chunks/nodes/{4.js-DtgDNAZF.js.map → 4.js-BLNdVCa1.js.map} +1 -1
  141. package/dist/config.d.ts +5 -3
  142. package/dist/config.js +3 -2
  143. package/dist/core/api-types.d.ts +7 -22
  144. package/dist/core/config.d.ts +8 -82
  145. package/dist/core/config.js +0 -9
  146. package/dist/core/dependencies.d.ts +52 -0
  147. package/dist/core/dependencies.js +56 -0
  148. package/dist/core/dependency-validation.d.ts +17 -0
  149. package/dist/core/dependency-validation.js +19 -0
  150. package/dist/core/index.d.ts +8 -10
  151. package/dist/core/index.js +4 -5
  152. package/dist/core/library.d.ts +0 -19
  153. package/dist/core/library.js +4 -4
  154. package/dist/core/manifest-membership.d.ts +2 -2
  155. package/dist/core/reference-graph.d.ts +3 -3
  156. package/dist/server/build.js +12 -26
  157. package/dist/server/check.d.ts +3 -13
  158. package/dist/server/check.js +33 -112
  159. package/dist/server/codegen.d.ts +1 -3
  160. package/dist/server/codegen.js +0 -18
  161. package/dist/server/config-loader.d.ts +10 -33
  162. package/dist/server/config-loader.js +87 -156
  163. package/dist/server/index.d.ts +1 -1
  164. package/dist/server/index.js +1 -1
  165. package/dist/server/library-store.d.ts +1 -11
  166. package/dist/server/library-store.js +60 -42
  167. package/dist/server/operations.js +54 -161
  168. package/package.json +1 -1
  169. package/build/client/_app/immutable/assets/2.X44Wyac-.css +0 -1
  170. package/build/client/_app/immutable/assets/2.X44Wyac-.css.br +0 -0
  171. package/build/client/_app/immutable/assets/2.X44Wyac-.css.gz +0 -0
  172. package/build/client/_app/immutable/assets/3.66PJT3JC.css.br +0 -0
  173. package/build/client/_app/immutable/assets/3.66PJT3JC.css.gz +0 -0
  174. package/build/client/_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css.br +0 -0
  175. package/build/client/_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css.gz +0 -0
  176. package/build/client/_app/immutable/chunks/0SQyBKXe.js +0 -108
  177. package/build/client/_app/immutable/chunks/0SQyBKXe.js.br +0 -0
  178. package/build/client/_app/immutable/chunks/0SQyBKXe.js.gz +0 -0
  179. package/build/client/_app/immutable/chunks/DXiUbZ9S.js +0 -2
  180. package/build/client/_app/immutable/chunks/DXiUbZ9S.js.br +0 -0
  181. package/build/client/_app/immutable/chunks/DXiUbZ9S.js.gz +0 -0
  182. package/build/client/_app/immutable/chunks/R0o69z6O.js.br +0 -0
  183. package/build/client/_app/immutable/chunks/R0o69z6O.js.gz +0 -0
  184. package/build/client/_app/immutable/chunks/TrnW_5ju.js +0 -1
  185. package/build/client/_app/immutable/chunks/TrnW_5ju.js.br +0 -0
  186. package/build/client/_app/immutable/chunks/TrnW_5ju.js.gz +0 -0
  187. package/build/client/_app/immutable/chunks/jEVVu5G9.js.br +0 -0
  188. package/build/client/_app/immutable/chunks/jEVVu5G9.js.gz +0 -0
  189. package/build/client/_app/immutable/entry/app.DxYfHxs-.js.br +0 -0
  190. package/build/client/_app/immutable/entry/app.DxYfHxs-.js.gz +0 -0
  191. package/build/client/_app/immutable/entry/start.CdM7ozdO.js +0 -1
  192. package/build/client/_app/immutable/entry/start.CdM7ozdO.js.br +0 -0
  193. package/build/client/_app/immutable/entry/start.CdM7ozdO.js.gz +0 -0
  194. package/build/client/_app/immutable/nodes/0.Do0MsVUC.js.br +0 -0
  195. package/build/client/_app/immutable/nodes/0.Do0MsVUC.js.gz +0 -0
  196. package/build/client/_app/immutable/nodes/1.DhfAdUbg.js.br +0 -1
  197. package/build/client/_app/immutable/nodes/1.DhfAdUbg.js.gz +0 -0
  198. package/build/client/_app/immutable/nodes/2.lLNAdU5s.js +0 -3
  199. package/build/client/_app/immutable/nodes/2.lLNAdU5s.js.br +0 -0
  200. package/build/client/_app/immutable/nodes/2.lLNAdU5s.js.gz +0 -0
  201. package/build/client/_app/immutable/nodes/3.DA8xzCvA.js +0 -1
  202. package/build/client/_app/immutable/nodes/3.DA8xzCvA.js.br +0 -0
  203. package/build/client/_app/immutable/nodes/3.DA8xzCvA.js.gz +0 -0
  204. package/build/client/_app/immutable/nodes/4.gPNAednG.js.br +0 -0
  205. package/build/client/_app/immutable/nodes/4.gPNAednG.js.gz +0 -0
  206. package/build/server/chunks/chunks/context.js-Dh0ibRIF.js.map +0 -1
  207. package/build/server/chunks/chunks/contract.js-_LTMZBo2.js.map +0 -1
  208. package/build/server/chunks/chunks/core.js-CTyKR4bu.js.map +0 -1
  209. package/build/server/chunks/chunks/raw-reconciliation.js-CUH8IIJx.js.map +0 -1
  210. package/build/server/chunks/nodes/1.js-CdH3UJI2.js +0 -7
  211. package/build/server/chunks/nodes/2.js-BHnsJqcE.js +0 -7
  212. package/build/server/chunks/nodes/2.js-BHnsJqcE.js.map +0 -1
  213. package/build/server/chunks/nodes/3.js-cR9NdrYS.js +0 -7
  214. package/build/server/chunks/nodes/3.js-cR9NdrYS.js.map +0 -1
  215. package/build/server/chunks/nodes/4.js-DtgDNAZF.js +0 -7
  216. package/dist/core/library-validation.d.ts +0 -13
  217. package/dist/core/library-validation.js +0 -48
  218. package/dist/core/package-declaration.d.ts +0 -43
  219. package/dist/core/package-declaration.js +0 -80
  220. package/dist/core/package-merge.d.ts +0 -65
  221. package/dist/core/package-merge.js +0 -173
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The dependency system's public surface: a package declares which assets
3
+ * (`id` + `type` only) a consuming host library must provide, and derives a
4
+ * type contract for dependency injection from that declaration. Bytes,
5
+ * parameters, presets, and manifests always stay in the host library — a
6
+ * dependency source carries nothing but identity and kind.
7
+ */
8
+ import type { AudioManifestEntry, ChromaKeyVideoManifestEntry, ImageManifestEntry, SliceManifestEntry, VideoManifestEntry } from './manifest-entry.js';
9
+ export type FundusAssetKind = 'image' | 'slice' | 'video' | 'chroma-key-video' | 'audio';
10
+ export interface Dependency {
11
+ id: string;
12
+ type: FundusAssetKind;
13
+ }
14
+ /**
15
+ * A dependency after aggregation across sources (D3). Adds the `sources` that
16
+ * declared this id — the npm package names or config paths — so validation can
17
+ * point back at whoever requires a missing or mistyped asset. This is derived,
18
+ * not declared: a package still declares only `{ id, type }`.
19
+ */
20
+ export interface ResolvedDependency extends Dependency {
21
+ sources: readonly string[];
22
+ }
23
+ /**
24
+ * Renders declaring dependency sources as `"a", "b"` for a `required by …`
25
+ * clause. One formatter shared by validation messages, the editor inspector,
26
+ * and the delete confirmation so the wording never drifts.
27
+ */
28
+ export declare function formatRequiredBy(sources: readonly string[]): string;
29
+ /** Maps an asset kind onto its runtime manifest-entry type. */
30
+ export type EntryFor<K extends FundusAssetKind> = K extends 'image' ? ImageManifestEntry : K extends 'slice' ? SliceManifestEntry : K extends 'video' ? VideoManifestEntry : K extends 'chroma-key-video' ? ChromaKeyVideoManifestEntry : K extends 'audio' ? AudioManifestEntry : never;
31
+ /**
32
+ * Identity helper. Its only job is to preserve the literal `id`/`type` of each
33
+ * entry through `typeof`, so `ManifestContract<typeof deps>` is exact (D9). It
34
+ * adds no runtime behavior.
35
+ */
36
+ export declare function defineDependencies<const T extends readonly Dependency[]>(deps: T): T;
37
+ /**
38
+ * The exact, `readonly`, non-optional entry map a host must supply to satisfy a
39
+ * dependency list (D5): `{ [id]: EntryFor<type> }`. This is the type asserted at
40
+ * a package's `inject(manifest: ManifestContract<typeof deps>)` call site.
41
+ */
42
+ export type ManifestContract<T extends readonly Dependency[]> = {
43
+ readonly [E in T[number] as E['id']]: EntryFor<E['type']>;
44
+ };
45
+ export declare const FUNDUS_ASSET_KINDS: readonly FundusAssetKind[];
46
+ export declare function isFundusAssetKind(value: unknown): value is FundusAssetKind;
47
+ /**
48
+ * Runtime validation of one loaded dependency list (one source): an array of
49
+ * `{ id: non-empty string, type: FundusAssetKind }` with no duplicate id within
50
+ * the list. Throws with the source name on any violation.
51
+ */
52
+ export declare function validateDependencyList(source: string, value: unknown): Dependency[];
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Renders declaring dependency sources as `"a", "b"` for a `required by …`
3
+ * clause. One formatter shared by validation messages, the editor inspector,
4
+ * and the delete confirmation so the wording never drifts.
5
+ */
6
+ export function formatRequiredBy(sources) {
7
+ return sources.map((source) => `"${source}"`).join(', ');
8
+ }
9
+ /**
10
+ * Identity helper. Its only job is to preserve the literal `id`/`type` of each
11
+ * entry through `typeof`, so `ManifestContract<typeof deps>` is exact (D9). It
12
+ * adds no runtime behavior.
13
+ */
14
+ export function defineDependencies(deps) {
15
+ return deps;
16
+ }
17
+ export const FUNDUS_ASSET_KINDS = [
18
+ 'image',
19
+ 'slice',
20
+ 'video',
21
+ 'chroma-key-video',
22
+ 'audio'
23
+ ];
24
+ export function isFundusAssetKind(value) {
25
+ return typeof value === 'string' && FUNDUS_ASSET_KINDS.includes(value);
26
+ }
27
+ /**
28
+ * Runtime validation of one loaded dependency list (one source): an array of
29
+ * `{ id: non-empty string, type: FundusAssetKind }` with no duplicate id within
30
+ * the list. Throws with the source name on any violation.
31
+ */
32
+ export function validateDependencyList(source, value) {
33
+ if (!Array.isArray(value)) {
34
+ throw new Error(`Dependency source "${source}" must default-export an array of { id, type } entries.`);
35
+ }
36
+ const seen = new Set();
37
+ const result = [];
38
+ for (const entry of value) {
39
+ if (typeof entry !== 'object' || entry === null) {
40
+ throw new Error(`Dependency source "${source}": every entry must be an { id, type } object.`);
41
+ }
42
+ const { id, type } = entry;
43
+ if (typeof id !== 'string' || id.length === 0) {
44
+ throw new Error(`Dependency source "${source}": every entry needs a non-empty string "id".`);
45
+ }
46
+ if (!isFundusAssetKind(type)) {
47
+ throw new Error(`Dependency source "${source}": entry "${id}" has unknown type "${String(type)}".`);
48
+ }
49
+ if (seen.has(id)) {
50
+ throw new Error(`Dependency source "${source}": duplicate id "${id}".`);
51
+ }
52
+ seen.add(id);
53
+ result.push({ id, type });
54
+ }
55
+ return result;
56
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Validates a host library against an aggregated dependency list (D2). Deps are
3
+ * a lower bound: every declared id must exist with a matching type, but extra,
4
+ * undeclared assets are allowed. Pure — no environment access — so it can be
5
+ * fed into `check`, `build`, and the editor issues channel from one source.
6
+ *
7
+ * Findings are library-global and carry NO `assetId`: a dependency requirement
8
+ * isn't tied to an existing asset (a missing dependency has no asset at all), and
9
+ * the editor's issue banner only renders `assetId`-less issues (state.svelte.ts
10
+ * `generalIssues`). The declared id is embedded in the message, so nothing is
11
+ * lost; an `assetId` would route the finding to a possibly-nonexistent asset and
12
+ * hide it from the editor.
13
+ */
14
+ import type { ValidationIssueDto } from './api-types.js';
15
+ import { type ResolvedDependency } from './dependencies.js';
16
+ import type { Library } from './library.js';
17
+ export declare function validateDependencies(dependencies: readonly ResolvedDependency[], library: Library): ValidationIssueDto[];
@@ -0,0 +1,19 @@
1
+ import { formatRequiredBy } from './dependencies.js';
2
+ export function validateDependencies(dependencies, library) {
3
+ const findings = [];
4
+ for (const dependency of dependencies) {
5
+ if (!Object.hasOwn(library.assets, dependency.id)) {
6
+ findings.push({
7
+ message: `Missing ${dependency.type} "${dependency.id}" required by ${formatRequiredBy(dependency.sources)}.`
8
+ });
9
+ continue;
10
+ }
11
+ const record = library.assets[dependency.id];
12
+ if (record.type !== dependency.type) {
13
+ findings.push({
14
+ message: `Type mismatch for "${dependency.id}" required by ${formatRequiredBy(dependency.sources)}: expected ${dependency.type}, library has ${record.type}.`
15
+ });
16
+ }
17
+ }
18
+ return findings;
19
+ }
@@ -1,10 +1,5 @@
1
- export type { AssetId, ManifestName, AssetRecord, ManifestRecord, ImportSourceRecord, Library, EffectiveAssetRecord, EffectiveLibrary } from './library.js';
2
- export { createEmptyLibrary, parseLibrary, serializeLibrary, assertSafeKey, isRecord, parseImportSource, parseManifestRecord } from './library.js';
3
- export type { PackageAssetDeclaration, PackageDeclaration } from './package-declaration.js';
4
- export { parsePackageDeclaration, validatePackageDeclaration } from './package-declaration.js';
5
- export type { ParsedPackage, AssetProvenance, MergeProvenance, MergeFinding, MergeResult } from './package-merge.js';
6
- export { mergePackages, materializeLibrary, deepMergeParameters } from './package-merge.js';
7
- export { flatLibraryIssues } from './library-validation.js';
1
+ export type { AssetId, ManifestName, AssetRecord, ManifestRecord, ImportSourceRecord, Library } from './library.js';
2
+ export { createEmptyLibrary, parseLibrary, serializeLibrary } from './library.js';
8
3
  export { rawFileNameError, rawFilePathError, portableRawPathKey, isFundusTransactionName } from './raw-path.js';
9
4
  export { ROOT_FOLDER, FOLDER_SENTINEL, folderNameError, folderPathError, normalizeFolderPath, portableFolderPathKey, parentFolderPath, folderNameOf, joinFolderPath, folderOfRawPath, rawFileNameOfPath, isFolderOrDescendant, replaceFolderPrefix } from './folder-path.js';
10
5
  export { RESERVED_ASSET_IDS, isValidAssetId, assetIdError, manifestNameError } from './asset-id.js';
@@ -12,14 +7,17 @@ export type { ManifestColor } from './manifest-appearance.js';
12
7
  export { MANIFEST_COLORS, MANIFEST_EMOJIS, isManifestColor, isManifestEmoji, resolveManifestColor, manifestColorError, manifestEmojiError } from './manifest-appearance.js';
13
8
  export { acceptedExtensions, acceptedExtensionsForType, typesForFileName, proposeAssetId } from './ingest.js';
14
9
  export { canonicalizeParameters, compareCodeUnits } from './canonicalize.js';
15
- export type { FigmaImportScale, FundusConfig, PackageSource, SourceLocation, AssetReferenceTarget, UsageReference, ReferenceResult, UsageConfig, FundusAssetKind, PackageResourceInput, PackageDeclarationInput, PackageAssets } from './config.js';
16
- export { defineConfig, definePackage } from './config.js';
10
+ export type { FigmaImportScale, FundusConfig, SourceLocation, AssetReferenceTarget, UsageReference, ReferenceResult, UsageConfig } from './config.js';
11
+ export { defineConfig } from './config.js';
12
+ export type { Dependency, ResolvedDependency, FundusAssetKind, EntryFor, ManifestContract } from './dependencies.js';
13
+ export { defineDependencies, formatRequiredBy, isFundusAssetKind, validateDependencyList, FUNDUS_ASSET_KINDS } from './dependencies.js';
14
+ export { validateDependencies } from './dependency-validation.js';
17
15
  export type { SliceMode, SliceInsets, Slicing } from './slice-data.js';
18
16
  export { createZeroInsets, defaultInsetsForSize, slicedAxesFor, maxInset, maxOverdraw } from './slice-data.js';
19
17
  export type { AssetIdentified, ImageManifestEntry, SliceManifestEntry, VideoManifestEntry, ChromaKeyVideoManifestEntry, AudioManifestEntry, ManifestEntryData, ManifestEntry, ImagePreloadOptions, SlicePreloadOptions, VideoPreloadOptions, ChromaKeyVideoPreloadOptions, AudioPreloadOptions, PreloadOptions } from './manifest-entry.js';
20
18
  export type { ChromaKeyParameters } from './chroma-key.js';
21
19
  export { DEFAULT_CHROMA_KEY_PARAMETERS, validateChromaKeyParameters } from './chroma-key.js';
22
- export type { AssetOrigin, AssetStateDto, AssetReferenceLinkDto, AssetReferencesDto, PassiveManifestMembershipDto, PassiveMemberDto, ManifestMembershipDto, ProxyStateDto, PresetCapabilitiesDto, FundusStateDto, ValidationIssueDto, PatchAssetRequestDto, CreateFolderRequestDto, PatchFolderRequestDto, MoveAssetsRequestDto, DeleteAssetsRequestDto, CreateManifestRequestDto, PatchManifestRequestDto, RawIngestionQueueItemDto, NewRawIngestionQueueItemDto, EditedRawIngestionQueueItemDto, UnsupportedRawIngestionQueueItemDto, AdoptRawFileRequestDto, ResolveEditedRawFileRequestDto, ApiErrorDto, AssetUsageStatus, OpenableUsageReferenceDto, AssetUsageRootResultDto, AssetUsageRootDto, AssetUsageDto, UsageAnalysisDto } from './api-types.js';
20
+ export type { AssetStateDto, AssetReferenceLinkDto, AssetReferencesDto, PassiveManifestMembershipDto, PassiveMemberDto, ManifestMembershipDto, ProxyStateDto, PresetCapabilitiesDto, FundusStateDto, ValidationIssueDto, PatchAssetRequestDto, CreateFolderRequestDto, PatchFolderRequestDto, MoveAssetsRequestDto, DeleteAssetsRequestDto, CreateManifestRequestDto, PatchManifestRequestDto, RawIngestionQueueItemDto, NewRawIngestionQueueItemDto, EditedRawIngestionQueueItemDto, UnsupportedRawIngestionQueueItemDto, AdoptRawFileRequestDto, ResolveEditedRawFileRequestDto, ApiErrorDto, AssetUsageStatus, OpenableUsageReferenceDto, AssetUsageRootResultDto, AssetUsageRootDto, AssetUsageDto, UsageAnalysisDto } from './api-types.js';
23
21
  export type { SourceImportErrorCode } from './api-types.js';
24
22
  export type { AssetReference, CollectedReference } from './asset-reference.js';
25
23
  export { isAssetReference } from './asset-reference.js';
@@ -1,14 +1,13 @@
1
- export { createEmptyLibrary, parseLibrary, serializeLibrary, assertSafeKey, isRecord, parseImportSource, parseManifestRecord } from './library.js';
2
- export { parsePackageDeclaration, validatePackageDeclaration } from './package-declaration.js';
3
- export { mergePackages, materializeLibrary, deepMergeParameters } from './package-merge.js';
4
- export { flatLibraryIssues } from './library-validation.js';
1
+ export { createEmptyLibrary, parseLibrary, serializeLibrary } from './library.js';
5
2
  export { rawFileNameError, rawFilePathError, portableRawPathKey, isFundusTransactionName } from './raw-path.js';
6
3
  export { ROOT_FOLDER, FOLDER_SENTINEL, folderNameError, folderPathError, normalizeFolderPath, portableFolderPathKey, parentFolderPath, folderNameOf, joinFolderPath, folderOfRawPath, rawFileNameOfPath, isFolderOrDescendant, replaceFolderPrefix } from './folder-path.js';
7
4
  export { RESERVED_ASSET_IDS, isValidAssetId, assetIdError, manifestNameError } from './asset-id.js';
8
5
  export { MANIFEST_COLORS, MANIFEST_EMOJIS, isManifestColor, isManifestEmoji, resolveManifestColor, manifestColorError, manifestEmojiError } from './manifest-appearance.js';
9
6
  export { acceptedExtensions, acceptedExtensionsForType, typesForFileName, proposeAssetId } from './ingest.js';
10
7
  export { canonicalizeParameters, compareCodeUnits } from './canonicalize.js';
11
- export { defineConfig, definePackage } from './config.js';
8
+ export { defineConfig } from './config.js';
9
+ export { defineDependencies, formatRequiredBy, isFundusAssetKind, validateDependencyList, FUNDUS_ASSET_KINDS } from './dependencies.js';
10
+ export { validateDependencies } from './dependency-validation.js';
12
11
  export { createZeroInsets, defaultInsetsForSize, slicedAxesFor, maxInset, maxOverdraw } from './slice-data.js';
13
12
  export { DEFAULT_CHROMA_KEY_PARAMETERS, validateChromaKeyParameters } from './chroma-key.js';
14
13
  export { isAssetReference } from './asset-reference.js';
@@ -45,27 +45,8 @@ export interface Library {
45
45
  assets: Record<AssetId, AssetRecord>;
46
46
  manifests: Record<ManifestName, ManifestRecord>;
47
47
  }
48
- /**
49
- * An asset record in the merged *effective* library, where `raw`/`rawHash` may
50
- * be absent — an unfilled Package **slot**. Every `Library` record is a valid
51
- * `EffectiveAssetRecord` (required fields satisfy optional ones), so single-root
52
- * callers are unaffected. The effective library lives in memory only and is
53
- * never serialized (a host `Library` always carries `raw`/`rawHash`).
54
- */
55
- export interface EffectiveAssetRecord extends Omit<AssetRecord, 'raw' | 'rawHash'> {
56
- raw?: string;
57
- rawHash?: string;
58
- }
59
- /** The host library with all Packages merged under it (host wins). In-memory only. */
60
- export interface EffectiveLibrary extends Omit<Library, 'assets'> {
61
- assets: Record<AssetId, EffectiveAssetRecord>;
62
- }
63
48
  /** A fresh, empty library. */
64
49
  export declare function createEmptyLibrary(): Library;
65
- export declare function isRecord(value: unknown): value is Record<string, unknown>;
66
- export declare function assertSafeKey(kind: 'asset' | 'manifest', key: string): void;
67
- export declare function parseImportSource(id: string, value: unknown): ImportSourceRecord;
68
- export declare function parseManifestRecord(name: string, value: Record<string, unknown>): ManifestRecord;
69
50
  /**
70
51
  * Parse and structurally validate a library file's JSON text. Throws with a
71
52
  * clear message on any malformed part; plugin parameter validation is a
@@ -3,7 +3,7 @@ import { folderPathError } from './folder-path.js';
3
3
  export function createEmptyLibrary() {
4
4
  return { version: 1, folders: [], assets: {}, manifests: {} };
5
5
  }
6
- export function isRecord(value) {
6
+ function isRecord(value) {
7
7
  return typeof value === 'object' && value !== null && !Array.isArray(value);
8
8
  }
9
9
  /**
@@ -13,12 +13,12 @@ export function isRecord(value) {
13
13
  * this is a validator concern (reported as issues, not parse failures).
14
14
  */
15
15
  const DANGEROUS_KEYS = ['__proto__', 'constructor', 'prototype'];
16
- export function assertSafeKey(kind, key) {
16
+ function assertSafeKey(kind, key) {
17
17
  if (DANGEROUS_KEYS.includes(key)) {
18
18
  throw new Error(`Library ${kind} key "${key}" is not allowed.`);
19
19
  }
20
20
  }
21
- export function parseImportSource(id, value) {
21
+ function parseImportSource(id, value) {
22
22
  if (!isRecord(value)) {
23
23
  throw new Error(`Library asset "${id}" has a non-object "importSource".`);
24
24
  }
@@ -64,7 +64,7 @@ function parseAssetRecord(id, value, version) {
64
64
  record.importSource = parseImportSource(id, value.importSource);
65
65
  return record;
66
66
  }
67
- export function parseManifestRecord(name, value) {
67
+ function parseManifestRecord(name, value) {
68
68
  const record = {};
69
69
  if ('color' in value && value.color !== undefined) {
70
70
  if (typeof value.color !== 'string') {
@@ -6,7 +6,7 @@
6
6
  * picture is computed; server processing, codegen, delivered-size accounting,
7
7
  * and the editor state payload all consume it — no parallel closure walks.
8
8
  */
9
- import type { AssetId, EffectiveLibrary, ManifestName } from './library.js';
9
+ import type { AssetId, Library, ManifestName } from './library.js';
10
10
  import { type ReferencesByAsset } from './reference-graph.js';
11
11
  /** One derived passive membership, with the attribution that explains it. */
12
12
  export interface PassiveMember {
@@ -47,7 +47,7 @@ export type LibraryMembership = Record<ManifestName, ManifestMembership>;
47
47
  * (`referenceClosure(explicit) − explicit`) with their via-attribution, and
48
48
  * the resulting delivery set.
49
49
  */
50
- export declare function computeLibraryMembership(library: EffectiveLibrary, referencesByAsset: ReferencesByAsset): LibraryMembership;
50
+ export declare function computeLibraryMembership(library: Library, referencesByAsset: ReferencesByAsset): LibraryMembership;
51
51
  /**
52
52
  * Every asset delivered by at least one manifest, explicitly or passively —
53
53
  * the processing set (assets outside it are inert). An asset is
@@ -7,7 +7,7 @@
7
7
  * enumerated (`collectAllReferences`) — no fs, no plugin introspection.
8
8
  */
9
9
  import type { CollectedReference } from './asset-reference.js';
10
- import type { AssetId, EffectiveLibrary } from './library.js';
10
+ import type { AssetId, Library } from './library.js';
11
11
  import type { ValidationIssueDto } from './api-types.js';
12
12
  import type { AssetTypePluginDescriptor } from './plugins/contract.js';
13
13
  /** The plugin registry shape shared by server and tests: type → descriptor. */
@@ -19,13 +19,13 @@ export type ReferencesByAsset = Record<AssetId, CollectedReference[]>;
19
19
  * whose type is unknown or whose parameters do not validate contribute no
20
20
  * references — those problems are reported by the regular validation pass.
21
21
  */
22
- export declare function collectAllReferences(library: EffectiveLibrary, plugins: PluginDescriptorRegistry): ReferencesByAsset;
22
+ export declare function collectAllReferences(library: Library, plugins: PluginDescriptorRegistry): ReferencesByAsset;
23
23
  /**
24
24
  * Reference *errors* (they block build/codegen): a reference to an unknown
25
25
  * asset, a target whose type is not among the field's expected types, and
26
26
  * cycles (composition is acyclic by nature).
27
27
  */
28
- export declare function referenceErrors(library: EffectiveLibrary, referencesByAsset: ReferencesByAsset): ValidationIssueDto[];
28
+ export declare function referenceErrors(library: Library, referencesByAsset: ReferencesByAsset): ValidationIssueDto[];
29
29
  /**
30
30
  * The transitive reference closure of a set of assets, including the starting
31
31
  * set — the assets that must be delivered so the starting set renders as
@@ -6,44 +6,30 @@
6
6
  import { loadConfig } from './config-loader.js';
7
7
  import { LibraryStore } from './library-store.js';
8
8
  import { processAssets } from './processing/processor.js';
9
- import { generateManifestModules, manifestModuleCollisionIssues } from './codegen.js';
10
- import { descriptorsByType, serverPluginsByType } from './plugins.js';
11
- import { formatCheckFinding, packageSlotFindings } from './check.js';
12
- import { collectAllReferences, computeLibraryMembership, flatLibraryIssues, materializeLibrary, mergePackages, typesForFileName } from '../core/index.js';
9
+ import { generateManifestModules } from './codegen.js';
10
+ import { serverPluginsByType } from './plugins.js';
11
+ import { formatCheckFinding } from './check.js';
12
+ import { typesForFileName, validateDependencies } from '../core/index.js';
13
13
  import { classifyRawDirectory } from './raw-reconciliation.js';
14
14
  import { rawSafetyIssues } from './raw-safety.js';
15
15
  export async function runBuild(projectRoot, registry = serverPluginsByType) {
16
16
  const config = await loadConfig(projectRoot);
17
17
  const store = new LibraryStore(config, registry);
18
- const host = await store.read();
19
- // Merge Packages under the host; validate the effective library; process +
20
- // generate over the materialized (raw-bearing) subset. Raw scans stay host.
21
- const { library: effective, provenance, findings: mergeFindings } = mergePackages(host, config.packages ?? []);
22
- const materialized = materializeLibrary(effective);
18
+ const library = await store.read();
23
19
  const descriptors = Object.values(registry).map((plugin) => plugin.descriptor);
24
20
  const compatibleTypes = (path) => typesForFileName(path, descriptors);
25
- const classification = await classifyRawDirectory(config.rawDir, host, (path) => compatibleTypes(path).length > 0);
26
- const referencesByAsset = collectAllReferences(effective, descriptorsByType(registry));
27
- const membership = computeLibraryMembership(effective, referencesByAsset);
21
+ const classification = await classifyRawDirectory(config.rawDir, library, (path) => compatibleTypes(path).length > 0);
28
22
  const issues = [
29
- ...mergeFindings
30
- .filter((finding) => finding.kind !== 'package-overridden')
31
- .map((finding) => ({ assetId: finding.assetId, message: finding.message })),
32
- ...(await store.validate(host, { flatSpace: false })),
33
- ...flatLibraryIssues(effective, descriptorsByType(registry)),
34
- ...manifestModuleCollisionIssues(effective.manifests),
35
- ...rawSafetyIssues(host, classification, compatibleTypes),
36
- ...packageSlotFindings(effective, provenance, membership).map((finding) => ({
37
- assetId: finding.assetId,
38
- message: finding.message
39
- }))
23
+ ...(await store.validate(library)),
24
+ ...rawSafetyIssues(library, classification, compatibleTypes),
25
+ ...validateDependencies(config.dependencies, library)
40
26
  ];
41
27
  if (issues.length > 0) {
42
28
  const lines = issues.map((issue) => ` - ${formatCheckFinding({ kind: 'validation', assetId: issue.assetId, message: issue.message })}`);
43
29
  throw new Error(`Library validation failed:\n${lines.join('\n')}`);
44
30
  }
45
- await store.syncFolders(host);
46
- const processing = await processAssets(config, materialized, registry);
47
- const codegen = await generateManifestModules(config, materialized, processing.proxies, registry);
31
+ await store.syncFolders(library);
32
+ const processing = await processAssets(config, library, registry);
33
+ const codegen = await generateManifestModules(config, library, processing.proxies, registry);
48
34
  return { processing, codegen };
49
35
  }
@@ -1,10 +1,10 @@
1
- import { type EffectiveLibrary, type Library, type LibraryMembership, type MergeProvenance, type ValidationIssueDto } from '../core/index.js';
1
+ import { type Library, type ValidationIssueDto } from '../core/index.js';
2
2
  import { type RawClassification } from './raw-reconciliation.js';
3
3
  import type { ServerPluginRegistry } from './plugins/contract.js';
4
4
  /** One machine-readable check finding (the `--json` failure-list shape, M9). */
5
5
  export interface CheckFinding {
6
6
  /** The failure category. */
7
- kind: 'validation' | 'proxy-missing' | 'proxy-unresolvable' | 'proxy-orphaned' | 'module-missing' | 'module-out-of-sync' | 'module-stray' | 'module-regeneration-failed' | 'unreachable-asset' | 'potential-image-duplicate' | 'raw-hash-drift' | 'raw-type-incompatible' | 'raw-scan-incomplete' | 'raw-unmanaged' | 'slot-unfilled' | 'slot-unmaterialized' | 'package-conflict' | 'package-type-mismatch';
7
+ kind: 'validation' | 'proxy-missing' | 'proxy-unresolvable' | 'proxy-orphaned' | 'module-missing' | 'module-out-of-sync' | 'module-stray' | 'module-regeneration-failed' | 'unreachable-asset' | 'potential-image-duplicate' | 'raw-hash-drift' | 'raw-type-incompatible' | 'raw-scan-incomplete' | 'raw-unmanaged';
8
8
  message: string;
9
9
  /** The asset the finding concerns, where applicable. */
10
10
  assetId?: string;
@@ -26,19 +26,9 @@ export interface CheckReport {
26
26
  manifestCount: number;
27
27
  }
28
28
  export interface CheckAdvisory {
29
- kind: 'usage-not-configured' | 'package-overridden';
29
+ kind: 'usage-not-configured';
30
30
  message: string;
31
- /** The asset a `package-overridden` advisory concerns. */
32
- assetId?: string;
33
31
  }
34
32
  export declare function runCheck(projectRoot: string, registry?: ServerPluginRegistry): Promise<CheckReport>;
35
33
  /** Pure expansion of a raw classification into canonical hard check findings. */
36
34
  export declare function rawCheckFindings(library: Library, raw: RawClassification, registry: ServerPluginRegistry, validationIssues: ValidationIssueDto[]): CheckFinding[];
37
- /**
38
- * The delivered-slot contract: a Package slot that is delivered (explicit member
39
- * or in a delivered manifest's reference closure) but has no host-supplied bytes
40
- * must be filled. A slot with an `importSource` is `slot-unmaterialized` (run
41
- * import); a slot with nothing is `slot-unfilled`. Inert (undelivered) slots
42
- * produce no finding.
43
- */
44
- export declare function packageSlotFindings(library: EffectiveLibrary, provenance: MergeProvenance, membership: LibraryMembership): CheckFinding[];
@@ -10,13 +10,13 @@
10
10
  import { existsSync } from 'node:fs';
11
11
  import { readFile } from 'node:fs/promises';
12
12
  import { join } from 'node:path';
13
- import { allDeliveredAssetIds, collectAllReferences, compareCodeUnits, computeLibraryMembership, flatLibraryIssues, materializeLibrary, mergePackages, rawFileNameOfPath, typesForFileName } from '../core/index.js';
13
+ import { collectAllReferences, compareCodeUnits, computeLibraryMembership, rawFileNameOfPath, typesForFileName, validateDependencies } from '../core/index.js';
14
14
  import { loadConfig, USAGE_NOT_CONFIGURED_MESSAGE } from './config-loader.js';
15
15
  import { LibraryStore } from './library-store.js';
16
16
  import { classifyRawDirectory } from './raw-reconciliation.js';
17
- import { buildManifestEntries, manifestModuleCollisionIssues, manifestModuleFileName, renderManifestModule, strayGeneratedModuleNames } from './codegen.js';
17
+ import { buildManifestEntries, manifestModuleFileName, renderManifestModule, strayGeneratedModuleNames } from './codegen.js';
18
18
  import { descriptorsByType, serverPluginsByType } from './plugins.js';
19
- import { expectedProxyRelativePath, isProxyFileName, readCurrentProxy } from './processing/processor.js';
19
+ import { deliveredAssetIds, expectedProxyRelativePath, isProxyFileName, readCurrentProxy } from './processing/processor.js';
20
20
  import { listRelativeFiles } from './folder-filesystem.js';
21
21
  import { ImageDuplicateDetector } from './image-duplicates.js';
22
22
  /** The human rendering of a finding — `[assetId] message`, as `fundus check` prints it. */
@@ -26,47 +26,18 @@ export function formatCheckFinding(finding) {
26
26
  export async function runCheck(projectRoot, registry = serverPluginsByType) {
27
27
  const config = await loadConfig(projectRoot);
28
28
  const store = new LibraryStore(config, registry);
29
- const host = await store.read();
30
- // Merge Packages under the host into one in-memory effective library. Raw
31
- // scans stay on the host (it owns the bytes); everything id-space runs over
32
- // the effective library; processing/codegen run over the materialized subset.
33
- const { library: effective, provenance, findings: mergeFindings } = mergePackages(host, config.packages ?? []);
34
- const materialized = materializeLibrary(effective);
29
+ const library = await store.read();
35
30
  const report = {
36
31
  errors: [],
37
32
  warnings: [],
38
33
  advisories: config.usage === null
39
34
  ? [{ kind: 'usage-not-configured', message: USAGE_NOT_CONFIGURED_MESSAGE }]
40
35
  : [],
41
- assetCount: Object.keys(effective.assets).length,
42
- manifestCount: Object.keys(effective.manifests).length
36
+ assetCount: Object.keys(library.assets).length,
37
+ manifestCount: Object.keys(library.manifests).length
43
38
  };
44
- // Merge findings: collisions/type-mismatches are hard errors; an active
45
- // override is an auditable, non-fatal advisory.
46
- for (const finding of mergeFindings) {
47
- if (finding.kind === 'package-overridden') {
48
- report.advisories.push({
49
- kind: 'package-overridden',
50
- message: finding.message,
51
- assetId: finding.assetId
52
- });
53
- }
54
- else {
55
- report.errors.push({
56
- kind: finding.kind,
57
- message: finding.message,
58
- assetId: finding.assetId
59
- });
60
- }
61
- }
62
- // 1. Library validation. Disk/host checks run on the host library; flat-space
63
- // checks (id/type/parameters/membership/appearance/references + module
64
- // collisions) run over the effective library.
65
- const issues = [
66
- ...(await store.validate(host, { flatSpace: false })),
67
- ...flatLibraryIssues(effective, descriptorsByType(registry)),
68
- ...manifestModuleCollisionIssues(effective.manifests)
69
- ];
39
+ // 1. Library validation (structure, parameters, raw pointers, references).
40
+ const issues = await store.validate(library);
70
41
  const validationKeys = new Set();
71
42
  for (const issue of issues) {
72
43
  const key = `${issue.assetId ?? ''}|${issue.message}`;
@@ -79,25 +50,26 @@ export async function runCheck(projectRoot, registry = serverPluginsByType) {
79
50
  ...(issue.assetId !== undefined ? { assetId: issue.assetId } : {})
80
51
  });
81
52
  }
53
+ // Declared dependencies the host library must satisfy (a hard error, but kept
54
+ // out of `store.validate` so it never gates processing/codegen).
55
+ for (const finding of validateDependencies(config.dependencies, library)) {
56
+ report.errors.push({
57
+ kind: 'validation',
58
+ message: finding.message,
59
+ ...(finding.assetId !== undefined ? { assetId: finding.assetId } : {})
60
+ });
61
+ }
82
62
  const descriptors = Object.values(registry).map((plugin) => plugin.descriptor);
83
- const raw = await classifyRawDirectory(config.rawDir, host, (path) => typesForFileName(path, descriptors).length > 0);
84
- report.errors.push(...rawCheckFindings(host, raw, registry, issues));
85
- // Delivered set + membership over the effective library, so delivered slots
86
- // are analysed and cross-Package references resolve.
87
- const referencesByAsset = collectAllReferences(effective, descriptorsByType(registry));
88
- const membership = computeLibraryMembership(effective, referencesByAsset);
89
- const delivered = allDeliveredAssetIds(membership);
90
- report.errors.push(...packageSlotFindings(effective, provenance, membership));
63
+ const raw = await classifyRawDirectory(config.rawDir, library, (path) => typesForFileName(path, descriptors).length > 0);
64
+ report.errors.push(...rawCheckFindings(library, raw, registry, issues));
91
65
  // 2. Proxies: every delivered asset's expected proxy exists (staleness is a
92
- // name check), and the proxy directory holds no orphans. Raw-less delivered
93
- // slots are covered by the slot findings above and skipped here.
66
+ // name check), and the proxy directory holds no orphans.
67
+ const delivered = deliveredAssetIds(library, registry);
94
68
  const expectedProxyPaths = new Set();
95
69
  const proxies = {};
96
70
  let proxiesComplete = true;
97
71
  for (const assetId of [...delivered].sort(compareCodeUnits)) {
98
- const record = materialized.assets[assetId];
99
- if (!record)
100
- continue;
72
+ const record = library.assets[assetId];
101
73
  let proxy;
102
74
  try {
103
75
  proxy = await readCurrentProxy(assetId, record, config, registry);
@@ -145,12 +117,12 @@ export async function runCheck(projectRoot, registry = serverPluginsByType) {
145
117
  // regeneration. Only meaningful when validation passed and every proxy
146
118
  // exists — otherwise regeneration is impossible and already reported.
147
119
  if (report.errors.length === 0 && proxiesComplete) {
148
- await checkGeneratedModules(report, materialized, config, proxies, registry);
149
- await checkStrayModules(report, materialized, config);
120
+ await checkGeneratedModules(report, library, config, proxies, registry);
121
+ await checkStrayModules(report, library, config);
150
122
  }
151
123
  // 4. Advisory warnings. Raw drift is always a hard CI failure.
152
- collectUnreachableAssets(report, effective, provenance, delivered);
153
- collectPotentialImageDuplicates(report, await new ImageDuplicateDetector().find(host, config.rawDir));
124
+ collectUnreachableAssets(report, library, delivered);
125
+ collectPotentialImageDuplicates(report, await new ImageDuplicateDetector().find(library, config.rawDir));
154
126
  report.errors.sort((left, right) => compareCodeUnits(`${left.fileName ?? ''}|${left.assetId ?? ''}|${left.kind}|${left.message}`, `${right.fileName ?? ''}|${right.assetId ?? ''}|${right.kind}|${right.message}`));
155
127
  report.warnings.sort((left, right) => compareCodeUnits(`${left.assetId ?? ''}|${left.kind}|${left.message}`, `${right.assetId ?? ''}|${right.kind}|${right.message}`));
156
128
  return report;
@@ -291,66 +263,15 @@ async function checkStrayModules(report, library, config) {
291
263
  * no explicit membership AND no passive membership in any manifest. An asset
292
264
  * that is only passively delivered (referenced by a delivered asset) is fine.
293
265
  */
294
- function collectUnreachableAssets(report, library, provenance, delivered) {
295
- for (const [assetId, record] of Object.entries(library.assets)) {
296
- if (record.manifests.length !== 0 || delivered.has(assetId))
297
- continue;
298
- // An inert, unfilled Package slot is not a host mistake — a Package ships
299
- // a superset of slots and the app delivers a subset. Only host/override
300
- // assets (and filled slots) warn.
301
- if (record.raw === undefined && provenance[assetId]?.source === 'package')
302
- continue;
303
- report.warnings.push({
304
- kind: 'unreachable-asset',
305
- message: 'In no manifest and not referenced by any delivered asset — ' +
306
- 'nothing is processed or generated for it.',
307
- assetId
308
- });
309
- }
310
- }
311
- /**
312
- * The delivered-slot contract: a Package slot that is delivered (explicit member
313
- * or in a delivered manifest's reference closure) but has no host-supplied bytes
314
- * must be filled. A slot with an `importSource` is `slot-unmaterialized` (run
315
- * import); a slot with nothing is `slot-unfilled`. Inert (undelivered) slots
316
- * produce no finding.
317
- */
318
- export function packageSlotFindings(library, provenance, membership) {
319
- const deliveringManifests = new Map();
320
- for (const [name, manifestMembership] of Object.entries(membership)) {
321
- for (const assetId of manifestMembership.deliveredAssetIds) {
322
- const names = deliveringManifests.get(assetId) ?? [];
323
- names.push(name);
324
- deliveringManifests.set(assetId, names);
325
- }
326
- }
327
- const findings = [];
266
+ function collectUnreachableAssets(report, library, delivered) {
328
267
  for (const [assetId, record] of Object.entries(library.assets)) {
329
- if (record.raw !== undefined)
330
- continue;
331
- const names = deliveringManifests.get(assetId);
332
- if (!names || names.length === 0)
333
- continue;
334
- const originRecord = provenance[assetId];
335
- const origin = originRecord && originRecord.source !== 'host' ? originRecord.origin : 'a package';
336
- const deliveredBy = [...names]
337
- .sort(compareCodeUnits)
338
- .map((name) => `"${name}"`)
339
- .join(', ');
340
- if (record.importSource !== undefined) {
341
- findings.push({
342
- kind: 'slot-unmaterialized',
343
- assetId,
344
- message: `Slot "${assetId}" (from ${origin}) has an import source but no bytes yet — run import to fill it. Delivered by: ${deliveredBy}.`
345
- });
346
- }
347
- else {
348
- findings.push({
349
- kind: 'slot-unfilled',
350
- assetId,
351
- message: `Slot "${assetId}" (from ${origin}) has no bytes, import source, or host override. Delivered by: ${deliveredBy}.`
268
+ if (record.manifests.length === 0 && !delivered.has(assetId)) {
269
+ report.warnings.push({
270
+ kind: 'unreachable-asset',
271
+ message: 'In no manifest and not referenced by any delivered asset — ' +
272
+ 'nothing is processed or generated for it.',
273
+ assetId
352
274
  });
353
275
  }
354
276
  }
355
- return findings;
356
277
  }
@@ -1,4 +1,4 @@
1
- import { type AssetRecord, type Library, type ManifestEntry, type ManifestEntryData, type ManifestMembership, type ManifestName, type ManifestRecord, type ReferencesByAsset, type ValidationIssueDto } from '../core/index.js';
1
+ import { type AssetRecord, type Library, type ManifestEntry, type ManifestEntryData, type ManifestMembership, type ReferencesByAsset } from '../core/index.js';
2
2
  import type { SourceLocation } from '../core/index.js';
3
3
  import type { ResolvedFundusConfig } from './config-loader.js';
4
4
  import type { ServerPluginRegistry } from './plugins/contract.js';
@@ -10,8 +10,6 @@ export declare function locateGeneratedAssetDeclaration(file: string, source: st
10
10
  export declare function kebabCaseFromCamel(name: string): string;
11
11
  /** Generated module file name for a manifest. */
12
12
  export declare function manifestModuleFileName(manifestName: string): string;
13
- /** Two manifest names that would generate the same kebab-case module file. */
14
- export declare function manifestModuleCollisionIssues(manifests: Record<ManifestName, ManifestRecord>): ValidationIssueDto[];
15
13
  /**
16
14
  * Build the entry data codegen emits for one asset — delegated to
17
15
  * the owning server plugin's `buildManifestEntry`. Reference fields