@cyberismo/backend 1.2.0 → 1.3.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/dist/app.d.ts +5 -15
- package/dist/app.js +28 -38
- package/dist/app.js.map +1 -1
- package/dist/auth/index.d.ts +0 -12
- package/dist/auth/index.js +2 -12
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/keycloak.d.ts +0 -12
- package/dist/auth/keycloak.js +2 -12
- package/dist/auth/keycloak.js.map +1 -1
- package/dist/auth/mock.d.ts +0 -12
- package/dist/auth/mock.js +2 -12
- package/dist/auth/mock.js.map +1 -1
- package/dist/auth/types.d.ts +0 -12
- package/dist/auth/types.js +2 -12
- package/dist/auth/types.js.map +1 -1
- package/dist/common/errors.d.ts +12 -0
- package/dist/common/errors.js +31 -0
- package/dist/common/errors.js.map +1 -0
- package/dist/common/validationSchemas.d.ts +0 -12
- package/dist/common/validationSchemas.js +2 -12
- package/dist/common/validationSchemas.js.map +1 -1
- package/dist/domain/auth/index.d.ts +0 -12
- package/dist/domain/auth/index.js +2 -12
- package/dist/domain/auth/index.js.map +1 -1
- package/dist/domain/calculations/index.d.ts +0 -12
- package/dist/domain/calculations/index.js +4 -14
- package/dist/domain/calculations/index.js.map +1 -1
- package/dist/domain/calculations/schema.d.ts +0 -12
- package/dist/domain/calculations/schema.js +2 -12
- package/dist/domain/calculations/schema.js.map +1 -1
- package/dist/domain/calculations/service.d.ts +2 -14
- package/dist/domain/calculations/service.js +7 -17
- package/dist/domain/calculations/service.js.map +1 -1
- package/dist/domain/cardTypes/index.d.ts +0 -12
- package/dist/domain/cardTypes/index.js +10 -20
- package/dist/domain/cardTypes/index.js.map +1 -1
- package/dist/domain/cardTypes/schema.d.ts +0 -12
- package/dist/domain/cardTypes/schema.js +2 -12
- package/dist/domain/cardTypes/schema.js.map +1 -1
- package/dist/domain/cardTypes/service.d.ts +4 -16
- package/dist/domain/cardTypes/service.js +17 -25
- package/dist/domain/cardTypes/service.js.map +1 -1
- package/dist/domain/cards/index.d.ts +0 -12
- package/dist/domain/cards/index.js +120 -102
- package/dist/domain/cards/index.js.map +1 -1
- package/dist/domain/cards/lib.d.ts +6 -23
- package/dist/domain/cards/lib.js +7 -126
- package/dist/domain/cards/lib.js.map +1 -1
- package/dist/domain/cards/mermaid.d.ts +8 -0
- package/dist/domain/cards/mermaid.js +23 -0
- package/dist/domain/cards/mermaid.js.map +1 -0
- package/dist/domain/cards/schema.d.ts +6 -12
- package/dist/domain/cards/schema.js +6 -12
- package/dist/domain/cards/schema.js.map +1 -1
- package/dist/domain/cards/service.d.ts +28 -32
- package/dist/domain/cards/service.js +119 -83
- package/dist/domain/cards/service.js.map +1 -1
- package/dist/domain/connectors/index.d.ts +0 -12
- package/dist/domain/connectors/index.js +4 -14
- package/dist/domain/connectors/index.js.map +1 -1
- package/dist/domain/connectors/service.d.ts +2 -14
- package/dist/domain/connectors/service.js +4 -14
- package/dist/domain/connectors/service.js.map +1 -1
- package/dist/domain/events/events-by-project.d.ts +19 -0
- package/dist/domain/events/events-by-project.js +57 -0
- package/dist/domain/events/events-by-project.js.map +1 -0
- package/dist/domain/events/index.d.ts +0 -12
- package/dist/domain/events/index.js +3 -13
- package/dist/domain/events/index.js.map +1 -1
- package/dist/domain/events/lifetime.d.ts +0 -12
- package/dist/domain/events/lifetime.js +2 -12
- package/dist/domain/events/lifetime.js.map +1 -1
- package/dist/domain/events/project-events.d.ts +10 -14
- package/dist/domain/events/project-events.js +22 -18
- package/dist/domain/events/project-events.js.map +1 -1
- package/dist/domain/events/schema.d.ts +0 -12
- package/dist/domain/events/schema.js +2 -12
- package/dist/domain/events/schema.js.map +1 -1
- package/dist/domain/fieldTypes/index.d.ts +0 -12
- package/dist/domain/fieldTypes/index.js +6 -16
- package/dist/domain/fieldTypes/index.js.map +1 -1
- package/dist/domain/fieldTypes/schema.d.ts +0 -12
- package/dist/domain/fieldTypes/schema.js +2 -12
- package/dist/domain/fieldTypes/schema.js.map +1 -1
- package/dist/domain/fieldTypes/service.d.ts +4 -16
- package/dist/domain/fieldTypes/service.js +7 -17
- package/dist/domain/fieldTypes/service.js.map +1 -1
- package/dist/domain/graphModels/index.d.ts +0 -12
- package/dist/domain/graphModels/index.js +4 -14
- package/dist/domain/graphModels/index.js.map +1 -1
- package/dist/domain/graphModels/schema.d.ts +0 -12
- package/dist/domain/graphModels/schema.js +2 -12
- package/dist/domain/graphModels/schema.js.map +1 -1
- package/dist/domain/graphModels/service.d.ts +2 -14
- package/dist/domain/graphModels/service.js +4 -14
- package/dist/domain/graphModels/service.js.map +1 -1
- package/dist/domain/graphViews/index.d.ts +0 -12
- package/dist/domain/graphViews/index.js +4 -14
- package/dist/domain/graphViews/index.js.map +1 -1
- package/dist/domain/graphViews/schema.js +2 -0
- package/dist/domain/graphViews/schema.js.map +1 -1
- package/dist/domain/graphViews/service.d.ts +2 -14
- package/dist/domain/graphViews/service.js +4 -14
- package/dist/domain/graphViews/service.js.map +1 -1
- package/dist/domain/labels/index.d.ts +0 -12
- package/dist/domain/labels/index.js +4 -14
- package/dist/domain/labels/index.js.map +1 -1
- package/dist/domain/labels/service.d.ts +3 -15
- package/dist/domain/labels/service.js +5 -15
- package/dist/domain/labels/service.js.map +1 -1
- package/dist/domain/linkTypes/index.d.ts +0 -12
- package/dist/domain/linkTypes/index.js +6 -16
- package/dist/domain/linkTypes/index.js.map +1 -1
- package/dist/domain/linkTypes/schema.d.ts +0 -12
- package/dist/domain/linkTypes/schema.js +2 -12
- package/dist/domain/linkTypes/schema.js.map +1 -1
- package/dist/domain/linkTypes/service.d.ts +3 -15
- package/dist/domain/linkTypes/service.js +7 -17
- package/dist/domain/linkTypes/service.js.map +1 -1
- package/dist/domain/logicPrograms/index.d.ts +0 -12
- package/dist/domain/logicPrograms/index.js +4 -14
- package/dist/domain/logicPrograms/index.js.map +1 -1
- package/dist/domain/logicPrograms/service.d.ts +2 -14
- package/dist/domain/logicPrograms/service.js +5 -3
- package/dist/domain/logicPrograms/service.js.map +1 -1
- package/dist/domain/mcp/index.d.ts +3 -15
- package/dist/domain/mcp/index.js +27 -21
- package/dist/domain/mcp/index.js.map +1 -1
- package/dist/domain/project/index.d.ts +0 -12
- package/dist/domain/project/index.js +30 -40
- package/dist/domain/project/index.js.map +1 -1
- package/dist/domain/project/schema.d.ts +0 -12
- package/dist/domain/project/schema.js +2 -12
- package/dist/domain/project/schema.js.map +1 -1
- package/dist/domain/project/service.d.ts +16 -28
- package/dist/domain/project/service.js +48 -58
- package/dist/domain/project/service.js.map +1 -1
- package/dist/domain/projects/index.d.ts +2 -14
- package/dist/domain/projects/index.js +19 -36
- package/dist/domain/projects/index.js.map +1 -1
- package/dist/domain/projects/schema.d.ts +1 -12
- package/dist/domain/projects/schema.js +3 -12
- package/dist/domain/projects/schema.js.map +1 -1
- package/dist/domain/projects/service.d.ts +9 -35
- package/dist/domain/projects/service.js +12 -48
- package/dist/domain/projects/service.js.map +1 -1
- package/dist/domain/reports/index.d.ts +0 -12
- package/dist/domain/reports/index.js +4 -14
- package/dist/domain/reports/index.js.map +1 -1
- package/dist/domain/reports/schema.d.ts +0 -12
- package/dist/domain/reports/schema.js +2 -12
- package/dist/domain/reports/schema.js.map +1 -1
- package/dist/domain/reports/service.d.ts +2 -14
- package/dist/domain/reports/service.js +4 -14
- package/dist/domain/reports/service.js.map +1 -1
- package/dist/domain/resources/index.d.ts +0 -12
- package/dist/domain/resources/index.js +19 -26
- package/dist/domain/resources/index.js.map +1 -1
- package/dist/domain/resources/schema.js +2 -0
- package/dist/domain/resources/schema.js.map +1 -1
- package/dist/domain/resources/service.d.ts +11 -23
- package/dist/domain/resources/service.js +48 -59
- package/dist/domain/resources/service.js.map +1 -1
- package/dist/domain/skills/index.d.ts +0 -12
- package/dist/domain/skills/index.js +4 -14
- package/dist/domain/skills/index.js.map +1 -1
- package/dist/domain/skills/schema.d.ts +0 -12
- package/dist/domain/skills/schema.js +2 -12
- package/dist/domain/skills/schema.js.map +1 -1
- package/dist/domain/skills/service.d.ts +2 -14
- package/dist/domain/skills/service.js +4 -14
- package/dist/domain/skills/service.js.map +1 -1
- package/dist/domain/templates/index.d.ts +0 -12
- package/dist/domain/templates/index.js +8 -18
- package/dist/domain/templates/index.js.map +1 -1
- package/dist/domain/templates/schema.d.ts +0 -12
- package/dist/domain/templates/schema.js +2 -12
- package/dist/domain/templates/schema.js.map +1 -1
- package/dist/domain/templates/service.d.ts +4 -16
- package/dist/domain/templates/service.js +8 -18
- package/dist/domain/templates/service.js.map +1 -1
- package/dist/domain/tree/index.d.ts +0 -12
- package/dist/domain/tree/index.js +4 -14
- package/dist/domain/tree/index.js.map +1 -1
- package/dist/domain/tree/service.d.ts +3 -15
- package/dist/domain/tree/service.js +8 -15
- package/dist/domain/tree/service.js.map +1 -1
- package/dist/domain/workflows/index.d.ts +0 -12
- package/dist/domain/workflows/index.js +4 -14
- package/dist/domain/workflows/index.js.map +1 -1
- package/dist/domain/workflows/schema.d.ts +0 -12
- package/dist/domain/workflows/schema.js +2 -12
- package/dist/domain/workflows/schema.js.map +1 -1
- package/dist/domain/workflows/service.d.ts +2 -14
- package/dist/domain/workflows/service.js +4 -14
- package/dist/domain/workflows/service.js.map +1 -1
- package/dist/export.d.ts +6 -20
- package/dist/export.js +19 -29
- package/dist/export.js.map +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.js +19 -43
- package/dist/index.js.map +1 -1
- package/dist/main.js +19 -30
- package/dist/main.js.map +1 -1
- package/dist/middleware/auth.d.ts +0 -12
- package/dist/middleware/auth.js +2 -12
- package/dist/middleware/auth.js.map +1 -1
- package/dist/middleware/commandManager.d.ts +15 -20
- package/dist/middleware/commandManager.js +27 -36
- package/dist/middleware/commandManager.js.map +1 -1
- package/dist/middleware/tree.js +2 -0
- package/dist/middleware/tree.js.map +1 -1
- package/dist/middleware/zvalidator.js +2 -0
- package/dist/middleware/zvalidator.js.map +1 -1
- package/dist/overlay.d.ts +4 -16
- package/dist/overlay.js +22 -17
- package/dist/overlay.js.map +1 -1
- package/dist/public/THIRD-PARTY.txt +1397 -286
- package/dist/public/assets/__vite-browser-external-DGgK3jMU.js +1 -0
- package/dist/public/assets/abnfDiagram-WEYOIA3C-B3qq7PKv.js +1 -0
- package/dist/public/assets/architecture-WOLXFQ4H-Bzau2LI0.js +1 -0
- package/dist/public/assets/architectureDiagram-ZHVYKT53-Bg0cUwdb.js +36 -0
- package/dist/public/assets/blockDiagram-RJAE7QA3-0RJB-ra-.js +140 -0
- package/dist/public/assets/c4Diagram-XDPPPE54-BzoQcLvf.js +38 -0
- package/dist/public/assets/channel-6BNdw4Ax.js +1 -0
- package/dist/public/assets/{chunk-SVP7TREG-CIQMl7hl.js → chunk-2E7WHVMD-6aqPk-Hk.js} +4 -4
- package/dist/public/assets/chunk-4EMNKR2T-vovNSAaE.js +1 -0
- package/dist/public/assets/{chunk-F27PBJKO-tDfs6zeO.js → chunk-55XCU76K-DXkKnt2y.js} +1 -1
- package/dist/public/assets/chunk-7S6XSTFO-B9bfO0l3.js +2 -0
- package/dist/public/assets/chunk-AQDTSKZB-ilLy_cYP.js +72 -0
- package/dist/public/assets/chunk-DSNLSHJZ-DAudglXu.js +129 -0
- package/dist/public/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/public/assets/chunk-HAGFOTED-CSKFgs6b.js +62 -0
- package/dist/public/assets/chunk-HNE4Q36P-Cu5gPBVk.js +1 -0
- package/dist/public/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/public/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +136 -0
- package/dist/public/assets/chunk-NQOKRVIF-Bpcvhq1n.js +213 -0
- package/dist/public/assets/chunk-UHW7PFBP-BDjvOaTH.js +1 -0
- package/dist/public/assets/chunk-VQ5W62QI-DHTcO93W.js +1 -0
- package/dist/public/assets/chunk-WQQL4CDK-H6nAhuck.js +10 -0
- package/dist/public/assets/{chunk-XXDRQBXY-B7bWyHjt.js → chunk-XXDRQBXY-BUghdEVl.js} +1 -1
- package/dist/public/assets/chunk-YZO67HFG-D13E0_Yh.js +1 -0
- package/dist/public/assets/chunk-ZAUX2LTX-Dp5y-2wt.js +1 -0
- package/dist/public/assets/chunk-ZCHMQSOR-RJjlln1D.js +2 -0
- package/dist/public/assets/classDiagram-v2-4MYWR3UA-CAqiFCSv.js +217 -0
- package/dist/public/assets/cose-bilkent-JH36ORCC-C_VOHzoP.js +1 -0
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dyk4ZPjK.js +1 -0
- package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-_V_nrIhD.js → cynefinDiagram-WF24UDRP-b_Ia8gQX.js} +1 -1
- package/dist/public/assets/cytoscape.esm-GRKmfDkD.js +321 -0
- package/dist/public/assets/dagre-NK4GIZVX-CH1K1yF8.js +4 -0
- package/dist/public/assets/{diagram-VX7I27RA-De_UQv8C.js → diagram-CBK3MWTC-OaKd5avy.js} +13 -13
- package/dist/public/assets/diagram-I5XIIV2D-Cmu5z1ad.js +24 -0
- package/dist/public/assets/{diagram-S7CK7UJ4-25IjIKyo.js → diagram-ODIL2UCW-Cz1kkDDX.js} +7 -7
- package/dist/public/assets/diagram-PFBEJUXE-faMkmqUW.js +3 -0
- package/dist/public/assets/{diagram-UQ7AKVKN-C5VvsV7x.js → diagram-RJA3I4VV-nycvfte-.js} +2 -2
- package/dist/public/assets/diagram-TYUNFSNR-CjEv5QCm.js +200 -0
- package/dist/public/assets/{dist-BDCdLWk4.js → dist-DGs_yUrP.js} +1 -1
- package/dist/public/assets/ebnfDiagram-V4P3TTPT-DN-IIxCy.js +1 -0
- package/dist/public/assets/elk-QONTBCTQ-Bsam88GP.js +27 -0
- package/dist/public/assets/erDiagram-KYQIGQAA-DEU_qqNK.js +99 -0
- package/dist/public/assets/eventmodeling-K75KTNOO-Bl6NCM9E.js +1 -0
- package/dist/public/assets/flowDiagram-IUGLLWBU-Cl4qZ-36.js +1 -0
- package/dist/public/assets/ganttDiagram-R7GPNTJY-BmMd4aGi.js +292 -0
- package/dist/public/assets/gitGraph-VSP46ZUC-Q0H2PWek.js +1 -0
- package/dist/public/assets/gitGraphDiagram-PDYL7XHY-BlCTBYTj.js +106 -0
- package/dist/public/assets/index-CuBJ0hof.css +1 -0
- package/dist/public/assets/index-D701BZPh.js +2219 -0
- package/dist/public/assets/info-OHQRW6UA-D0TMPJxW.js +1 -0
- package/dist/public/assets/infoDiagram-MVDRKAX5-CljbtJXu.js +2 -0
- package/dist/public/assets/{ishikawaDiagram-5VMMS53U-KvT4DU1u.js → ishikawaDiagram-HPEHV2GE-_Y3Fr0hu.js} +6 -6
- package/dist/public/assets/{journeyDiagram-3NMN7TZE-PhGRkXkq.js → journeyDiagram-BOSHW7O7-Bo55jJ4m.js} +39 -39
- package/dist/public/assets/kanban-definition-FNSA4HC5-Cd-10MtF.js +89 -0
- package/dist/public/assets/katex-MEuSR36T.js +257 -0
- package/dist/public/assets/line-BDmh4sWC.js +1 -0
- package/dist/public/assets/linear-Dt7xjMrI.js +1 -0
- package/dist/public/assets/mermaid-parser.core-BJ1yyzvV.js +7 -0
- package/dist/public/assets/mindmap-definition-6OY57UG3-CRgumPuN.js +98 -0
- package/dist/public/assets/packet-JDAUHWVQ-DsTMT3Kw.js +1 -0
- package/dist/public/assets/pegDiagram-ECIUJNBX-BEGI5k3m.js +1 -0
- package/dist/public/assets/pie-XZMESJXO-COyqzA3N.js +1 -0
- package/dist/public/assets/pieDiagram-GNMPY74T-CrLJhZJJ.js +39 -0
- package/dist/public/assets/{quadrantDiagram-AXDQQJYC-B9dlNtZl.js → quadrantDiagram-D57K4MC3-Fl7HMHxK.js} +6 -6
- package/dist/public/assets/radar-ABXABTNO-DeXHKowk.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-CUjKUdPz.js +1 -0
- package/dist/public/assets/railroad-abnf-LNEFI6M7-B1aEgHE6.js +1 -0
- package/dist/public/assets/railroad-ebnf-DWYD2UWJ-DmmI3Voz.js +1 -0
- package/dist/public/assets/railroad-peg-JR7BVNR7-BHzi9m7r.js +1 -0
- package/dist/public/assets/railroadDiagram-Y72NRBL7-D1oeE5fy.js +1 -0
- package/dist/public/assets/requirementDiagram-EQYSW5RA-BJDKK1aS.js +84 -0
- package/dist/public/assets/rolldown-runtime-BCiCTKAo.js +1 -0
- package/dist/public/assets/{sankeyDiagram-P5KCCOFB-C4rb2pZ9.js → sankeyDiagram-SY24JHO5-C4g0OwZ9.js} +7 -7
- package/dist/public/assets/sequenceDiagram-BLEHNHQU-CEvy4P-b.js +169 -0
- package/dist/public/assets/src-MPsEqXxq.js +1 -0
- package/dist/public/assets/stateDiagram-v2-A6IESKWZ-BFhvw4Gl.js +291 -0
- package/dist/public/assets/swimlanes-B3ENRKFQ-BIl_Q-FM.js +1 -0
- package/dist/public/assets/swimlanesDiagram-AYQRV4AK-rvDbKEHQ.js +8 -0
- package/dist/public/assets/timeline-definition-JXYKGLGB-qAoWTH4N.js +120 -0
- package/dist/public/assets/treeView-D4JQ5SDB-vq16JKkJ.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-C0IZTaDk.js +1 -0
- package/dist/public/assets/usecaseDiagram-WPOLBNNX-Dq8iz49r.js +328 -0
- package/dist/public/assets/vennDiagram-Q3Y3IDCW-Br4JmRjM.js +34 -0
- package/dist/public/assets/wardley-7MLQ67FV-CEPlAQ79.js +1 -0
- package/dist/public/assets/{wardleyDiagram-VM6X3IG4-BOXpwLCv.js → wardleyDiagram-IVAIDKWA-DURB7Ue6.js} +4 -4
- package/dist/public/assets/xychartDiagram-4URNHDU4-BiZywfhy.js +7 -0
- package/dist/public/index.html +27 -21
- package/dist/public/sbom.cdx.json +1 -1
- package/dist/types.d.ts +0 -12
- package/dist/types.js +2 -12
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +12 -5
- package/dist/utils.js +18 -43
- package/dist/utils.js.map +1 -1
- package/package.json +13 -12
- package/src/app.ts +33 -43
- package/src/auth/index.ts +2 -12
- package/src/auth/keycloak.ts +2 -12
- package/src/auth/mock.ts +2 -12
- package/src/auth/types.ts +2 -12
- package/src/common/errors.ts +45 -0
- package/src/common/validationSchemas.ts +3 -12
- package/src/domain/auth/index.ts +2 -12
- package/src/domain/calculations/index.ts +4 -14
- package/src/domain/calculations/schema.ts +2 -12
- package/src/domain/calculations/service.ts +8 -21
- package/src/domain/cardTypes/index.ts +10 -20
- package/src/domain/cardTypes/schema.ts +3 -12
- package/src/domain/cardTypes/service.ts +22 -29
- package/src/domain/cards/index.ts +158 -128
- package/src/domain/cards/lib.ts +9 -161
- package/src/domain/cards/mermaid.ts +25 -0
- package/src/domain/cards/schema.ts +8 -12
- package/src/domain/cards/service.ts +165 -118
- package/src/domain/connectors/index.ts +5 -14
- package/src/domain/connectors/service.ts +5 -20
- package/src/domain/events/events-by-project.ts +59 -0
- package/src/domain/events/index.ts +3 -13
- package/src/domain/events/lifetime.ts +2 -12
- package/src/domain/events/project-events.ts +30 -18
- package/src/domain/events/schema.ts +2 -12
- package/src/domain/fieldTypes/index.ts +6 -16
- package/src/domain/fieldTypes/schema.ts +3 -12
- package/src/domain/fieldTypes/service.ts +9 -21
- package/src/domain/graphModels/index.ts +4 -14
- package/src/domain/graphModels/schema.ts +3 -12
- package/src/domain/graphModels/service.ts +5 -18
- package/src/domain/graphViews/index.ts +4 -14
- package/src/domain/graphViews/schema.ts +3 -0
- package/src/domain/graphViews/service.ts +5 -18
- package/src/domain/labels/index.ts +4 -14
- package/src/domain/labels/service.ts +6 -16
- package/src/domain/linkTypes/index.ts +6 -16
- package/src/domain/linkTypes/schema.ts +2 -12
- package/src/domain/linkTypes/service.ts +8 -21
- package/src/domain/logicPrograms/index.ts +5 -17
- package/src/domain/logicPrograms/service.ts +7 -16
- package/src/domain/mcp/index.ts +33 -24
- package/src/domain/project/index.ts +34 -40
- package/src/domain/project/schema.ts +2 -12
- package/src/domain/project/service.ts +56 -71
- package/src/domain/projects/index.ts +34 -50
- package/src/domain/projects/schema.ts +3 -12
- package/src/domain/projects/service.ts +18 -88
- package/src/domain/reports/index.ts +4 -14
- package/src/domain/reports/schema.ts +2 -12
- package/src/domain/reports/service.ts +5 -18
- package/src/domain/resources/index.ts +19 -30
- package/src/domain/resources/schema.ts +3 -0
- package/src/domain/resources/service.ts +55 -90
- package/src/domain/skills/index.ts +4 -14
- package/src/domain/skills/schema.ts +2 -12
- package/src/domain/skills/service.ts +5 -15
- package/src/domain/templates/index.ts +8 -18
- package/src/domain/templates/schema.ts +2 -12
- package/src/domain/templates/service.ts +9 -22
- package/src/domain/tree/index.ts +4 -14
- package/src/domain/tree/service.ts +10 -21
- package/src/domain/workflows/index.ts +4 -14
- package/src/domain/workflows/schema.ts +2 -12
- package/src/domain/workflows/service.ts +5 -18
- package/src/export.ts +24 -33
- package/src/index.ts +29 -48
- package/src/main.ts +25 -35
- package/src/middleware/auth.ts +2 -12
- package/src/middleware/commandManager.ts +35 -50
- package/src/middleware/tree.ts +3 -0
- package/src/middleware/zvalidator.ts +3 -0
- package/src/overlay.ts +29 -19
- package/src/types.ts +2 -12
- package/src/utils.ts +26 -46
- package/dist/project-errors.d.ts +0 -18
- package/dist/project-errors.js +0 -25
- package/dist/project-errors.js.map +0 -1
- package/dist/project-registry.d.ts +0 -65
- package/dist/project-registry.js +0 -121
- package/dist/project-registry.js.map +0 -1
- package/dist/public/assets/__vite-browser-external-PaJ7c2l8.js +0 -1
- package/dist/public/assets/abnfDiagram-VCTEODGH-DB2dfOGe.js +0 -1
- package/dist/public/assets/architecture-7GRP2DOG-2V0X8hxt.js +0 -1
- package/dist/public/assets/architectureDiagram-5GKGNRK7-CRhUR2Ul.js +0 -36
- package/dist/public/assets/blockDiagram-I7D4REHJ-DJKsYF1v.js +0 -129
- package/dist/public/assets/c4Diagram-7LVT6UL2-BTwMzoAF.js +0 -38
- package/dist/public/assets/channel-C0JtPpMA.js +0 -1
- package/dist/public/assets/chunk-4HAMMTFA-DjjgrBsB.js +0 -62
- package/dist/public/assets/chunk-75Z2AOVW-CKqXRGJV.js +0 -2
- package/dist/public/assets/chunk-DU6HZSFF-iJGdiRt7.js +0 -127
- package/dist/public/assets/chunk-FOHPRMQF-DzxwRta7.js +0 -161
- package/dist/public/assets/chunk-GMAD6QVW-DxHVEaGj.js +0 -72
- package/dist/public/assets/chunk-GVQU2GXP-AMxD4_Ta.js +0 -1
- package/dist/public/assets/chunk-IMKFNOWR-0rz8QrYC.js +0 -231
- package/dist/public/assets/chunk-L3NEJ4N5-BK3KAKMe.js +0 -1
- package/dist/public/assets/chunk-OSK3NFVY-B8MdrI_M.js +0 -10
- package/dist/public/assets/chunk-P2QGCYS3-D3J5AcHg.js +0 -1
- package/dist/public/assets/chunk-POPQ4Y6H-CsYg_XkK.js +0 -1
- package/dist/public/assets/chunk-PWAF6VOD-D9cdEIZp.js +0 -1
- package/dist/public/assets/chunk-SHT3W25Y-1jjokCf3.js +0 -168
- package/dist/public/assets/chunk-TICWLB2K-Ccsy2PYz.js +0 -206
- package/dist/public/assets/classDiagram-ZZMXUADV-mWyXNAXi.js +0 -1
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-mWyXNAXi.js +0 -1
- package/dist/public/assets/cose-bilkent-JH36ORCC-DPzc3Pv4.js +0 -1
- package/dist/public/assets/cynefin-OW5HDTMX-BIVDCYOU.js +0 -1
- package/dist/public/assets/cytoscape.esm-NgwPT4ez.js +0 -321
- package/dist/public/assets/dagre-C-rnJpZF.js +0 -1
- package/dist/public/assets/dagre-GXQ25YYZ-CJc0wc6f.js +0 -4
- package/dist/public/assets/diagram-VSXAHHWV-Dw3rKVL_.js +0 -3
- package/dist/public/assets/diagram-Z3DM3KII-Bd-65QQW.js +0 -24
- package/dist/public/assets/ebnfDiagram-PWID7BFC-CrxdET5U.js +0 -1
- package/dist/public/assets/erDiagram-RLTQ6QDP-BKo0Uyna.js +0 -99
- package/dist/public/assets/eventmodeling-NTZA5JFV-DKkAdJZd.js +0 -1
- package/dist/public/assets/flowDiagram-HODETNUW-CEE2wjdt.js +0 -1
- package/dist/public/assets/ganttDiagram-EL5Y4UJY-BHFn8vk0.js +0 -292
- package/dist/public/assets/gitGraph-4MIJSDKK-Bpvnb45u.js +0 -1
- package/dist/public/assets/gitGraphDiagram-WWUBYQGX-Bw0EoxBY.js +0 -106
- package/dist/public/assets/index-D3HS7YxF.js +0 -2228
- package/dist/public/assets/index-Sv3WxZ_8.css +0 -1
- package/dist/public/assets/info-A6RAGUB7-BvvG_zrk.js +0 -1
- package/dist/public/assets/infoDiagram-27XIBGKW-CtpdJmtL.js +0 -2
- package/dist/public/assets/kanban-definition-UXKFOSKX-Oyx5QgRq.js +0 -89
- package/dist/public/assets/katex-ZlcWpGUi.js +0 -257
- package/dist/public/assets/line-Dr41HTk1.js +0 -1
- package/dist/public/assets/linear-DDBi9FwZ.js +0 -1
- package/dist/public/assets/mermaid-parser.core-DsIAxDBa.js +0 -7
- package/dist/public/assets/mindmap-definition-YA3MSWOX-r8hvd6gP.js +0 -96
- package/dist/public/assets/packet-AYTQ26CC-B0EpJ2Sc.js +0 -1
- package/dist/public/assets/pegDiagram-XKGWAZYB-DaNkQTQF.js +0 -1
- package/dist/public/assets/pie-WAS4IAKB-Dt2zttL9.js +0 -1
- package/dist/public/assets/pieDiagram-E7YTZNPT-x0XWEGbd.js +0 -39
- package/dist/public/assets/radar-RG4KPBEZ-DjbR4-5l.js +0 -1
- package/dist/public/assets/railroad-74A4TZTK-Bk3B5r_R.js +0 -1
- package/dist/public/assets/railroad-abnf-HS5TGJTU-DxaWfACD.js +0 -1
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-DscxXZO0.js +0 -1
- package/dist/public/assets/railroad-peg-WCYAUIDC-BCWzRFzw.js +0 -1
- package/dist/public/assets/railroadDiagram-O6MQD6OU-DhwsoX6A.js +0 -1
- package/dist/public/assets/requirementDiagram-BXWQKSXE-BiqZ6axf.js +0 -84
- package/dist/public/assets/rolldown-runtime-B0Z9INg1.js +0 -1
- package/dist/public/assets/sequenceDiagram-WJ2MYXX4-DRKTnGD7.js +0 -162
- package/dist/public/assets/src-an_qrnIj.js +0 -1
- package/dist/public/assets/stateDiagram-D77RDMKH-xxdybg5Z.js +0 -1
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-CXzmJy_a.js +0 -1
- package/dist/public/assets/swimlanes-42K2YHIH-DyGI1gI6.js +0 -1
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-7hqb6VoW.js +0 -8
- package/dist/public/assets/timeline-definition-24CTP7MA-C2pIp77Q.js +0 -120
- package/dist/public/assets/treeView-Q6P3EWNA-CxRtaaB8.js +0 -1
- package/dist/public/assets/treemap-WGGIJYW6-G1IHiwTa.js +0 -1
- package/dist/public/assets/vennDiagram-4TSXK5OY-CwimQRR9.js +0 -34
- package/dist/public/assets/wardley-WFR3VGLG-DkQ3TjZX.js +0 -1
- package/dist/public/assets/xychartDiagram-S5SC5T6Z-ChOPYsHc.js +0 -7
- package/src/project-errors.ts +0 -33
- package/src/project-registry.ts +0 -161
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
import { z } from 'zod';
|
|
14
4
|
import { identifierSchema } from '../../common/validationSchemas.js';
|
|
15
5
|
export const createTemplateSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/templates/schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/templates/schema.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;IACnD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
|
-
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
-
export declare function getTemplatesWithDetails(commands: CommandManager): Promise<import("@cyberismo/data-handler").TemplateConfiguration[]>;
|
|
15
|
-
export declare function createTemplate(commands: CommandManager, templateName: string): Promise<void>;
|
|
16
|
-
export declare function addTemplateCard(commands: CommandManager, template: string, cardType: string, parentKey?: string, count?: number): Promise<string[]>;
|
|
1
|
+
import type { Workspace } from '@cyberismo/data-handler';
|
|
2
|
+
export declare function getTemplatesWithDetails(ws: Workspace): Promise<import("@cyberismo/model").ResourceBaseMetadata[]>;
|
|
3
|
+
export declare function createTemplate(ws: Workspace, templateName: string): Promise<void>;
|
|
4
|
+
export declare function addTemplateCard(ws: Workspace, template: string, cardType: string, parentKey?: string, count?: number): Promise<string[]>;
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
import { resourceName } from '@cyberismo/data-handler';
|
|
14
|
-
export async function getTemplatesWithDetails(
|
|
15
|
-
const response = await
|
|
4
|
+
export async function getTemplatesWithDetails(ws) {
|
|
5
|
+
const response = await ws.resources.contents('templates');
|
|
16
6
|
if (!response) {
|
|
17
7
|
throw new Error('No templates found');
|
|
18
8
|
}
|
|
19
9
|
return response;
|
|
20
10
|
}
|
|
21
|
-
export async function createTemplate(
|
|
22
|
-
await
|
|
11
|
+
export async function createTemplate(ws, templateName) {
|
|
12
|
+
await ws.resources.create(templateName, 'templates', {});
|
|
23
13
|
}
|
|
24
|
-
export async function addTemplateCard(
|
|
14
|
+
export async function addTemplateCard(ws, template, cardType, parentKey, count) {
|
|
25
15
|
const { identifier, type } = resourceName(template);
|
|
26
16
|
if (type !== 'templates') {
|
|
27
17
|
throw new Error('Invalid template resource');
|
|
28
18
|
}
|
|
29
|
-
const added = await
|
|
19
|
+
const added = await ws.cards.addToTemplate(cardType, identifier, parentKey, count);
|
|
30
20
|
if (!added || added.length === 0) {
|
|
31
21
|
throw new Error('No cards created');
|
|
32
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/templates/service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/templates/service.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAAa;IACzD,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAC1D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAa,EAAE,YAAoB;IACtE,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,EAAa,EACb,QAAgB,EAChB,QAAgB,EAChB,SAAkB,EAClB,KAAc;IAEd,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACpD,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,aAAa,CACxC,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,CACN,CAAC;IACF,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
1
|
import { Hono } from 'hono';
|
|
14
2
|
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
3
|
export default router;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
import { Hono } from 'hono';
|
|
14
4
|
import * as treeService from './service.js';
|
|
15
5
|
import { isSSGContext } from 'hono/ssg';
|
|
@@ -31,10 +21,10 @@ const router = new Hono();
|
|
|
31
21
|
* description: project_path not set or other internal error
|
|
32
22
|
*/
|
|
33
23
|
router.get('/', requireRole(UserRole.Reader), async (c) => {
|
|
34
|
-
const
|
|
24
|
+
const ws = c.get('ws');
|
|
35
25
|
const tree = c.get('tree');
|
|
36
26
|
try {
|
|
37
|
-
const response = await treeService.getCardTree(
|
|
27
|
+
const response = await treeService.getCardTree(ws, isSSGContext(c), tree?.cardKey, tree?.recursive);
|
|
38
28
|
return c.json(response);
|
|
39
29
|
}
|
|
40
30
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/tree/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/tree/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAa,EAAE,EAAE;IACpE,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE3B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,WAAW,CAC5C,EAAE,EACF,YAAY,CAAC,CAAC,CAAC,EACf,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,SAAS,CAChB,CAAC;QACF,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,CAAC,IAAI,CACX;YACE,KAAK,EAAE,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,cAAc,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE;SACvG,EACD,GAAG,CACJ,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
|
-
import type { CommandManager } from '@cyberismo/data-handler';
|
|
1
|
+
import type { Workspace } from '@cyberismo/data-handler';
|
|
14
2
|
/**
|
|
15
3
|
* Returns the card tree of the project
|
|
16
|
-
* @param
|
|
4
|
+
* @param ws command manager used for the query
|
|
17
5
|
* @param isSsg whether the context is static site generation
|
|
18
6
|
* @param cardKey optional card key to start the tree from
|
|
19
7
|
* @param recursive if false, includes only the given card. Otherwise, includes all child cards recursively.
|
|
20
8
|
* @returns
|
|
21
9
|
*/
|
|
22
|
-
export declare function getCardTree(
|
|
10
|
+
export declare function getCardTree(ws: Workspace, isSsg: boolean, cardKey?: string, recursive?: boolean): ReturnType<typeof ws.queries.runQuery>;
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
/**
|
|
14
4
|
* Returns the card tree of the project
|
|
15
|
-
* @param
|
|
5
|
+
* @param ws command manager used for the query
|
|
16
6
|
* @param isSsg whether the context is static site generation
|
|
17
7
|
* @param cardKey optional card key to start the tree from
|
|
18
8
|
* @param recursive if false, includes only the given card. Otherwise, includes all child cards recursively.
|
|
19
9
|
* @returns
|
|
20
10
|
*/
|
|
21
|
-
export async function getCardTree(
|
|
22
|
-
return
|
|
11
|
+
export async function getCardTree(ws, isSsg, cardKey, recursive) {
|
|
12
|
+
return ws.queries.runQuery('tree', isSsg ? 'exportedSite' : 'localApp', {
|
|
13
|
+
cardKey,
|
|
14
|
+
recursive,
|
|
15
|
+
});
|
|
23
16
|
}
|
|
24
17
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/tree/service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/tree/service.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAIzC;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,EAAa,EACb,KAAc,EACd,OAAgB,EAChB,SAAmB;IAEnB,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU,EAAE;QACtE,OAAO;QACP,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
1
|
import { Hono } from 'hono';
|
|
14
2
|
declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
15
3
|
export default router;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
import { Hono } from 'hono';
|
|
14
4
|
import * as workflowService from './service.js';
|
|
15
5
|
import { createWorkflowSchema } from './schema.js';
|
|
@@ -43,9 +33,9 @@ const router = new Hono();
|
|
|
43
33
|
* description: Server error
|
|
44
34
|
*/
|
|
45
35
|
router.post('/', requireRole(UserRole.Admin), zValidator('json', createWorkflowSchema), async (c) => {
|
|
46
|
-
const
|
|
36
|
+
const ws = c.get('ws');
|
|
47
37
|
const { identifier } = c.req.valid('json');
|
|
48
|
-
await workflowService.createWorkflow(
|
|
38
|
+
await workflowService.createWorkflow(ws, identifier);
|
|
49
39
|
return c.json({ message: 'Workflow created successfully' });
|
|
50
40
|
});
|
|
51
41
|
export default router;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/workflows/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/workflows/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,eAAe,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,IAAI,CACT,GAAG,EACH,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC3B,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,EACxC,KAAK,EAAE,CAAC,EAAE,EAAE;IACV,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3C,MAAM,eAAe,CAAC,cAAc,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC,CAAC;AAC9D,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
1
|
import { z } from 'zod';
|
|
14
2
|
export declare const createWorkflowSchema: z.ZodObject<{
|
|
15
3
|
identifier: z.ZodString;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
import { z } from 'zod';
|
|
14
4
|
import { identifierSchema } from '../../common/validationSchemas.js';
|
|
15
5
|
export const createWorkflowSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/workflows/schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/workflows/schema.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
|
-
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
-
export declare function createWorkflow(commands: CommandManager, workflowName: string): Promise<void>;
|
|
1
|
+
import type { Workspace } from '@cyberismo/data-handler';
|
|
2
|
+
export declare function createWorkflow(ws: Workspace, workflowName: string): Promise<void>;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
|
-
export async function createWorkflow(commands, workflowName) {
|
|
14
|
-
await commands.createCmd.createWorkflow(workflowName, '');
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
export async function createWorkflow(ws, workflowName) {
|
|
4
|
+
await ws.resources.create(workflowName, 'workflows', {});
|
|
15
5
|
}
|
|
16
6
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/workflows/service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/workflows/service.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAIzC,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAa,EAAE,YAAoB;IACtE,MAAM,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/export.d.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
13
|
-
import type { CommandManager } from '@cyberismo/data-handler';
|
|
14
|
-
import type { ProjectRegistry } from './project-registry.js';
|
|
15
|
-
import type { QueryResult } from '@cyberismo/data-handler/types/queries';
|
|
1
|
+
import { type ProjectDirectory, type Workspace } from '@cyberismo/data-handler';
|
|
2
|
+
import type { QueryResult, ProjectErrors } from '@cyberismo/model';
|
|
16
3
|
import type { TreeOptions } from './types.js';
|
|
17
|
-
import type { ProjectErrors } from './project-errors.js';
|
|
18
4
|
export interface ExportSiteOptions extends TreeOptions {
|
|
19
5
|
defaultProject?: string;
|
|
20
6
|
}
|
|
@@ -26,15 +12,15 @@ export declare function reset(): void;
|
|
|
26
12
|
/**
|
|
27
13
|
* Get the card query result for a given card key. Should only be called during
|
|
28
14
|
* static site generation
|
|
29
|
-
* @param
|
|
15
|
+
* @param ws - Handle of the project.
|
|
30
16
|
* @param cardKey - Key of the card to get the query result for.
|
|
31
17
|
* @returns The card query result for the given card key.
|
|
32
18
|
*/
|
|
33
|
-
export declare function getCardQueryResult(
|
|
19
|
+
export declare function getCardQueryResult(ws: Workspace, cardKey?: string): Promise<QueryResult<'card'>[]>;
|
|
34
20
|
/**
|
|
35
21
|
* Export the site to a given directory.
|
|
36
22
|
* Note: Do not call this function in parallel.
|
|
37
|
-
* @param
|
|
23
|
+
* @param directory - Directory the exported projects are opened from.
|
|
38
24
|
* @param exportDir - Directory to export to.
|
|
39
25
|
* @param options - Export options.
|
|
40
26
|
* @param options.recursive - Whether to export cards recursively.
|
|
@@ -43,6 +29,6 @@ export declare function getCardQueryResult(commands: CommandManager, cardKey?: s
|
|
|
43
29
|
* @param onProgress - Optional progress callback function.
|
|
44
30
|
* @returns Errors that occurred during export, grouped by project.
|
|
45
31
|
*/
|
|
46
|
-
export declare function exportSite(
|
|
32
|
+
export declare function exportSite(directory: ProjectDirectory, exportDir?: string, options?: ExportSiteOptions, onProgress?: (current: number, total: number) => void): Promise<{
|
|
47
33
|
errors: ProjectErrors[];
|
|
48
34
|
}>;
|
package/dist/export.js
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2025
|
|
4
|
-
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
-
the terms of the GNU Affero General Public License version 3 as published by
|
|
6
|
-
the Free Software Foundation.
|
|
7
|
-
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
10
|
-
details. You should have received a copy of the GNU Affero General Public
|
|
11
|
-
License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
12
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
13
3
|
import fs from 'node:fs/promises';
|
|
4
|
+
import { SYSTEM_ACTOR, } from '@cyberismo/data-handler';
|
|
14
5
|
import { createApp } from './app.js';
|
|
15
6
|
import { MockAuthProvider } from './auth/mock.js';
|
|
16
7
|
import { cp } from 'node:fs/promises';
|
|
17
8
|
import { staticFrontendDirRelative } from './utils.js';
|
|
18
9
|
import { toSSG } from 'hono/ssg';
|
|
19
10
|
import { findAllCards, findRelevantAttachments, } from './domain/cards/service.js';
|
|
11
|
+
import { CARD_ROUTES_PER_KEY } from './domain/cards/lib.js';
|
|
20
12
|
const _cardQueryCache = new Map();
|
|
21
13
|
/** Label for errors from routes that belong to no project. */
|
|
22
14
|
const SHARED_ROUTES = '(shared)';
|
|
@@ -31,14 +23,14 @@ export function reset() {
|
|
|
31
23
|
/**
|
|
32
24
|
* Get the card query result for a given card key. Should only be called during
|
|
33
25
|
* static site generation
|
|
34
|
-
* @param
|
|
26
|
+
* @param ws - Handle of the project.
|
|
35
27
|
* @param cardKey - Key of the card to get the query result for.
|
|
36
28
|
* @returns The card query result for the given card key.
|
|
37
29
|
*/
|
|
38
|
-
export async function getCardQueryResult(
|
|
39
|
-
const prefix =
|
|
30
|
+
export async function getCardQueryResult(ws, cardKey) {
|
|
31
|
+
const prefix = ws.settings.prefix;
|
|
40
32
|
if (!_cardQueryCache.has(prefix)) {
|
|
41
|
-
_cardQueryCache.set(prefix,
|
|
33
|
+
_cardQueryCache.set(prefix, ws.queries.runQuery('card', 'exportedSite', {}));
|
|
42
34
|
}
|
|
43
35
|
return _cardQueryCache.get(prefix).then((results) => {
|
|
44
36
|
if (!cardKey) {
|
|
@@ -54,7 +46,7 @@ export async function getCardQueryResult(commands, cardKey) {
|
|
|
54
46
|
/**
|
|
55
47
|
* Export the site to a given directory.
|
|
56
48
|
* Note: Do not call this function in parallel.
|
|
57
|
-
* @param
|
|
49
|
+
* @param directory - Directory the exported projects are opened from.
|
|
58
50
|
* @param exportDir - Directory to export to.
|
|
59
51
|
* @param options - Export options.
|
|
60
52
|
* @param options.recursive - Whether to export cards recursively.
|
|
@@ -63,37 +55,35 @@ export async function getCardQueryResult(commands, cardKey) {
|
|
|
63
55
|
* @param onProgress - Optional progress callback function.
|
|
64
56
|
* @returns Errors that occurred during export, grouped by project.
|
|
65
57
|
*/
|
|
66
|
-
export async function exportSite(
|
|
58
|
+
export async function exportSite(directory, exportDir, options, onProgress) {
|
|
67
59
|
exportDir = exportDir || 'static';
|
|
68
60
|
const { defaultProject, ...treeOpts } = options ?? {};
|
|
69
61
|
const opts = {
|
|
70
62
|
recursive: false,
|
|
71
63
|
...treeOpts,
|
|
72
64
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
.map((p) => p.prefix)
|
|
77
|
-
.join(', ')}`);
|
|
65
|
+
const prefixes = (await directory.list()).map((p) => p.prefix);
|
|
66
|
+
if (defaultProject && !prefixes.includes(defaultProject)) {
|
|
67
|
+
throw new Error(`Default project '${defaultProject}' is not in the registry. Available: ${prefixes.join(', ')}`);
|
|
78
68
|
}
|
|
79
69
|
if (defaultProject) {
|
|
80
70
|
process.env.CYBERISMO_DEFAULT_PROJECT = defaultProject;
|
|
81
71
|
}
|
|
82
|
-
const app = createApp(new MockAuthProvider(),
|
|
72
|
+
const app = createApp(new MockAuthProvider(), directory, opts, prefixes);
|
|
83
73
|
// copy whole frontend to the same directory
|
|
84
74
|
await cp(staticFrontendDirRelative, exportDir, { recursive: true });
|
|
85
75
|
reset();
|
|
86
76
|
// estimate total based on the number of cards to export across all projects
|
|
87
77
|
let total = OVERHEAD_CALLS;
|
|
88
|
-
for (const
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
|
|
78
|
+
for (const prefix of prefixes) {
|
|
79
|
+
const ws = await directory.open(prefix, SYSTEM_ACTOR);
|
|
80
|
+
const cards = await findAllCards(ws, opts);
|
|
81
|
+
const attachments = await findRelevantAttachments(ws, opts);
|
|
82
|
+
total += cards.length * CARD_ROUTES_PER_KEY + attachments.length;
|
|
92
83
|
}
|
|
93
84
|
// One pass per project so an error is attributed to the project whose route
|
|
94
85
|
// produced it (the response itself carries no project). Shared routes get
|
|
95
86
|
// their own pass so each route is emitted exactly once.
|
|
96
|
-
const prefixes = registry.list().map((p) => p.prefix);
|
|
97
87
|
const projectOf = (pathname) => prefixes.find((p) => {
|
|
98
88
|
const base = `/api/projects/${p}`;
|
|
99
89
|
return pathname === base || pathname.startsWith(`${base}/`);
|
package/dist/export.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../src/export.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../src/export.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { AuthProvider } from './auth/types.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProjectDirectory } from '@cyberismo/data-handler';
|
|
3
3
|
export { MockAuthProvider } from './auth/mock.js';
|
|
4
4
|
export type { MockUserConfig } from './auth/mock.js';
|
|
5
5
|
export type { AuthProvider } from './auth/types.js';
|
|
6
6
|
export { exportSite, type ExportSiteOptions } from './export.js';
|
|
7
|
-
export { ProjectRegistry } from './project-registry.js';
|
|
8
|
-
export { formatProjectErrors, type ProjectErrors } from './project-errors.js';
|
|
9
7
|
/**
|
|
10
8
|
* Preview the exported site
|
|
11
9
|
* @param dir - Directory to preview
|
|
@@ -15,7 +13,7 @@ export declare function previewSite(dir: string, findPort?: boolean): Promise<vo
|
|
|
15
13
|
/**
|
|
16
14
|
* Start the server
|
|
17
15
|
* @param authProvider - Authentication provider
|
|
18
|
-
* @param
|
|
16
|
+
* @param directory - Directory the projects are opened from
|
|
19
17
|
* @param findPort - If true, find a free port
|
|
20
18
|
*/
|
|
21
|
-
export declare function startServer(authProvider: AuthProvider,
|
|
19
|
+
export declare function startServer(authProvider: AuthProvider, directory: ProjectDirectory, findPort?: boolean, multiProjectRoot?: string): Promise<void>;
|