fundus 0.4.0 → 0.6.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 +132 -130
- package/build/client/_app/immutable/assets/2.CtqoikFs.css +1 -0
- package/build/client/_app/immutable/assets/2.CtqoikFs.css.br +0 -0
- package/build/client/_app/immutable/assets/2.CtqoikFs.css.gz +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.CVIa_uFP.css +1 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.CVIa_uFP.css.br +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.CVIa_uFP.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{CeJsL6hj.js → BT3jFrxa.js} +1 -1
- package/build/client/_app/immutable/chunks/BT3jFrxa.js.br +1 -0
- package/build/client/_app/immutable/chunks/BT3jFrxa.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CPFeEkfP.js +108 -0
- package/build/client/_app/immutable/chunks/CPFeEkfP.js.br +0 -0
- package/build/client/_app/immutable/chunks/CPFeEkfP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CQrHfI-c.js +1 -0
- package/build/client/_app/immutable/chunks/CQrHfI-c.js.br +0 -0
- package/build/client/_app/immutable/chunks/CQrHfI-c.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D0BLX4Qd.js +1 -0
- package/build/client/_app/immutable/chunks/D0BLX4Qd.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0BLX4Qd.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D24lHNM9.js +1 -0
- package/build/client/_app/immutable/chunks/D24lHNM9.js.br +0 -0
- package/build/client/_app/immutable/chunks/D24lHNM9.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D6VoU_x4.js +1 -0
- package/build/client/_app/immutable/chunks/D6VoU_x4.js.br +0 -0
- package/build/client/_app/immutable/chunks/D6VoU_x4.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.BQ4TfPHG.js → app.DmVWkUml.js} +2 -2
- package/build/client/_app/immutable/entry/app.DmVWkUml.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DmVWkUml.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.Dsf5wSaR.js +1 -0
- package/build/client/_app/immutable/entry/start.Dsf5wSaR.js.br +0 -0
- package/build/client/_app/immutable/entry/start.Dsf5wSaR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.l-jE2v4o.js +2 -0
- package/build/client/_app/immutable/nodes/0.l-jE2v4o.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.l-jE2v4o.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.C8DOqctV.js → 1.CRPVOtEh.js} +1 -1
- package/build/client/_app/immutable/nodes/1.CRPVOtEh.js.br +3 -0
- package/build/client/_app/immutable/nodes/1.CRPVOtEh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.8Si6qHSH.js +3 -0
- package/build/client/_app/immutable/nodes/2.8Si6qHSH.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.8Si6qHSH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CdI42Umt.js +1 -0
- package/build/client/_app/immutable/nodes/3.CdI42Umt.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CdI42Umt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.mMkL80q1.js +2 -0
- package/build/client/_app/immutable/nodes/4.mMkL80q1.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.mMkL80q1.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-CG2t-ufq.js → context.js-FvYkJDOy.js} +62 -49
- package/build/server/chunks/chunks/context.js-FvYkJDOy.js.map +1 -0
- package/build/server/chunks/chunks/{contract.js-sHny3b-s.js → contract.js-DGMufT2e.js} +191 -178
- package/build/server/chunks/chunks/contract.js-DGMufT2e.js.map +1 -0
- package/build/server/chunks/chunks/{core.js-Clg1CHb6.js → core.js-DNIuZ9y-.js} +88 -2
- package/build/server/chunks/chunks/core.js-DNIuZ9y-.js.map +1 -0
- package/build/server/chunks/chunks/{exports.js-rOfFZumP.js → exports.js-Bepiq5XZ.js} +2 -2
- package/build/server/chunks/chunks/{exports.js-rOfFZumP.js.map → exports.js-Bepiq5XZ.js.map} +1 -1
- package/build/server/chunks/chunks/{http.js--6sDZFfm.js → http.js-DWYlsbZd.js} +2 -2
- package/build/server/chunks/chunks/{http.js--6sDZFfm.js.map → http.js-DWYlsbZd.js.map} +1 -1
- package/build/server/chunks/chunks/{internal.js-DnveDsYn.js → internal.js-Cy01GWTk.js} +3 -3
- package/build/server/chunks/chunks/{internal.js-DnveDsYn.js.map → internal.js-Cy01GWTk.js.map} +1 -1
- package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -1
- package/build/server/chunks/chunks/manifest-membership.js-CJnQXrL4.js +213 -0
- package/build/server/chunks/chunks/manifest-membership.js-CJnQXrL4.js.map +1 -0
- package/build/server/chunks/chunks/raw-reconciliation.js-_D9lZ_sc.js +11 -0
- package/build/server/chunks/chunks/raw-reconciliation.js-_D9lZ_sc.js.map +1 -0
- package/build/server/chunks/chunks/{raw-reconciliation.js-DOFtjkgu.js → raw-reconciliation2.js-C2No1QIL.js} +3 -34
- package/build/server/chunks/chunks/raw-reconciliation2.js-C2No1QIL.js.map +1 -0
- package/build/server/chunks/chunks/{shared.js-DtvIbMLj.js → shared.js-b0LBJ1Hx.js} +2 -2
- package/build/server/chunks/chunks/{shared.js-DtvIbMLj.js.map → shared.js-b0LBJ1Hx.js.map} +1 -1
- package/build/server/chunks/chunks/{utils.js-bP1j9RdM.js → utils.js-CecFjHB0.js} +3 -3
- package/build/server/chunks/chunks/{utils.js-bP1j9RdM.js.map → utils.js-CecFjHB0.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CkSErIdC.js → _server.ts.js-Bmyh2WUa.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-CkSErIdC.js.map → _server.ts.js-Bmyh2WUa.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-BfdsBPWo.js → _server.ts.js-hoRG5JRv.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-BfdsBPWo.js.map → _server.ts.js-hoRG5JRv.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-D0aKDq87.js → _server.ts.js-BdO9kwrn.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-D0aKDq87.js.map → _server.ts.js-BdO9kwrn.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-DsX_m2gc.js → _server.ts.js-BojOH5gj.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-DsX_m2gc.js.map → _server.ts.js-BojOH5gj.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-nfThjRxs.js → _server.ts.js-DWIptU3K.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-nfThjRxs.js.map → _server.ts.js-DWIptU3K.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-CseHmsYB.js → _server.ts.js-CaiOgcPc.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-CseHmsYB.js.map → _server.ts.js-CaiOgcPc.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CHiICsyC.js → _server.ts.js-Bug1Y1W9.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CHiICsyC.js.map → _server.ts.js-Bug1Y1W9.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-Dgf46K5u.js → _server.ts.js-B9N7cPff.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-Dgf46K5u.js.map → _server.ts.js-B9N7cPff.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-DwQJUZFa.js → _server.ts.js-CiWdcZEv.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-DwQJUZFa.js.map → _server.ts.js-CiWdcZEv.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BnKS8nVF.js → _server.ts.js-CNqGzdRB.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-BnKS8nVF.js.map → _server.ts.js-CNqGzdRB.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-BrDbLcyO.js → _server.ts.js-BHwcGKE_.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-BrDbLcyO.js.map → _server.ts.js-BHwcGKE_.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-DIUiQuyd.js → _server.ts.js-CPoTCXQk.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-DIUiQuyd.js.map → _server.ts.js-CPoTCXQk.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BrReStaf.js → _server.ts.js-iDOU2RdK.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-BrReStaf.js.map → _server.ts.js-iDOU2RdK.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-B31iGwJ-.js → _server.ts.js-DikbQm3f.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-B31iGwJ-.js.map → _server.ts.js-DikbQm3f.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-DeZQFNdj.js → _server.ts.js-DTdHkWuR.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-DeZQFNdj.js.map → _server.ts.js-DTdHkWuR.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-DhDhUU7V.js → _server.ts.js-Cn8hwP5P.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-DhDhUU7V.js.map → _server.ts.js-Cn8hwP5P.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-DGkPIMcq.js → _server.ts.js-BdUCIBJ_.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-DGkPIMcq.js.map → _server.ts.js-BdUCIBJ_.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-BTQgWDH1.js → _server.ts.js-CBLdZJZB.js} +8 -7
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-BTQgWDH1.js.map → _server.ts.js-CBLdZJZB.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DB3i4juR.js → _server.ts.js-DVtQlFHS.js} +7 -6
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-DB3i4juR.js.map → _server.ts.js-DVtQlFHS.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-kmc-gejQ.js → _server.ts.js-CY_gjOPq.js} +8 -7
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-kmc-gejQ.js.map → _server.ts.js-CY_gjOPq.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-B8EE1DD9.js → _server.ts.js-BOfjGM87.js} +8 -7
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-B8EE1DD9.js.map → _server.ts.js-BOfjGM87.js.map} +1 -1
- package/build/server/chunks/entries/{hooks.server.js-DbBA5yYQ.js → hooks.server.js-BH0-wX67.js} +7 -6
- package/build/server/chunks/entries/{hooks.server.js-DbBA5yYQ.js.map → hooks.server.js-BH0-wX67.js.map} +1 -1
- package/build/server/chunks/{handler-J6aKdov3.js → handler-DMnHzDi5.js} +5 -5
- package/build/server/chunks/{handler-J6aKdov3.js.map → handler-DMnHzDi5.js.map} +1 -1
- package/build/server/chunks/{index.js-CsvWJ7Qu.js → index.js-BbOitM8j.js} +5 -5
- package/build/server/chunks/{index.js-CsvWJ7Qu.js.map → index.js-BbOitM8j.js.map} +1 -1
- package/build/server/chunks/{manifest.js-wHtZ9vlA.js → manifest.js-EeQkh4Qe.js} +28 -28
- package/build/server/chunks/{manifest.js-wHtZ9vlA.js.map → manifest.js-EeQkh4Qe.js.map} +1 -1
- package/build/server/chunks/nodes/0.js-CS9Xzs-1.js +11 -0
- package/build/server/chunks/nodes/0.js-CS9Xzs-1.js.map +1 -0
- package/build/server/chunks/nodes/1.js-GmjtwLZL.js +7 -0
- package/build/server/chunks/nodes/{1.js-CrPfmKpN.js.map → 1.js-GmjtwLZL.js.map} +1 -1
- package/build/server/chunks/nodes/2.js-Pip0Abb-.js +7 -0
- package/build/server/chunks/nodes/2.js-Pip0Abb-.js.map +1 -0
- package/build/server/chunks/nodes/3.js-CJKDeQST.js +7 -0
- package/build/server/chunks/nodes/3.js-CJKDeQST.js.map +1 -0
- package/build/server/chunks/nodes/4.js-CtmXxVg2.js +7 -0
- package/build/server/chunks/nodes/{4.js-tgwl3VD3.js.map → 4.js-CtmXxVg2.js.map} +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core/plugins/slice.d.ts +28 -4
- package/dist/core/plugins/slice.js +50 -0
- package/dist/server/importers/pinned-https.d.ts +0 -2
- package/dist/server/importers/pinned-https.js +49 -39
- package/dist/server/library-store.d.ts +1 -1
- package/dist/server/library-store.js +5 -1
- package/dist/server/operations.js +20 -1
- package/dist/server/plugins/slice.d.ts +3 -2
- package/dist/server/plugins/slice.js +21 -9
- package/dist/server/processing/slice-processing.d.ts +14 -0
- package/dist/server/processing/slice-processing.js +148 -0
- package/package.json +1 -1
- package/build/client/_app/immutable/assets/2.B5tQm8hR.css +0 -1
- package/build/client/_app/immutable/assets/2.B5tQm8hR.css.br +0 -0
- package/build/client/_app/immutable/assets/2.B5tQm8hR.css.gz +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.CVb-Lqdf.css +0 -1
- package/build/client/_app/immutable/assets/LibraryContextMenu.CVb-Lqdf.css.br +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.CVb-Lqdf.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BPiGyn-T.js +0 -1
- package/build/client/_app/immutable/chunks/BPiGyn-T.js.br +0 -0
- package/build/client/_app/immutable/chunks/BPiGyn-T.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BoEHtxM8.js +0 -1
- package/build/client/_app/immutable/chunks/BoEHtxM8.js.br +0 -0
- package/build/client/_app/immutable/chunks/BoEHtxM8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C-T1_s5P.js +0 -1
- package/build/client/_app/immutable/chunks/C-T1_s5P.js.br +0 -0
- package/build/client/_app/immutable/chunks/C-T1_s5P.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CeJsL6hj.js.br +0 -0
- package/build/client/_app/immutable/chunks/CeJsL6hj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cq4Yaq35.js +0 -108
- package/build/client/_app/immutable/chunks/Cq4Yaq35.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cq4Yaq35.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D5sQSsUv.js +0 -1
- package/build/client/_app/immutable/chunks/D5sQSsUv.js.br +0 -0
- package/build/client/_app/immutable/chunks/D5sQSsUv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/TZFh8bT7.js +0 -1
- package/build/client/_app/immutable/chunks/TZFh8bT7.js.br +0 -0
- package/build/client/_app/immutable/chunks/TZFh8bT7.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.BQ4TfPHG.js.br +0 -0
- package/build/client/_app/immutable/entry/app.BQ4TfPHG.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.COP9tIRH.js +0 -1
- package/build/client/_app/immutable/entry/start.COP9tIRH.js.br +0 -0
- package/build/client/_app/immutable/entry/start.COP9tIRH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.CftchwYV.js +0 -2
- package/build/client/_app/immutable/nodes/0.CftchwYV.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.CftchwYV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.C8DOqctV.js.br +0 -1
- package/build/client/_app/immutable/nodes/1.C8DOqctV.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BR8OVsS9.js +0 -3
- package/build/client/_app/immutable/nodes/2.BR8OVsS9.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BR8OVsS9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BO5hcxIH.js +0 -1
- package/build/client/_app/immutable/nodes/3.BO5hcxIH.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BO5hcxIH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DTaH-k-c.js +0 -2
- package/build/client/_app/immutable/nodes/4.DTaH-k-c.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DTaH-k-c.js.gz +0 -0
- package/build/server/chunks/chunks/asset-id.js-CFsW8jeL.js +0 -48
- package/build/server/chunks/chunks/asset-id.js-CFsW8jeL.js.map +0 -1
- package/build/server/chunks/chunks/context.js-CG2t-ufq.js.map +0 -1
- package/build/server/chunks/chunks/contract.js-sHny3b-s.js.map +0 -1
- package/build/server/chunks/chunks/core.js-Clg1CHb6.js.map +0 -1
- package/build/server/chunks/chunks/raw-reconciliation.js-DOFtjkgu.js.map +0 -1
- package/build/server/chunks/chunks/raw-reconciliation2.js-DFwky2ou.js +0 -11
- package/build/server/chunks/chunks/raw-reconciliation2.js-DFwky2ou.js.map +0 -1
- package/build/server/chunks/nodes/0.js-By6-kbk6.js +0 -11
- package/build/server/chunks/nodes/0.js-By6-kbk6.js.map +0 -1
- package/build/server/chunks/nodes/1.js-CrPfmKpN.js +0 -7
- package/build/server/chunks/nodes/2.js-C-i3Y5t2.js +0 -7
- package/build/server/chunks/nodes/2.js-C-i3Y5t2.js.map +0 -1
- package/build/server/chunks/nodes/3.js-C1gcIGeV.js +0 -7
- package/build/server/chunks/nodes/3.js-C1gcIGeV.js.map +0 -1
- package/build/server/chunks/nodes/4.js-tgwl3VD3.js +0 -7
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { a as plugins, b as audioPlugin,
|
|
2
|
-
import { a as assetIdError, m as manifestNameError } from './
|
|
1
|
+
import { a as plugins, b as audioPlugin, d as chromaKeyVideoPlugin, v as videoPlugin, s as slicePlugin, e as imagePlugin, n as normalizeFolderPath, g as folderOfRawPath, h as rawFileNameOfPath, j as canonicalizeParameters, f as folderPathError, k as parentFolderPath, l as folderNameError, m as joinFolderPath, o as folderNameOf, q as isFolderOrDescendant, t as replaceFolderPrefix, u as portableFolderPathKey, c as compareCodeUnits, w as processedSliceInsets, x as defaultInsetsForSize, F as FOLDER_SENTINEL, r as rawFilePathError, y as slicedAxesFor, z as isAssetReference, A as validateVideoPreset, V as VIDEO_BUILT_IN_PRESETS, B as validateAudioPreset, C as AUDIO_BUILT_IN_PRESETS, D as validateImagePreset, I as IMAGE_BUILT_IN_PRESETS, S as SLICE_BUILT_IN_PRESETS } from './core.js-DNIuZ9y-.js';
|
|
2
|
+
import { a as assetIdError, r as referenceErrors, c as collectAllReferences, b as computeLibraryMembership, m as manifestNameError, d as allDeliveredAssetIds, t as topologicalReferenceOrder } from './manifest-membership.js-CJnQXrL4.js';
|
|
3
3
|
import { m as manifestColorError, a as manifestEmojiError } from './manifest-appearance.js-DTk355LQ.js';
|
|
4
|
-
import {
|
|
4
|
+
import { v as verifyStableRawFile } from './raw-reconciliation2.js-C2No1QIL.js';
|
|
5
5
|
import { join, extname, dirname, basename, isAbsolute, resolve } from 'node:path';
|
|
6
6
|
import { existsSync } from 'node:fs';
|
|
7
|
-
import { readFile, mkdir, writeFile, rename, unlink, rm, stat, readdir } from 'node:fs/promises';
|
|
7
|
+
import { readFile, mkdir, writeFile, rename, unlink, rm, stat, readdir, mkdtemp } from 'node:fs/promises';
|
|
8
8
|
import ffmpegStaticPath from 'ffmpeg-static';
|
|
9
9
|
import { path } from 'ffprobe-static';
|
|
10
10
|
import { execFile } from 'node:child_process';
|
|
11
11
|
import { promisify } from 'node:util';
|
|
12
12
|
import sharp from 'sharp';
|
|
13
|
+
import { tmpdir } from 'node:os';
|
|
13
14
|
import { createHash } from 'node:crypto';
|
|
14
15
|
|
|
15
16
|
//#region src/lib/core/library.ts
|
|
@@ -147,169 +148,6 @@ function serializeLibrary(library) {
|
|
|
147
148
|
}), null, " ")}\n`;
|
|
148
149
|
}
|
|
149
150
|
//#endregion
|
|
150
|
-
//#region src/lib/core/reference-graph.ts
|
|
151
|
-
/**
|
|
152
|
-
* Ask each asset's owning plugin for the references in its parameters. Assets
|
|
153
|
-
* whose type is unknown or whose parameters do not validate contribute no
|
|
154
|
-
* references — those problems are reported by the regular validation pass.
|
|
155
|
-
*/
|
|
156
|
-
function collectAllReferences(library, plugins) {
|
|
157
|
-
const referencesByAsset = {};
|
|
158
|
-
for (const [assetId, record] of Object.entries(library.assets)) {
|
|
159
|
-
referencesByAsset[assetId] = [];
|
|
160
|
-
const plugin = plugins[record.type];
|
|
161
|
-
if (!plugin?.collectReferences) continue;
|
|
162
|
-
try {
|
|
163
|
-
referencesByAsset[assetId] = plugin.collectReferences(plugin.validateParameters(record.parameters));
|
|
164
|
-
} catch {}
|
|
165
|
-
}
|
|
166
|
-
return referencesByAsset;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Reference *errors* (they block build/codegen): a reference to an unknown
|
|
170
|
-
* asset, a target whose type is not among the field's expected types, and
|
|
171
|
-
* cycles (composition is acyclic by nature).
|
|
172
|
-
*/
|
|
173
|
-
function referenceErrors(library, referencesByAsset) {
|
|
174
|
-
const issues = [];
|
|
175
|
-
for (const [assetId, references] of Object.entries(referencesByAsset)) for (const reference of references) {
|
|
176
|
-
if (!Object.hasOwn(library.assets, reference.assetId)) {
|
|
177
|
-
issues.push({
|
|
178
|
-
assetId,
|
|
179
|
-
message: `Reference "${reference.field}" points at unknown asset "${reference.assetId}".`
|
|
180
|
-
});
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
const targetType = library.assets[reference.assetId].type;
|
|
184
|
-
if (reference.expectedTypes.length > 0 && !reference.expectedTypes.includes(targetType)) issues.push({
|
|
185
|
-
assetId,
|
|
186
|
-
message: `Reference "${reference.field}" points at "${reference.assetId}" of type "${targetType}" — expected ${reference.expectedTypes.map((type) => `"${type}"`).join(" or ")}.`
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
issues.push(...cycleErrors(referencesByAsset));
|
|
190
|
-
return issues;
|
|
191
|
-
}
|
|
192
|
-
/** DFS cycle detection with an explicit stack path; each cycle reported once. */
|
|
193
|
-
function cycleErrors(referencesByAsset) {
|
|
194
|
-
const issues = [];
|
|
195
|
-
const finished = /* @__PURE__ */ new Set();
|
|
196
|
-
const reportedCycles = /* @__PURE__ */ new Set();
|
|
197
|
-
const stack = [];
|
|
198
|
-
const onStack = /* @__PURE__ */ new Set();
|
|
199
|
-
function visit(assetId) {
|
|
200
|
-
if (finished.has(assetId)) return;
|
|
201
|
-
if (onStack.has(assetId)) {
|
|
202
|
-
const cyclePath = [...stack.slice(stack.indexOf(assetId)), assetId];
|
|
203
|
-
const cycleKey = [...new Set(cyclePath)].sort().join("\0");
|
|
204
|
-
if (!reportedCycles.has(cycleKey)) {
|
|
205
|
-
reportedCycles.add(cycleKey);
|
|
206
|
-
issues.push({
|
|
207
|
-
assetId: cyclePath[0],
|
|
208
|
-
message: `Reference cycle: ${cyclePath.map((id) => `"${id}"`).join(" → ")} — references express composition and must stay acyclic.`
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
stack.push(assetId);
|
|
214
|
-
onStack.add(assetId);
|
|
215
|
-
for (const reference of referencesByAsset[assetId] ?? []) if (Object.hasOwn(referencesByAsset, reference.assetId)) visit(reference.assetId);
|
|
216
|
-
stack.pop();
|
|
217
|
-
onStack.delete(assetId);
|
|
218
|
-
finished.add(assetId);
|
|
219
|
-
}
|
|
220
|
-
for (const assetId of Object.keys(referencesByAsset)) visit(assetId);
|
|
221
|
-
return issues;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* The transitive reference closure of a set of assets, including the starting
|
|
225
|
-
* set — the assets that must be delivered so the starting set renders as
|
|
226
|
-
* authored. Tolerates cycles and ignores dangling targets (both are reported
|
|
227
|
-
* as errors by `referenceErrors`).
|
|
228
|
-
*/
|
|
229
|
-
function referenceClosure(assetIds, referencesByAsset) {
|
|
230
|
-
const closure = /* @__PURE__ */ new Set();
|
|
231
|
-
const pending = [...assetIds];
|
|
232
|
-
while (pending.length > 0) {
|
|
233
|
-
const assetId = pending.pop();
|
|
234
|
-
if (closure.has(assetId) || !Object.hasOwn(referencesByAsset, assetId)) continue;
|
|
235
|
-
closure.add(assetId);
|
|
236
|
-
for (const reference of referencesByAsset[assetId]) pending.push(reference.assetId);
|
|
237
|
-
}
|
|
238
|
-
return closure;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* A dependencies-first order over `assetIds` and everything they transitively
|
|
242
|
-
* reference — the build order that lets each entry inline its references from
|
|
243
|
-
* already-built entries. Throws on a cycle (with the cycle path).
|
|
244
|
-
*/
|
|
245
|
-
function topologicalReferenceOrder(assetIds, referencesByAsset) {
|
|
246
|
-
const order = [];
|
|
247
|
-
const finished = /* @__PURE__ */ new Set();
|
|
248
|
-
const stack = [];
|
|
249
|
-
const onStack = /* @__PURE__ */ new Set();
|
|
250
|
-
function visit(assetId) {
|
|
251
|
-
if (finished.has(assetId) || !Object.hasOwn(referencesByAsset, assetId)) return;
|
|
252
|
-
if (onStack.has(assetId)) {
|
|
253
|
-
const cyclePath = [...stack.slice(stack.indexOf(assetId)), assetId];
|
|
254
|
-
throw new Error(`Reference cycle: ${cyclePath.map((id) => `"${id}"`).join(" → ")} — cannot order entries.`);
|
|
255
|
-
}
|
|
256
|
-
stack.push(assetId);
|
|
257
|
-
onStack.add(assetId);
|
|
258
|
-
for (const reference of referencesByAsset[assetId]) visit(reference.assetId);
|
|
259
|
-
stack.pop();
|
|
260
|
-
onStack.delete(assetId);
|
|
261
|
-
finished.add(assetId);
|
|
262
|
-
order.push(assetId);
|
|
263
|
-
}
|
|
264
|
-
for (const assetId of assetIds) visit(assetId);
|
|
265
|
-
return order;
|
|
266
|
-
}
|
|
267
|
-
//#endregion
|
|
268
|
-
//#region src/lib/core/manifest-membership.ts
|
|
269
|
-
/**
|
|
270
|
-
* Compute the full membership picture from a library and its collected
|
|
271
|
-
* references: for each manifest the explicit members, the passive members
|
|
272
|
-
* (`referenceClosure(explicit) − explicit`) with their via-attribution, and
|
|
273
|
-
* the resulting delivery set.
|
|
274
|
-
*/
|
|
275
|
-
function computeLibraryMembership(library, referencesByAsset) {
|
|
276
|
-
const manifestNames = new Set(Object.keys(library.manifests));
|
|
277
|
-
for (const record of Object.values(library.assets)) for (const manifestName of record.manifests) manifestNames.add(manifestName);
|
|
278
|
-
const membership = {};
|
|
279
|
-
for (const manifestName of [...manifestNames].sort(compareCodeUnits)) {
|
|
280
|
-
const explicitMemberIds = Object.entries(library.assets).filter(([, record]) => record.manifests.includes(manifestName)).map(([assetId]) => assetId).sort(compareCodeUnits);
|
|
281
|
-
const explicitMemberSet = new Set(explicitMemberIds);
|
|
282
|
-
const deliveredAssetIds = new Set(explicitMemberIds);
|
|
283
|
-
const viaByPassiveAssetId = /* @__PURE__ */ new Map();
|
|
284
|
-
for (const explicitMemberId of explicitMemberIds) for (const reachedAssetId of referenceClosure([explicitMemberId], referencesByAsset)) {
|
|
285
|
-
deliveredAssetIds.add(reachedAssetId);
|
|
286
|
-
if (explicitMemberSet.has(reachedAssetId)) continue;
|
|
287
|
-
const via = viaByPassiveAssetId.get(reachedAssetId) ?? [];
|
|
288
|
-
via.push(explicitMemberId);
|
|
289
|
-
viaByPassiveAssetId.set(reachedAssetId, via);
|
|
290
|
-
}
|
|
291
|
-
membership[manifestName] = {
|
|
292
|
-
explicitMemberIds,
|
|
293
|
-
passiveMembers: [...viaByPassiveAssetId.entries()].map(([assetId, via]) => ({
|
|
294
|
-
assetId,
|
|
295
|
-
via
|
|
296
|
-
})).sort((a, b) => compareCodeUnits(a.assetId, b.assetId)),
|
|
297
|
-
deliveredAssetIds
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
return membership;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Every asset delivered by at least one manifest, explicitly or passively —
|
|
304
|
-
* the processing set (assets outside it are inert). An asset is
|
|
305
|
-
* *unreachable* (nothing delivers it) exactly when it is missing here.
|
|
306
|
-
*/
|
|
307
|
-
function allDeliveredAssetIds(membership) {
|
|
308
|
-
const delivered = /* @__PURE__ */ new Set();
|
|
309
|
-
for (const manifestMembership of Object.values(membership)) for (const assetId of manifestMembership.deliveredAssetIds) delivered.add(assetId);
|
|
310
|
-
return delivered;
|
|
311
|
-
}
|
|
312
|
-
//#endregion
|
|
313
151
|
//#region src/lib/server/processing/ffmpeg.ts
|
|
314
152
|
/**
|
|
315
153
|
* The ffmpeg/ffprobe toolchain layer: binary resolution (bundled `-static`
|
|
@@ -714,11 +552,173 @@ var imageServerPlugin = {
|
|
|
714
552
|
})
|
|
715
553
|
};
|
|
716
554
|
//#endregion
|
|
555
|
+
//#region src/lib/server/processing/slice-processing.ts
|
|
556
|
+
/**
|
|
557
|
+
* Slice-specific image processing. Fixed caps are copied pixel-for-pixel; only
|
|
558
|
+
* the source region that will be stretched is scaled down. Bands are extracted
|
|
559
|
+
* and recomposed through temporary PNGs so large assets are not held in several
|
|
560
|
+
* full-size raw buffers at once.
|
|
561
|
+
*/
|
|
562
|
+
var MAX_COMPRESSION_PIXELS = 32e6;
|
|
563
|
+
function clamp(value, min, max) {
|
|
564
|
+
return Math.max(min, Math.min(max, value));
|
|
565
|
+
}
|
|
566
|
+
/** The length after percentage-based compression, with one stretch pixel kept. */
|
|
567
|
+
function compressedStretchSize(size, compression) {
|
|
568
|
+
if (size <= 0) return 0;
|
|
569
|
+
return Math.max(1, Math.round(size * (1 - clamp(compression, 0, 100) / 100)));
|
|
570
|
+
}
|
|
571
|
+
function assertSliceCompressionDimensions(width, height) {
|
|
572
|
+
if (width * height > MAX_COMPRESSION_PIXELS) throw new Error(`Slice compression supports images up to ${MAX_COMPRESSION_PIXELS.toLocaleString("en-US")} pixels.`);
|
|
573
|
+
}
|
|
574
|
+
function fixedBands(size, startInset, endInset) {
|
|
575
|
+
const start = clamp(startInset, 0, size);
|
|
576
|
+
const end = clamp(endInset, 0, size - start);
|
|
577
|
+
return {
|
|
578
|
+
start,
|
|
579
|
+
center: size - start - end,
|
|
580
|
+
end
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
function axisBands(start, center, end, targetCenter) {
|
|
584
|
+
return [
|
|
585
|
+
{
|
|
586
|
+
start: 0,
|
|
587
|
+
size: start,
|
|
588
|
+
targetSize: start
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
start,
|
|
592
|
+
size: center,
|
|
593
|
+
targetSize: targetCenter
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
start: start + center,
|
|
597
|
+
size: end,
|
|
598
|
+
targetSize: end
|
|
599
|
+
}
|
|
600
|
+
].filter((band) => band.size > 0 && band.targetSize > 0);
|
|
601
|
+
}
|
|
602
|
+
async function compressAxisToPng(options) {
|
|
603
|
+
const horizontal = options.axis === "x";
|
|
604
|
+
const width = horizontal ? options.start + options.targetCenter + options.end : options.dimensions.width;
|
|
605
|
+
const height = horizontal ? options.dimensions.height : options.start + options.targetCenter + options.end;
|
|
606
|
+
const composites = [];
|
|
607
|
+
let destinationOffset = 0;
|
|
608
|
+
let bandIndex = 0;
|
|
609
|
+
for (const band of axisBands(options.start, options.center, options.end, options.targetCenter)) {
|
|
610
|
+
const bandPath = join(options.temporaryDirectory, `${options.prefix}-${bandIndex}.png`);
|
|
611
|
+
const extracted = sharp(options.sourcePath).extract({
|
|
612
|
+
left: horizontal ? band.start : 0,
|
|
613
|
+
top: horizontal ? 0 : band.start,
|
|
614
|
+
width: horizontal ? band.size : options.dimensions.width,
|
|
615
|
+
height: horizontal ? options.dimensions.height : band.size
|
|
616
|
+
});
|
|
617
|
+
if (band.targetSize !== band.size) extracted.resize({
|
|
618
|
+
width: horizontal ? band.targetSize : options.dimensions.width,
|
|
619
|
+
height: horizontal ? options.dimensions.height : band.targetSize,
|
|
620
|
+
fit: "fill"
|
|
621
|
+
});
|
|
622
|
+
await extracted.png().toFile(bandPath);
|
|
623
|
+
composites.push({
|
|
624
|
+
input: bandPath,
|
|
625
|
+
left: horizontal ? destinationOffset : 0,
|
|
626
|
+
top: horizontal ? 0 : destinationOffset
|
|
627
|
+
});
|
|
628
|
+
destinationOffset += band.targetSize;
|
|
629
|
+
bandIndex += 1;
|
|
630
|
+
}
|
|
631
|
+
await sharp({ create: {
|
|
632
|
+
width,
|
|
633
|
+
height,
|
|
634
|
+
channels: 4,
|
|
635
|
+
background: {
|
|
636
|
+
r: 0,
|
|
637
|
+
g: 0,
|
|
638
|
+
b: 0,
|
|
639
|
+
alpha: 0
|
|
640
|
+
}
|
|
641
|
+
} }).composite(composites).png().toFile(options.targetPath);
|
|
642
|
+
return {
|
|
643
|
+
width,
|
|
644
|
+
height
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
async function processSliceImageFile(options) {
|
|
648
|
+
const axes = slicedAxesFor(options.mode);
|
|
649
|
+
const compressionX = axes.horizontal ? options.compression?.x ?? 0 : 0;
|
|
650
|
+
const compressionY = axes.vertical ? options.compression?.y ?? 0 : 0;
|
|
651
|
+
if (compressionX === 0 && compressionY === 0) return processImageFile(options);
|
|
652
|
+
const metadata = await sharp(options.sourcePath).metadata();
|
|
653
|
+
if (metadata.width === void 0 || metadata.height === void 0) throw new Error(`Could not read image dimensions of ${options.sourcePath}.`);
|
|
654
|
+
assertSliceCompressionDimensions(metadata.width, metadata.height);
|
|
655
|
+
let dimensions = {
|
|
656
|
+
width: metadata.width,
|
|
657
|
+
height: metadata.height
|
|
658
|
+
};
|
|
659
|
+
const processedInsets = processedSliceInsets({
|
|
660
|
+
...options,
|
|
661
|
+
width: metadata.width,
|
|
662
|
+
height: metadata.height
|
|
663
|
+
});
|
|
664
|
+
let currentPath = options.sourcePath;
|
|
665
|
+
const temporaryDirectory = await mkdtemp(join(tmpdir(), "fundus-slice-compression-"));
|
|
666
|
+
try {
|
|
667
|
+
if (compressionX > 0) {
|
|
668
|
+
const bands = fixedBands(dimensions.width, processedInsets.left, processedInsets.right);
|
|
669
|
+
const targetCenter = compressedStretchSize(bands.center, compressionX);
|
|
670
|
+
if (targetCenter > 0 && targetCenter < bands.center) {
|
|
671
|
+
currentPath = join(temporaryDirectory, "compressed-x.png");
|
|
672
|
+
dimensions = await compressAxisToPng({
|
|
673
|
+
sourcePath: options.sourcePath,
|
|
674
|
+
targetPath: currentPath,
|
|
675
|
+
temporaryDirectory,
|
|
676
|
+
prefix: "x-band",
|
|
677
|
+
dimensions,
|
|
678
|
+
axis: "x",
|
|
679
|
+
...bands,
|
|
680
|
+
targetCenter
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
if (compressionY > 0) {
|
|
685
|
+
const bands = fixedBands(dimensions.height, processedInsets.top, processedInsets.bottom);
|
|
686
|
+
const targetCenter = compressedStretchSize(bands.center, compressionY);
|
|
687
|
+
if (targetCenter > 0 && targetCenter < bands.center) {
|
|
688
|
+
const nextPath = join(temporaryDirectory, "compressed-y.png");
|
|
689
|
+
dimensions = await compressAxisToPng({
|
|
690
|
+
sourcePath: currentPath,
|
|
691
|
+
targetPath: nextPath,
|
|
692
|
+
temporaryDirectory,
|
|
693
|
+
prefix: "y-band",
|
|
694
|
+
dimensions,
|
|
695
|
+
axis: "y",
|
|
696
|
+
...bands,
|
|
697
|
+
targetCenter
|
|
698
|
+
});
|
|
699
|
+
currentPath = nextPath;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
await mkdir(dirname(options.targetPath), { recursive: true });
|
|
703
|
+
const info = await sharp(currentPath).toFormat(options.preset.format, options.preset.quality !== void 0 ? { quality: options.preset.quality } : {}).toFile(options.targetPath);
|
|
704
|
+
return {
|
|
705
|
+
width: info.width,
|
|
706
|
+
height: info.height
|
|
707
|
+
};
|
|
708
|
+
} finally {
|
|
709
|
+
await rm(temporaryDirectory, {
|
|
710
|
+
recursive: true,
|
|
711
|
+
force: true
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
//#endregion
|
|
717
716
|
//#region src/lib/server/plugins/slice.ts
|
|
718
717
|
/**
|
|
719
718
|
* Slice plugin (server part): the same sharp conversion as the image plugin,
|
|
720
|
-
*
|
|
721
|
-
*
|
|
719
|
+
* fixed caps keep their source-pixel size, while optional compression removes
|
|
720
|
+
* redundant pixels from the stretchable regions. The slicing data itself is
|
|
721
|
+
* entry-only.
|
|
722
722
|
*/
|
|
723
723
|
var sliceConfigDefinition = {
|
|
724
724
|
namespace: "slice",
|
|
@@ -758,24 +758,34 @@ var sliceServerPlugin = {
|
|
|
758
758
|
pixelRatio: detectPixelRatio(rawFileName)
|
|
759
759
|
};
|
|
760
760
|
},
|
|
761
|
-
process: (job) =>
|
|
761
|
+
process: (job) => processSliceImageFile({
|
|
762
762
|
sourcePath: job.sourcePath,
|
|
763
763
|
targetPath: job.targetPath,
|
|
764
|
-
preset: job.preset
|
|
764
|
+
preset: job.preset,
|
|
765
|
+
mode: job.parameters.mode,
|
|
766
|
+
insets: job.parameters.insets,
|
|
767
|
+
overdraw: job.parameters.overdraw,
|
|
768
|
+
compression: job.parameters.compression
|
|
765
769
|
}),
|
|
766
770
|
readProxyInfo: (proxyPath) => readImageDimensions(proxyPath),
|
|
767
771
|
buildManifestEntry: ({ parameters, src, proxy }) => {
|
|
772
|
+
const sourceWidth = requireProxyField(proxy, "width");
|
|
773
|
+
const sourceHeight = requireProxyField(proxy, "height");
|
|
768
774
|
return {
|
|
769
775
|
kind: "slice",
|
|
770
776
|
src,
|
|
771
777
|
slicing: {
|
|
772
778
|
mode: parameters.mode,
|
|
773
|
-
insets:
|
|
779
|
+
insets: processedSliceInsets({
|
|
780
|
+
...parameters,
|
|
781
|
+
width: sourceWidth,
|
|
782
|
+
height: sourceHeight
|
|
783
|
+
}),
|
|
774
784
|
pixelRatio: parameters.pixelRatio,
|
|
775
785
|
...hasAnySide(parameters.overdraw) ? { overdraw: parameters.overdraw } : {}
|
|
776
786
|
},
|
|
777
|
-
sourceWidth
|
|
778
|
-
sourceHeight
|
|
787
|
+
sourceWidth,
|
|
788
|
+
sourceHeight
|
|
779
789
|
};
|
|
780
790
|
}
|
|
781
791
|
};
|
|
@@ -1351,13 +1361,13 @@ var LibraryStore = class {
|
|
|
1351
1361
|
return library;
|
|
1352
1362
|
}
|
|
1353
1363
|
/** CAS-protected replacement used only by a repeatable import source. */
|
|
1354
|
-
async replaceRawFromImportSource(id, bytes, expected, nextSource) {
|
|
1364
|
+
async replaceRawFromImportSource(id, bytes, expected, nextSource, updateParameters) {
|
|
1355
1365
|
return this.#enqueue(async () => {
|
|
1356
1366
|
const library = await this.read();
|
|
1357
1367
|
const record = this.#requireAsset(library, id);
|
|
1358
1368
|
if (record.raw !== expected.raw || record.rawHash !== expected.rawHash || record.type !== expected.type || !record.importSource || canonicalizeParameters(record.importSource) !== expected.canonicalSource) throw new Error("stale-import");
|
|
1359
1369
|
const absolutePath = join(this.#config.rawDir, record.raw);
|
|
1360
|
-
const { verifyStableRawFile } = await import('./raw-
|
|
1370
|
+
const { verifyStableRawFile } = await import('./raw-reconciliation.js-_D9lZ_sc.js');
|
|
1361
1371
|
try {
|
|
1362
1372
|
await verifyStableRawFile(absolutePath, expected.rawHash);
|
|
1363
1373
|
} catch {
|
|
@@ -1368,6 +1378,7 @@ var LibraryStore = class {
|
|
|
1368
1378
|
const backupPath = `${absolutePath}.fundus-reimport-${token}`;
|
|
1369
1379
|
const previousHash = record.rawHash;
|
|
1370
1380
|
const previousSource = structuredClone(record.importSource);
|
|
1381
|
+
const previousParameters = structuredClone(record.parameters);
|
|
1371
1382
|
let staged = false;
|
|
1372
1383
|
let installed = false;
|
|
1373
1384
|
try {
|
|
@@ -1378,10 +1389,12 @@ var LibraryStore = class {
|
|
|
1378
1389
|
installed = true;
|
|
1379
1390
|
record.rawHash = sha256Hex(bytes);
|
|
1380
1391
|
if (nextSource) record.importSource = structuredClone(nextSource);
|
|
1392
|
+
if (updateParameters) record.parameters = updateParameters(record.parameters);
|
|
1381
1393
|
await this.write(library);
|
|
1382
1394
|
} catch (cause) {
|
|
1383
1395
|
record.rawHash = previousHash;
|
|
1384
1396
|
record.importSource = previousSource;
|
|
1397
|
+
record.parameters = previousParameters;
|
|
1385
1398
|
if (installed) await unlink(absolutePath).catch(() => {});
|
|
1386
1399
|
if (staged) await rename(backupPath, absolutePath);
|
|
1387
1400
|
await unlink(temporaryPath).catch(() => {});
|
|
@@ -1906,5 +1919,5 @@ function invalidInput(message) {
|
|
|
1906
1919
|
throw new SourceImportError("invalid-input", message);
|
|
1907
1920
|
}
|
|
1908
1921
|
|
|
1909
|
-
export { LibraryStore as L, SourceImportError as S, serverPluginForType as a,
|
|
1910
|
-
//# sourceMappingURL=contract.js-
|
|
1922
|
+
export { LibraryStore as L, SourceImportError as S, serverPluginForType as a, invalidInput as b, assertSafeRelativeFilePath as c, descriptorsByType as d, encodeRelativePathForUrl as e, generateManifestModules as g, isRecord as i, processAssets as p, readCurrentProxy as r, serverPluginsByType as s };
|
|
1923
|
+
//# sourceMappingURL=contract.js-DGMufT2e.js.map
|