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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"2.js-BHnsJqcE.js","sources":["../../../../.svelte-kit/output/server/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nexport const imports = [\"_app/immutable/nodes/2.lLNAdU5s.js\",\"_app/immutable/chunks/Z8rcWjXZ.js\",\"_app/immutable/chunks/TrnW_5ju.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/R0o69z6O.js\",\"_app/immutable/chunks/DXiUbZ9S.js\",\"_app/immutable/chunks/0SQyBKXe.js\",\"_app/immutable/chunks/jEVVu5G9.js\",\"_app/immutable/chunks/BmOjTxFk.js\",\"_app/immutable/chunks/DY9QjkXW.js\"];\nexport const stylesheets = [\"_app/immutable/assets/ManifestSelector.Cue3sCA1.css\",\"_app/immutable/assets/Popover.CCTioPJZ.css\",\"_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css\",\"_app/immutable/assets/FileChangeBadge.C6wwUZJS.css\",\"_app/immutable/assets/2.X44Wyac-.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACT,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG,CAAC,qDAAqD,CAAC,4CAA4C,CAAC,oDAAoD,CAAC,oDAAoD,CAAC,sCAAsC;AACnQ,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const index = 3;
|
|
2
|
-
const imports = ["_app/immutable/nodes/3.DA8xzCvA.js","_app/immutable/chunks/Z8rcWjXZ.js","_app/immutable/chunks/TrnW_5ju.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/R0o69z6O.js","_app/immutable/chunks/DXiUbZ9S.js","_app/immutable/chunks/0SQyBKXe.js","_app/immutable/chunks/jEVVu5G9.js","_app/immutable/chunks/BmOjTxFk.js"];
|
|
3
|
-
const stylesheets = ["_app/immutable/assets/ManifestSelector.Cue3sCA1.css","_app/immutable/assets/Popover.CCTioPJZ.css","_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css","_app/immutable/assets/3.66PJT3JC.css"];
|
|
4
|
-
const fonts = [];
|
|
5
|
-
|
|
6
|
-
export { fonts, imports, index, stylesheets };
|
|
7
|
-
//# sourceMappingURL=3.js-cR9NdrYS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"3.js-cR9NdrYS.js","sources":["../../../../.svelte-kit/output/server/nodes/3.js"],"sourcesContent":["\n\nexport const index = 3;\nexport const imports = [\"_app/immutable/nodes/3.DA8xzCvA.js\",\"_app/immutable/chunks/Z8rcWjXZ.js\",\"_app/immutable/chunks/TrnW_5ju.js\",\"_app/immutable/chunks/xihTtKlq.js\",\"_app/immutable/chunks/R0o69z6O.js\",\"_app/immutable/chunks/DXiUbZ9S.js\",\"_app/immutable/chunks/0SQyBKXe.js\",\"_app/immutable/chunks/jEVVu5G9.js\",\"_app/immutable/chunks/BmOjTxFk.js\"];\nexport const stylesheets = [\"_app/immutable/assets/ManifestSelector.Cue3sCA1.css\",\"_app/immutable/assets/Popover.CCTioPJZ.css\",\"_app/immutable/assets/AssetSourceMenu.Buj2UxUg.css\",\"_app/immutable/assets/3.66PJT3JC.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACT,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChV,MAAC,WAAW,GAAG,CAAC,qDAAqD,CAAC,4CAA4C,CAAC,oDAAoD,CAAC,sCAAsC;AAC9M,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const index = 4;
|
|
2
|
-
const imports = ["_app/immutable/nodes/4.gPNAednG.js","_app/immutable/chunks/Z8rcWjXZ.js","_app/immutable/chunks/TrnW_5ju.js","_app/immutable/chunks/xihTtKlq.js","_app/immutable/chunks/DXiUbZ9S.js","_app/immutable/chunks/BmOjTxFk.js"];
|
|
3
|
-
const stylesheets = ["_app/immutable/assets/Popover.CCTioPJZ.css","_app/immutable/assets/4.C0QkCMQ4.css"];
|
|
4
|
-
const fonts = [];
|
|
5
|
-
|
|
6
|
-
export { fonts, imports, index, stylesheets };
|
|
7
|
-
//# sourceMappingURL=4.js-DtgDNAZF.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flat-space (id-space) library validation — the checks that must run over the
|
|
3
|
-
* *effective* (merged) library, because a host override record stores partial
|
|
4
|
-
* parameters that only validate once merged under its Package base, and a
|
|
5
|
-
* reference may cross the host/Package boundary. Pure and disk-free: id
|
|
6
|
-
* validity, unknown type, plugin parameter schema, manifest membership, manifest
|
|
7
|
-
* appearance tags, and reference errors. Disk/host-only checks (raw pointers,
|
|
8
|
-
* folders, `.gitkeep`) stay in `LibraryStore.validate`.
|
|
9
|
-
*/
|
|
10
|
-
import type { EffectiveLibrary } from './library.js';
|
|
11
|
-
import type { ValidationIssueDto } from './api-types.js';
|
|
12
|
-
import { type PluginDescriptorRegistry } from './reference-graph.js';
|
|
13
|
-
export declare function flatLibraryIssues(library: EffectiveLibrary, plugins: PluginDescriptorRegistry): ValidationIssueDto[];
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { assetIdError, manifestNameError } from './asset-id.js';
|
|
2
|
-
import { manifestColorError, manifestEmojiError } from './manifest-appearance.js';
|
|
3
|
-
import { collectAllReferences, referenceErrors } from './reference-graph.js';
|
|
4
|
-
export function flatLibraryIssues(library, plugins) {
|
|
5
|
-
const issues = [];
|
|
6
|
-
for (const [name, record] of Object.entries(library.manifests)) {
|
|
7
|
-
const nameProblem = manifestNameError(name);
|
|
8
|
-
if (nameProblem)
|
|
9
|
-
issues.push({ message: nameProblem });
|
|
10
|
-
if (record.color !== undefined) {
|
|
11
|
-
const colorProblem = manifestColorError(record.color);
|
|
12
|
-
if (colorProblem)
|
|
13
|
-
issues.push({ message: `Manifest "${name}": ${colorProblem}` });
|
|
14
|
-
}
|
|
15
|
-
if (record.emoji !== undefined) {
|
|
16
|
-
const emojiProblem = manifestEmojiError(record.emoji);
|
|
17
|
-
if (emojiProblem)
|
|
18
|
-
issues.push({ message: `Manifest "${name}": ${emojiProblem}` });
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
for (const [assetId, record] of Object.entries(library.assets)) {
|
|
22
|
-
const idProblem = assetIdError(assetId);
|
|
23
|
-
if (idProblem)
|
|
24
|
-
issues.push({ assetId, message: idProblem });
|
|
25
|
-
const plugin = plugins[record.type];
|
|
26
|
-
if (!plugin) {
|
|
27
|
-
issues.push({ assetId, message: `Unknown asset type "${record.type}".` });
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
try {
|
|
31
|
-
plugin.validateParameters(record.parameters);
|
|
32
|
-
}
|
|
33
|
-
catch (cause) {
|
|
34
|
-
issues.push({
|
|
35
|
-
assetId,
|
|
36
|
-
message: `Invalid parameters: ${cause instanceof Error ? cause.message : String(cause)}`
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
for (const manifest of record.manifests) {
|
|
41
|
-
if (!library.manifests[manifest]) {
|
|
42
|
-
issues.push({ assetId, message: `Unknown manifest "${manifest}".` });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
issues.push(...referenceErrors(library, collectAllReferences(library, plugins)));
|
|
47
|
-
return issues;
|
|
48
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type ImportSourceRecord, type ManifestName, type ManifestRecord, type AssetId } from './library.js';
|
|
2
|
-
/**
|
|
3
|
-
* A `fundus.package.json` — a Package's declaration file. Same structural model
|
|
4
|
-
* as a host `Library`, with two relaxations: assets are byte-less **slots**
|
|
5
|
-
* (no `raw`/`rawHash`) that carry an optional `importSource`, and `folders` are
|
|
6
|
-
* ignored (folder organisation is a host-editor concern). A declaration is
|
|
7
|
-
* read-only input — Fundus never writes to it; overriding a Package asset writes
|
|
8
|
-
* an override record into the *host* library.
|
|
9
|
-
*
|
|
10
|
-
* The declaration `version` is the declaration schema version, independent of a
|
|
11
|
-
* host `Library.version` (which gates `importSource` on v2). A Package always
|
|
12
|
-
* declares its `importSource` slots without that gate.
|
|
13
|
-
*/
|
|
14
|
-
export interface PackageAssetDeclaration {
|
|
15
|
-
/** Asset type — which plugin owns this asset ('image' | 'slice' | …). */
|
|
16
|
-
type: string;
|
|
17
|
-
/** Plugin-owned parameter blob. Validated later, over the merged library. */
|
|
18
|
-
parameters: unknown;
|
|
19
|
-
/** Manifest membership. */
|
|
20
|
-
manifests: ManifestName[];
|
|
21
|
-
/** Optional repeatable origin the host (or a slot fill) can materialize. */
|
|
22
|
-
importSource?: ImportSourceRecord;
|
|
23
|
-
}
|
|
24
|
-
export interface PackageDeclaration {
|
|
25
|
-
/** Declaration schema version — currently always 1. */
|
|
26
|
-
version: 1;
|
|
27
|
-
assets: Record<AssetId, PackageAssetDeclaration>;
|
|
28
|
-
manifests: Record<ManifestName, ManifestRecord>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Parse and structurally validate a `fundus.package.json` (JSON text). Delegates
|
|
32
|
-
* to {@link validatePackageDeclaration} after `JSON.parse`.
|
|
33
|
-
*/
|
|
34
|
-
export declare function parsePackageDeclaration(json: string, origin: string): PackageDeclaration;
|
|
35
|
-
/**
|
|
36
|
-
* Structurally validate an already-parsed package declaration — the shared core of
|
|
37
|
-
* both the JSON path ({@link parsePackageDeclaration}) and the TypeScript-module path
|
|
38
|
-
* (a `fundus.package.ts` default export loaded via jiti). Throws with a clear,
|
|
39
|
-
* origin-tagged message on any malformed part. Plugin parameter validation and
|
|
40
|
-
* id/manifest-name validity are separate steps that run over the merged
|
|
41
|
-
* (effective) library, not here — mirroring `parseLibrary`. `version` defaults to 1.
|
|
42
|
-
*/
|
|
43
|
-
export declare function validatePackageDeclaration(value: unknown, origin: string): PackageDeclaration;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { assertSafeKey, isRecord, parseImportSource, parseManifestRecord } from './library.js';
|
|
2
|
-
function parsePackageAsset(origin, id, value) {
|
|
3
|
-
if (!isRecord(value)) {
|
|
4
|
-
throw new Error(`Package "${origin}" asset "${id}" must be an object.`);
|
|
5
|
-
}
|
|
6
|
-
if (typeof value.type !== 'string' || value.type.length === 0) {
|
|
7
|
-
throw new Error(`Package "${origin}" asset "${id}" is missing a string "type".`);
|
|
8
|
-
}
|
|
9
|
-
if ('raw' in value || 'rawHash' in value) {
|
|
10
|
-
throw new Error(`Package "${origin}" asset "${id}" declares "raw"/"rawHash"; Packages ship byte-less slots only.`);
|
|
11
|
-
}
|
|
12
|
-
if (!Array.isArray(value.manifests) ||
|
|
13
|
-
value.manifests.some((entry) => typeof entry !== 'string')) {
|
|
14
|
-
throw new Error(`Package "${origin}" asset "${id}" must have a "manifests" array of strings.`);
|
|
15
|
-
}
|
|
16
|
-
// `parameters` is optional in the authored declaration — a resource is often just
|
|
17
|
-
// `{ type, manifests }`, a pure contract. Default to `{}`; the app's slot fill (and the
|
|
18
|
-
// merge over the effective library) supplies the real plugin parameters.
|
|
19
|
-
const record = {
|
|
20
|
-
type: value.type,
|
|
21
|
-
parameters: 'parameters' in value ? value.parameters : {},
|
|
22
|
-
manifests: value.manifests
|
|
23
|
-
};
|
|
24
|
-
if (value.importSource !== undefined) {
|
|
25
|
-
record.importSource = parseImportSource(id, value.importSource);
|
|
26
|
-
}
|
|
27
|
-
return record;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Parse and structurally validate a `fundus.package.json` (JSON text). Delegates
|
|
31
|
-
* to {@link validatePackageDeclaration} after `JSON.parse`.
|
|
32
|
-
*/
|
|
33
|
-
export function parsePackageDeclaration(json, origin) {
|
|
34
|
-
let value;
|
|
35
|
-
try {
|
|
36
|
-
value = JSON.parse(json);
|
|
37
|
-
}
|
|
38
|
-
catch (cause) {
|
|
39
|
-
throw new Error(`Package "${origin}" declaration is not valid JSON: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
40
|
-
}
|
|
41
|
-
return validatePackageDeclaration(value, origin);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Structurally validate an already-parsed package declaration — the shared core of
|
|
45
|
-
* both the JSON path ({@link parsePackageDeclaration}) and the TypeScript-module path
|
|
46
|
-
* (a `fundus.package.ts` default export loaded via jiti). Throws with a clear,
|
|
47
|
-
* origin-tagged message on any malformed part. Plugin parameter validation and
|
|
48
|
-
* id/manifest-name validity are separate steps that run over the merged
|
|
49
|
-
* (effective) library, not here — mirroring `parseLibrary`. `version` defaults to 1.
|
|
50
|
-
*/
|
|
51
|
-
export function validatePackageDeclaration(value, origin) {
|
|
52
|
-
if (!isRecord(value)) {
|
|
53
|
-
throw new Error(`Package "${origin}" declaration must be an object.`);
|
|
54
|
-
}
|
|
55
|
-
if (value.version !== undefined && value.version !== 1) {
|
|
56
|
-
throw new Error(`Package "${origin}" declaration has unsupported version ${JSON.stringify(value.version)} (expected 1).`);
|
|
57
|
-
}
|
|
58
|
-
if (!isRecord(value.assets)) {
|
|
59
|
-
throw new Error(`Package "${origin}" declaration "assets" must be an object.`);
|
|
60
|
-
}
|
|
61
|
-
if (value.manifests !== undefined && !isRecord(value.manifests)) {
|
|
62
|
-
throw new Error(`Package "${origin}" declaration "manifests" must be an object.`);
|
|
63
|
-
}
|
|
64
|
-
const assets = {};
|
|
65
|
-
for (const [id, record] of Object.entries(value.assets)) {
|
|
66
|
-
assertSafeKey('asset', id);
|
|
67
|
-
assets[id] = parsePackageAsset(origin, id, record);
|
|
68
|
-
}
|
|
69
|
-
const manifests = {};
|
|
70
|
-
if (isRecord(value.manifests)) {
|
|
71
|
-
for (const [name, record] of Object.entries(value.manifests)) {
|
|
72
|
-
assertSafeKey('manifest', name);
|
|
73
|
-
if (!isRecord(record)) {
|
|
74
|
-
throw new Error(`Package "${origin}" manifest "${name}" must be an object.`);
|
|
75
|
-
}
|
|
76
|
-
manifests[name] = parseManifestRecord(name, record);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return { version: 1, assets, manifests };
|
|
80
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { type AssetId, type EffectiveLibrary, type Library, type ManifestName, type ManifestRecord } from './library.js';
|
|
2
|
-
import type { PackageAssetDeclaration } from './package-declaration.js';
|
|
3
|
-
/** A parsed Package ready to merge: its declaration plus a provenance origin. */
|
|
4
|
-
export interface ParsedPackage {
|
|
5
|
-
origin: string;
|
|
6
|
-
declaration: {
|
|
7
|
-
assets: Record<AssetId, PackageAssetDeclaration>;
|
|
8
|
-
manifests: Record<ManifestName, ManifestRecord>;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
/** Where an effective asset came from — for `check` messages and the editor. */
|
|
12
|
-
export type AssetProvenance = {
|
|
13
|
-
source: 'host';
|
|
14
|
-
} | {
|
|
15
|
-
source: 'package';
|
|
16
|
-
origin: string;
|
|
17
|
-
} | {
|
|
18
|
-
source: 'override';
|
|
19
|
-
origin: string;
|
|
20
|
-
};
|
|
21
|
-
export type MergeProvenance = Record<AssetId, AssetProvenance>;
|
|
22
|
-
/** A merge-time finding. Conflicts/mismatches are errors; overrides are advisory. */
|
|
23
|
-
export type MergeFinding = {
|
|
24
|
-
kind: 'package-conflict';
|
|
25
|
-
assetId: string;
|
|
26
|
-
origins: [string, string];
|
|
27
|
-
message: string;
|
|
28
|
-
} | {
|
|
29
|
-
kind: 'package-type-mismatch';
|
|
30
|
-
assetId: string;
|
|
31
|
-
origin: string;
|
|
32
|
-
message: string;
|
|
33
|
-
} | {
|
|
34
|
-
kind: 'package-overridden';
|
|
35
|
-
assetId: string;
|
|
36
|
-
origin: string;
|
|
37
|
-
message: string;
|
|
38
|
-
};
|
|
39
|
-
export interface MergeResult {
|
|
40
|
-
library: EffectiveLibrary;
|
|
41
|
-
provenance: MergeProvenance;
|
|
42
|
-
findings: MergeFinding[];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Deep-merge plugin `parameters` — overlay (host) wins. Recurses into plain
|
|
46
|
-
* objects only; arrays are replaced wholesale (host-replace) and `{ $asset }`
|
|
47
|
-
* reference markers are treated as atomic (never merged field-by-field). Applied
|
|
48
|
-
* to `parameters` only — the record-level `manifests` array is unioned by the
|
|
49
|
-
* caller, never routed through here.
|
|
50
|
-
*/
|
|
51
|
-
export declare function deepMergeParameters(base: unknown, overlay: unknown): unknown;
|
|
52
|
-
/**
|
|
53
|
-
* Merge `packages` under `host` (host wins, per-field deep). Returns the merged
|
|
54
|
-
* effective library, per-asset provenance, and merge findings. `host` is an
|
|
55
|
-
* `EffectiveLibrary` so a raw-less host override branch stays reachable/testable
|
|
56
|
-
* and v2-ready; a plain `Library` is assignable.
|
|
57
|
-
*/
|
|
58
|
-
export declare function mergePackages(host: EffectiveLibrary, packages: ParsedPackage[]): MergeResult;
|
|
59
|
-
/**
|
|
60
|
-
* Drop raw-less (unfilled) slots from an effective library, yielding a plain
|
|
61
|
-
* `Library` for processing/codegen. Safe only after the slot/validation gates
|
|
62
|
-
* pass — every remaining delivered asset then has `raw`; dropped slots are
|
|
63
|
-
* provably inert (not delivered).
|
|
64
|
-
*/
|
|
65
|
-
export declare function materializeLibrary(effective: EffectiveLibrary): Library;
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The pure Package merge: fold package-shipped partial libraries **under** the
|
|
3
|
-
* host library into one in-memory *effective* library. Host wins per-field
|
|
4
|
-
* (deep). No disk, no config — testable like `resolveConfig`. The effective
|
|
5
|
-
* library is never serialized (a host `Library` always carries `raw`/`rawHash`);
|
|
6
|
-
* `materializeLibrary` drops raw-less inert slots to hand a plain `Library` to
|
|
7
|
-
* processing/codegen once the slot/validation gates have passed.
|
|
8
|
-
*/
|
|
9
|
-
import { isAssetReference } from './asset-reference.js';
|
|
10
|
-
import { compareCodeUnits } from './canonicalize.js';
|
|
11
|
-
import { isRecord } from './library.js';
|
|
12
|
-
function sortDedupManifests(names) {
|
|
13
|
-
return [...new Set(names)].sort(compareCodeUnits);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Deep-merge plugin `parameters` — overlay (host) wins. Recurses into plain
|
|
17
|
-
* objects only; arrays are replaced wholesale (host-replace) and `{ $asset }`
|
|
18
|
-
* reference markers are treated as atomic (never merged field-by-field). Applied
|
|
19
|
-
* to `parameters` only — the record-level `manifests` array is unioned by the
|
|
20
|
-
* caller, never routed through here.
|
|
21
|
-
*/
|
|
22
|
-
export function deepMergeParameters(base, overlay) {
|
|
23
|
-
if (isRecord(base) &&
|
|
24
|
-
isRecord(overlay) &&
|
|
25
|
-
!isAssetReference(base) &&
|
|
26
|
-
!isAssetReference(overlay)) {
|
|
27
|
-
const result = { ...base };
|
|
28
|
-
for (const [key, value] of Object.entries(overlay)) {
|
|
29
|
-
result[key] = key in base ? deepMergeParameters(base[key], value) : value;
|
|
30
|
-
}
|
|
31
|
-
return result;
|
|
32
|
-
}
|
|
33
|
-
return overlay;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Merge `packages` under `host` (host wins, per-field deep). Returns the merged
|
|
37
|
-
* effective library, per-asset provenance, and merge findings. `host` is an
|
|
38
|
-
* `EffectiveLibrary` so a raw-less host override branch stays reachable/testable
|
|
39
|
-
* and v2-ready; a plain `Library` is assignable.
|
|
40
|
-
*/
|
|
41
|
-
export function mergePackages(host, packages) {
|
|
42
|
-
const findings = [];
|
|
43
|
-
// Layer packages in declared order. First declaration of an id/manifest wins;
|
|
44
|
-
// a second package claiming an id is an (ambiguous-by-construction) error.
|
|
45
|
-
const pkgAssets = new Map();
|
|
46
|
-
const pkgManifests = new Map();
|
|
47
|
-
for (const { origin, declaration } of packages) {
|
|
48
|
-
for (const [id, decl] of Object.entries(declaration.assets)) {
|
|
49
|
-
const existing = pkgAssets.get(id);
|
|
50
|
-
if (existing) {
|
|
51
|
-
findings.push({
|
|
52
|
-
kind: 'package-conflict',
|
|
53
|
-
assetId: id,
|
|
54
|
-
origins: [existing.origin, origin],
|
|
55
|
-
message: `Asset "${id}" is declared by two Packages ("${existing.origin}" and "${origin}"); Package ids must be unique.`
|
|
56
|
-
});
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
pkgAssets.set(id, { origin, decl });
|
|
60
|
-
}
|
|
61
|
-
for (const [name, record] of Object.entries(declaration.manifests)) {
|
|
62
|
-
if (!pkgManifests.has(name))
|
|
63
|
-
pkgManifests.set(name, record);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const assets = {};
|
|
67
|
-
const provenance = {};
|
|
68
|
-
// Host assets: host-only pass through; host-over-package become overrides.
|
|
69
|
-
for (const [id, hostRecord] of Object.entries(host.assets)) {
|
|
70
|
-
const pkg = pkgAssets.get(id);
|
|
71
|
-
if (!pkg) {
|
|
72
|
-
assets[id] = { ...hostRecord };
|
|
73
|
-
provenance[id] = { source: 'host' };
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (pkg.decl.type !== hostRecord.type) {
|
|
77
|
-
findings.push({
|
|
78
|
-
kind: 'package-type-mismatch',
|
|
79
|
-
assetId: id,
|
|
80
|
-
origin: pkg.origin,
|
|
81
|
-
message: `Asset "${id}" overrides Package "${pkg.origin}" but changes its type from "${pkg.decl.type}" to "${hostRecord.type}"; changing the type is a different asset, not an override.`
|
|
82
|
-
});
|
|
83
|
-
assets[id] = { ...hostRecord };
|
|
84
|
-
provenance[id] = { source: 'override', origin: pkg.origin };
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
const merged = {
|
|
88
|
-
type: hostRecord.type,
|
|
89
|
-
parameters: deepMergeParameters(pkg.decl.parameters, hostRecord.parameters),
|
|
90
|
-
manifests: sortDedupManifests([...pkg.decl.manifests, ...hostRecord.manifests])
|
|
91
|
-
};
|
|
92
|
-
// Source unit (raw + rawHash + importSource) is coherent: if the host
|
|
93
|
-
// supplies bytes or its own import source, take the host's wholesale;
|
|
94
|
-
// otherwise inherit the Package's import source.
|
|
95
|
-
if (hostRecord.raw !== undefined || hostRecord.importSource !== undefined) {
|
|
96
|
-
if (hostRecord.raw !== undefined)
|
|
97
|
-
merged.raw = hostRecord.raw;
|
|
98
|
-
if (hostRecord.rawHash !== undefined)
|
|
99
|
-
merged.rawHash = hostRecord.rawHash;
|
|
100
|
-
if (hostRecord.importSource !== undefined)
|
|
101
|
-
merged.importSource = hostRecord.importSource;
|
|
102
|
-
}
|
|
103
|
-
else if (pkg.decl.importSource !== undefined) {
|
|
104
|
-
merged.importSource = pkg.decl.importSource;
|
|
105
|
-
}
|
|
106
|
-
assets[id] = merged;
|
|
107
|
-
provenance[id] = { source: 'override', origin: pkg.origin };
|
|
108
|
-
findings.push({
|
|
109
|
-
kind: 'package-overridden',
|
|
110
|
-
assetId: id,
|
|
111
|
-
origin: pkg.origin,
|
|
112
|
-
message: `Asset "${id}" from Package "${pkg.origin}" is overridden by the host library.`
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
// Package-only assets (byte-less slots).
|
|
116
|
-
for (const [id, { origin, decl }] of pkgAssets) {
|
|
117
|
-
if (Object.hasOwn(host.assets, id))
|
|
118
|
-
continue;
|
|
119
|
-
const record = {
|
|
120
|
-
type: decl.type,
|
|
121
|
-
parameters: decl.parameters,
|
|
122
|
-
manifests: sortDedupManifests(decl.manifests)
|
|
123
|
-
};
|
|
124
|
-
if (decl.importSource !== undefined)
|
|
125
|
-
record.importSource = decl.importSource;
|
|
126
|
-
assets[id] = record;
|
|
127
|
-
provenance[id] = { source: 'package', origin };
|
|
128
|
-
}
|
|
129
|
-
// Manifest records: Package declarations first, host overlays per field (host wins).
|
|
130
|
-
const manifests = {};
|
|
131
|
-
for (const [name, record] of pkgManifests)
|
|
132
|
-
manifests[name] = { ...record };
|
|
133
|
-
for (const [name, record] of Object.entries(host.manifests)) {
|
|
134
|
-
manifests[name] = { ...manifests[name], ...record };
|
|
135
|
-
}
|
|
136
|
-
const hasImportSource = Object.values(assets).some((record) => record.importSource !== undefined);
|
|
137
|
-
const library = {
|
|
138
|
-
version: hasImportSource ? 2 : host.version,
|
|
139
|
-
folders: host.folders,
|
|
140
|
-
assets,
|
|
141
|
-
manifests
|
|
142
|
-
};
|
|
143
|
-
return { library, provenance, findings };
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Drop raw-less (unfilled) slots from an effective library, yielding a plain
|
|
147
|
-
* `Library` for processing/codegen. Safe only after the slot/validation gates
|
|
148
|
-
* pass — every remaining delivered asset then has `raw`; dropped slots are
|
|
149
|
-
* provably inert (not delivered).
|
|
150
|
-
*/
|
|
151
|
-
export function materializeLibrary(effective) {
|
|
152
|
-
const assets = {};
|
|
153
|
-
for (const [id, record] of Object.entries(effective.assets)) {
|
|
154
|
-
if (record.raw === undefined || record.rawHash === undefined)
|
|
155
|
-
continue;
|
|
156
|
-
const materialized = {
|
|
157
|
-
type: record.type,
|
|
158
|
-
raw: record.raw,
|
|
159
|
-
rawHash: record.rawHash,
|
|
160
|
-
parameters: record.parameters,
|
|
161
|
-
manifests: record.manifests
|
|
162
|
-
};
|
|
163
|
-
if (record.importSource !== undefined)
|
|
164
|
-
materialized.importSource = record.importSource;
|
|
165
|
-
assets[id] = materialized;
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
version: effective.version,
|
|
169
|
-
folders: effective.folders,
|
|
170
|
-
assets,
|
|
171
|
-
manifests: effective.manifests
|
|
172
|
-
};
|
|
173
|
-
}
|