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.
- package/README.md +60 -121
- package/build/client/_app/immutable/assets/2.C-1MfvLQ.css +1 -0
- package/build/client/_app/immutable/assets/2.C-1MfvLQ.css.br +0 -0
- package/build/client/_app/immutable/assets/2.C-1MfvLQ.css.gz +0 -0
- package/build/client/_app/immutable/assets/{3.66PJT3JC.css → 3.q3CUOEpz.css} +1 -1
- package/build/client/_app/immutable/assets/3.q3CUOEpz.css.br +0 -0
- package/build/client/_app/immutable/assets/3.q3CUOEpz.css.gz +0 -0
- package/build/client/_app/immutable/assets/{AssetSourceMenu.Buj2UxUg.css → AssetSourceMenu.CgyMTAb6.css} +1 -1
- package/build/client/_app/immutable/assets/AssetSourceMenu.CgyMTAb6.css.br +0 -0
- package/build/client/_app/immutable/assets/AssetSourceMenu.CgyMTAb6.css.gz +0 -0
- package/build/client/_app/immutable/chunks/Bly9uffh.js +1 -0
- package/build/client/_app/immutable/chunks/Bly9uffh.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bly9uffh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{R0o69z6O.js → BpsKkIFc.js} +1 -1
- package/build/client/_app/immutable/chunks/BpsKkIFc.js.br +2 -0
- package/build/client/_app/immutable/chunks/BpsKkIFc.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{jEVVu5G9.js → CrIZjnDr.js} +1 -1
- package/build/client/_app/immutable/chunks/CrIZjnDr.js.br +0 -0
- package/build/client/_app/immutable/chunks/CrIZjnDr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ZGU9Utak.js +108 -0
- package/build/client/_app/immutable/chunks/ZGU9Utak.js.br +0 -0
- package/build/client/_app/immutable/chunks/ZGU9Utak.js.gz +0 -0
- package/build/client/_app/immutable/chunks/lw3KP4og.js +2 -0
- package/build/client/_app/immutable/chunks/lw3KP4og.js.br +0 -0
- package/build/client/_app/immutable/chunks/lw3KP4og.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DxYfHxs-.js → app.D-lO1MC-.js} +2 -2
- package/build/client/_app/immutable/entry/app.D-lO1MC-.js.br +0 -0
- package/build/client/_app/immutable/entry/app.D-lO1MC-.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.BrSEFrid.js +1 -0
- package/build/client/_app/immutable/entry/start.BrSEFrid.js.br +1 -0
- package/build/client/_app/immutable/entry/start.BrSEFrid.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.Do0MsVUC.js → 0.BPGg3A-F.js} +1 -1
- package/build/client/_app/immutable/nodes/0.BPGg3A-F.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.BPGg3A-F.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.DhfAdUbg.js → 1.-VJ5Mlss.js} +1 -1
- package/build/client/_app/immutable/nodes/1.-VJ5Mlss.js.br +1 -0
- package/build/client/_app/immutable/nodes/1.-VJ5Mlss.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.Dhyvb4bF.js +3 -0
- package/build/client/_app/immutable/nodes/2.Dhyvb4bF.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.Dhyvb4bF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.D9Fgsq-b.js +1 -0
- package/build/client/_app/immutable/nodes/3.D9Fgsq-b.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.D9Fgsq-b.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.gPNAednG.js → 4.DErtysFP.js} +1 -1
- package/build/client/_app/immutable/nodes/4.DErtysFP.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DErtysFP.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/handler.js +7 -7
- package/build/index.js +7 -7
- package/build/server/chunks/chunks/{context.js-Dh0ibRIF.js → context.js-BIgcUcEl.js} +216 -604
- package/build/server/chunks/chunks/context.js-BIgcUcEl.js.map +1 -0
- package/build/server/chunks/chunks/{contract.js-_LTMZBo2.js → contract.js-B6KBK8D9.js} +59 -95
- package/build/server/chunks/chunks/contract.js-B6KBK8D9.js.map +1 -0
- package/build/server/chunks/chunks/{core.js-CTyKR4bu.js → core.js-Bp-ReC60.js} +38 -38
- package/build/server/chunks/chunks/core.js-Bp-ReC60.js.map +1 -0
- package/build/server/chunks/chunks/dependencies.js-pUkjICr5.js +45 -0
- package/build/server/chunks/chunks/dependencies.js-pUkjICr5.js.map +1 -0
- package/build/server/chunks/chunks/{exports.js-gUMFfqhw.js → exports.js-bhKV7cEL.js} +2 -2
- package/build/server/chunks/chunks/{exports.js-gUMFfqhw.js.map → exports.js-bhKV7cEL.js.map} +1 -1
- package/build/server/chunks/chunks/{http.js-BiqUcAuu.js → http.js-BTq44nR5.js} +2 -2
- package/build/server/chunks/chunks/{http.js-BiqUcAuu.js.map → http.js-BTq44nR5.js.map} +1 -1
- package/build/server/chunks/chunks/{internal.js-DvC1GD8s.js → internal.js-7MmaxxwZ.js} +3 -3
- package/build/server/chunks/chunks/{internal.js-DvC1GD8s.js.map → internal.js-7MmaxxwZ.js.map} +1 -1
- package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -1
- package/build/server/chunks/chunks/{manifest-membership.js-at1ixQdW.js → manifest-membership.js-Dj3WwZgz.js} +2 -2
- package/build/server/chunks/chunks/{manifest-membership.js-at1ixQdW.js.map → manifest-membership.js-Dj3WwZgz.js.map} +1 -1
- package/build/server/chunks/chunks/{raw-reconciliation.js-CUH8IIJx.js → raw-reconciliation.js-mWOAOdgL.js} +3 -3
- package/build/server/chunks/chunks/raw-reconciliation.js-mWOAOdgL.js.map +1 -0
- package/build/server/chunks/chunks/{raw-reconciliation2.js-z4xl5zw2.js → raw-reconciliation2.js-Bo1jJgvd.js} +2 -2
- package/build/server/chunks/chunks/{raw-reconciliation2.js-z4xl5zw2.js.map → raw-reconciliation2.js-Bo1jJgvd.js.map} +1 -1
- package/build/server/chunks/chunks/{shared.js-nXNT--BO.js → shared.js-B0m3s2U9.js} +2 -2
- package/build/server/chunks/chunks/{shared.js-nXNT--BO.js.map → shared.js-B0m3s2U9.js.map} +1 -1
- package/build/server/chunks/chunks/{utils.js-C5pr7OK-.js → utils.js-BXV0zq44.js} +3 -3
- package/build/server/chunks/chunks/{utils.js-C5pr7OK-.js.map → utils.js-BXV0zq44.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CdDjuW0r.js → _server.ts.js-B_aa_zh7.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CdDjuW0r.js.map → _server.ts.js-B_aa_zh7.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-OWM1eORG.js → _server.ts.js-DbEPdkbO.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-OWM1eORG.js.map → _server.ts.js-DbEPdkbO.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-DoG-7ZpZ.js → _server.ts.js-BzA96yBM.js} +8 -8
- 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
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-CAWjVeGd.js → _server.ts.js-fQAXFRLh.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-CAWjVeGd.js.map → _server.ts.js-fQAXFRLh.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/retag/{_server.ts.js-CqS4aALY.js → _server.ts.js-RTBrlhk5.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/assets/_id_/retag/{_server.ts.js-CqS4aALY.js.map → _server.ts.js-RTBrlhk5.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-Bo_EsYXJ.js → _server.ts.js-Baz4gPRd.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-Bo_EsYXJ.js.map → _server.ts.js-Baz4gPRd.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-DW4w0XAr.js → _server.ts.js-CnqdPxWQ.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-DW4w0XAr.js.map → _server.ts.js-CnqdPxWQ.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-_MiNPnSy.js → _server.ts.js-bvrtSRDz.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-_MiNPnSy.js.map → _server.ts.js-bvrtSRDz.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-DwbrQnBc.js → _server.ts.js-cgYcVXgU.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-DwbrQnBc.js.map → _server.ts.js-cgYcVXgU.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-CEnHQf3b.js → _server.ts.js-DbXw3YEr.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-CEnHQf3b.js.map → _server.ts.js-DbXw3YEr.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BZDuJZtF.js → _server.ts.js-D0PEYlzG.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BZDuJZtF.js.map → _server.ts.js-D0PEYlzG.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-DRgdpKKd.js → _server.ts.js-Dt9Wfgs7.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-DRgdpKKd.js.map → _server.ts.js-Dt9Wfgs7.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-CP5QyIhz.js → _server.ts.js-BBuZYakQ.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-CP5QyIhz.js.map → _server.ts.js-BBuZYakQ.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BKEvt065.js → _server.ts.js-DQ_CWMTu.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BKEvt065.js.map → _server.ts.js-DQ_CWMTu.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-C_zihkDS.js → _server.ts.js-B3TVoDCl.js} +8 -8
- 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
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-watkBmy6.js → _server.ts.js--2C2x6Q0.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-watkBmy6.js.map → _server.ts.js--2C2x6Q0.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-YtumLIou.js → _server.ts.js-DD2Hz15k.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-YtumLIou.js.map → _server.ts.js-DD2Hz15k.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-Dkouuu-M.js → _server.ts.js-Ei98ilB5.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-Dkouuu-M.js.map → _server.ts.js-Ei98ilB5.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-DwsEQeuf.js → _server.ts.js-NNuDGwyK.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-DwsEQeuf.js.map → _server.ts.js-NNuDGwyK.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/usage/{_server.ts.js-CdQxfhV3.js → _server.ts.js-6_Wl_k0H.js} +8 -8
- package/build/server/chunks/entries/endpoints/api/usage/{_server.ts.js-CdQxfhV3.js.map → _server.ts.js-6_Wl_k0H.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DDdMocWj.js → _server.ts.js-DkYQlG9U.js} +6 -6
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DDdMocWj.js.map → _server.ts.js-DkYQlG9U.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-DbzjbH32.js → _server.ts.js-Dft0Zgh3.js} +8 -8
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-DbzjbH32.js.map → _server.ts.js-Dft0Zgh3.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-K_JbXZsU.js → _server.ts.js-rlV0QRQS.js} +8 -8
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-K_JbXZsU.js.map → _server.ts.js-rlV0QRQS.js.map} +1 -1
- package/build/server/chunks/entries/{hooks.server.js-DgZAVFbQ.js → hooks.server.js-C345JVQ2.js} +7 -7
- package/build/server/chunks/entries/{hooks.server.js-DgZAVFbQ.js.map → hooks.server.js-C345JVQ2.js.map} +1 -1
- package/build/server/chunks/{handler-C4m7sKKb.js → handler-C_S3CtEF.js} +5 -5
- package/build/server/chunks/{handler-C4m7sKKb.js.map → handler-C_S3CtEF.js.map} +1 -1
- package/build/server/chunks/{index.js-pAnkrzRH.js → index.js-CSCxgyyg.js} +5 -5
- package/build/server/chunks/{index.js-pAnkrzRH.js.map → index.js-CSCxgyyg.js.map} +1 -1
- package/build/server/chunks/{manifest.js-CXQHeYnS.js → manifest.js-CO6AjAUm.js} +30 -30
- package/build/server/chunks/{manifest.js-CXQHeYnS.js.map → manifest.js-CO6AjAUm.js.map} +1 -1
- package/build/server/chunks/nodes/{0.js-lmQMhWZd.js → 0.js-CRc8onmc.js} +2 -2
- package/build/server/chunks/nodes/{0.js-lmQMhWZd.js.map → 0.js-CRc8onmc.js.map} +1 -1
- package/build/server/chunks/nodes/1.js-CZm_Doa7.js +7 -0
- package/build/server/chunks/nodes/{1.js-CdH3UJI2.js.map → 1.js-CZm_Doa7.js.map} +1 -1
- package/build/server/chunks/nodes/2.js-B92vn1Hu.js +7 -0
- package/build/server/chunks/nodes/2.js-B92vn1Hu.js.map +1 -0
- package/build/server/chunks/nodes/3.js-C14BP7Jm.js +7 -0
- package/build/server/chunks/nodes/3.js-C14BP7Jm.js.map +1 -0
- package/build/server/chunks/nodes/4.js-BLNdVCa1.js +7 -0
- package/build/server/chunks/nodes/{4.js-DtgDNAZF.js.map → 4.js-BLNdVCa1.js.map} +1 -1
- package/dist/config.d.ts +5 -3
- package/dist/config.js +3 -2
- package/dist/core/api-types.d.ts +7 -22
- package/dist/core/config.d.ts +8 -82
- package/dist/core/config.js +0 -9
- package/dist/core/dependencies.d.ts +52 -0
- package/dist/core/dependencies.js +56 -0
- package/dist/core/dependency-validation.d.ts +17 -0
- package/dist/core/dependency-validation.js +19 -0
- package/dist/core/index.d.ts +8 -10
- package/dist/core/index.js +4 -5
- package/dist/core/library.d.ts +0 -19
- package/dist/core/library.js +4 -4
- package/dist/core/manifest-membership.d.ts +2 -2
- package/dist/core/reference-graph.d.ts +3 -3
- package/dist/server/build.js +12 -26
- package/dist/server/check.d.ts +3 -13
- package/dist/server/check.js +33 -112
- package/dist/server/codegen.d.ts +1 -3
- package/dist/server/codegen.js +0 -18
- package/dist/server/config-loader.d.ts +10 -33
- package/dist/server/config-loader.js +87 -156
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/library-store.d.ts +1 -11
- package/dist/server/library-store.js +60 -42
- package/dist/server/operations.js +54 -161
- package/package.json +1 -1
- package/build/client/_app/immutable/assets/2.X44Wyac-.css +0 -1
- package/build/client/_app/immutable/assets/2.X44Wyac-.css.br +0 -0
- package/build/client/_app/immutable/assets/2.X44Wyac-.css.gz +0 -0
- package/build/client/_app/immutable/assets/3.66PJT3JC.css.br +0 -0
- package/build/client/_app/immutable/assets/3.66PJT3JC.css.gz +0 -0
- package/build/client/_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css.br +0 -0
- package/build/client/_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css.gz +0 -0
- package/build/client/_app/immutable/chunks/0SQyBKXe.js +0 -108
- package/build/client/_app/immutable/chunks/0SQyBKXe.js.br +0 -0
- package/build/client/_app/immutable/chunks/0SQyBKXe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DXiUbZ9S.js +0 -2
- package/build/client/_app/immutable/chunks/DXiUbZ9S.js.br +0 -0
- package/build/client/_app/immutable/chunks/DXiUbZ9S.js.gz +0 -0
- package/build/client/_app/immutable/chunks/R0o69z6O.js.br +0 -0
- package/build/client/_app/immutable/chunks/R0o69z6O.js.gz +0 -0
- package/build/client/_app/immutable/chunks/TrnW_5ju.js +0 -1
- package/build/client/_app/immutable/chunks/TrnW_5ju.js.br +0 -0
- package/build/client/_app/immutable/chunks/TrnW_5ju.js.gz +0 -0
- package/build/client/_app/immutable/chunks/jEVVu5G9.js.br +0 -0
- package/build/client/_app/immutable/chunks/jEVVu5G9.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DxYfHxs-.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DxYfHxs-.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CdM7ozdO.js +0 -1
- package/build/client/_app/immutable/entry/start.CdM7ozdO.js.br +0 -0
- package/build/client/_app/immutable/entry/start.CdM7ozdO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.Do0MsVUC.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.Do0MsVUC.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.DhfAdUbg.js.br +0 -1
- package/build/client/_app/immutable/nodes/1.DhfAdUbg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.lLNAdU5s.js +0 -3
- package/build/client/_app/immutable/nodes/2.lLNAdU5s.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.lLNAdU5s.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.DA8xzCvA.js +0 -1
- package/build/client/_app/immutable/nodes/3.DA8xzCvA.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.DA8xzCvA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.gPNAednG.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.gPNAednG.js.gz +0 -0
- package/build/server/chunks/chunks/context.js-Dh0ibRIF.js.map +0 -1
- package/build/server/chunks/chunks/contract.js-_LTMZBo2.js.map +0 -1
- package/build/server/chunks/chunks/core.js-CTyKR4bu.js.map +0 -1
- package/build/server/chunks/chunks/raw-reconciliation.js-CUH8IIJx.js.map +0 -1
- package/build/server/chunks/nodes/1.js-CdH3UJI2.js +0 -7
- package/build/server/chunks/nodes/2.js-BHnsJqcE.js +0 -7
- package/build/server/chunks/nodes/2.js-BHnsJqcE.js.map +0 -1
- package/build/server/chunks/nodes/3.js-cR9NdrYS.js +0 -7
- package/build/server/chunks/nodes/3.js-cR9NdrYS.js.map +0 -1
- package/build/server/chunks/nodes/4.js-DtgDNAZF.js +0 -7
- package/dist/core/library-validation.d.ts +0 -13
- package/dist/core/library-validation.js +0 -48
- package/dist/core/package-declaration.d.ts +0 -43
- package/dist/core/package-declaration.js +0 -80
- package/dist/core/package-merge.d.ts +0 -65
- 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
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export type { AssetId, ManifestName, AssetRecord, ManifestRecord, ImportSourceRecord, Library
|
|
2
|
-
export { createEmptyLibrary, parseLibrary, serializeLibrary
|
|
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,
|
|
16
|
-
export { defineConfig
|
|
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 {
|
|
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';
|
package/dist/core/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export { createEmptyLibrary, parseLibrary, serializeLibrary
|
|
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
|
|
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';
|
package/dist/core/library.d.ts
CHANGED
|
@@ -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
|
package/dist/core/library.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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:
|
|
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,
|
|
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:
|
|
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:
|
|
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
|
package/dist/server/build.js
CHANGED
|
@@ -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
|
|
10
|
-
import {
|
|
11
|
-
import { formatCheckFinding
|
|
12
|
-
import {
|
|
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
|
|
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,
|
|
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
|
-
...
|
|
30
|
-
|
|
31
|
-
|
|
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(
|
|
46
|
-
const processing = await processAssets(config,
|
|
47
|
-
const codegen = await generateManifestModules(config,
|
|
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
|
}
|
package/dist/server/check.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
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'
|
|
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'
|
|
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[];
|
package/dist/server/check.js
CHANGED
|
@@ -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 {
|
|
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,
|
|
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
|
|
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(
|
|
42
|
-
manifestCount: Object.keys(
|
|
36
|
+
assetCount: Object.keys(library.assets).length,
|
|
37
|
+
manifestCount: Object.keys(library.manifests).length
|
|
43
38
|
};
|
|
44
|
-
//
|
|
45
|
-
|
|
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,
|
|
84
|
-
report.errors.push(...rawCheckFindings(
|
|
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.
|
|
93
|
-
|
|
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 =
|
|
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,
|
|
149
|
-
await checkStrayModules(report,
|
|
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,
|
|
153
|
-
collectPotentialImageDuplicates(report, await new ImageDuplicateDetector().find(
|
|
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,
|
|
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.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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
|
}
|
package/dist/server/codegen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AssetRecord, type Library, type ManifestEntry, type ManifestEntryData, type ManifestMembership, type
|
|
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
|