@cyberismo/backend 1.2.0 → 1.3.1
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 +31 -44
- 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/frontend.d.ts +22 -0
- package/dist/frontend.js +51 -0
- package/dist/frontend.js.map +1 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +22 -48
- 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 +37 -52
- 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/frontend.ts +58 -0
- package/src/index.ts +32 -53
- 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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
/**
|
|
4
|
+
* Regex that matches standard AsciiDoc mermaid diagram blocks.
|
|
5
|
+
* Supports [mermaid], [mermaid,id], [mermaid,id,format=svg], etc.
|
|
6
|
+
* Matches both literal blocks (....) and listing blocks (----).
|
|
7
|
+
* Supports both LF and CRLF line endings.
|
|
8
|
+
*/
|
|
9
|
+
const MERMAID_BLOCK_REGEX = /\[mermaid[^\]]*\]\r?\n(\.{4,}|-{4,})\r?\n([\s\S]*?)\r?\n\1/g;
|
|
10
|
+
/**
|
|
11
|
+
* Pre-processes AsciiDoc content to convert [mermaid] blocks into passthrough HTML
|
|
12
|
+
* that can be detected and rendered by the frontend.
|
|
13
|
+
* This must run BEFORE asciidoctor.js converts the AsciiDoc to HTML.
|
|
14
|
+
* @param content - Raw AsciiDoc content
|
|
15
|
+
* @returns AsciiDoc content with mermaid blocks replaced by passthrough HTML divs
|
|
16
|
+
*/
|
|
17
|
+
export function preprocessMermaidBlocksForHtml(content) {
|
|
18
|
+
return content.replace(MERMAID_BLOCK_REGEX, (_match, _delim, code) => {
|
|
19
|
+
const encoded = Buffer.from(code, 'utf-8').toString('base64');
|
|
20
|
+
return `++++\n<div class="mermaid-block" data-mermaid-code="${encoded}"></div>\n++++`;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=mermaid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid.js","sourceRoot":"","sources":["../../../src/domain/cards/mermaid.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC;;;;;GAKG;AACH,MAAM,mBAAmB,GACvB,6DAA6D,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAAC,OAAe;IAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACnE,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC9D,OAAO,uDAAuD,OAAO,gBAAgB,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2026
|
|
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';
|
|
2
|
+
export declare const cardKeyParamSchema: z.ZodObject<{
|
|
3
|
+
key: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
14
5
|
export declare const createLinkSchema: z.ZodObject<{
|
|
15
6
|
toCard: z.ZodString;
|
|
16
7
|
linkType: z.ZodString;
|
|
@@ -53,3 +44,6 @@ export declare const exportCardPdfSchema: z.ZodObject<{
|
|
|
53
44
|
version: z.ZodOptional<z.ZodString>;
|
|
54
45
|
}, z.core.$strip>;
|
|
55
46
|
export type ExportCardPdfRequestBody = z.infer<typeof exportCardPdfSchema>;
|
|
47
|
+
export declare const cardBatchSchema: z.ZodObject<{
|
|
48
|
+
keys: z.ZodArray<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2026
|
|
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';
|
|
4
|
+
export const cardKeyParamSchema = z.object({ key: z.string().min(1) });
|
|
14
5
|
const linkDirection = z.enum(['outbound', 'inbound']);
|
|
15
6
|
export const createLinkSchema = z.object({
|
|
16
7
|
toCard: z.string(),
|
|
@@ -47,4 +38,7 @@ export const exportCardPdfSchema = z.object({
|
|
|
47
38
|
exportChildCards: z.boolean(),
|
|
48
39
|
version: headerValue.optional(),
|
|
49
40
|
});
|
|
41
|
+
export const cardBatchSchema = z.object({
|
|
42
|
+
keys: z.array(z.string()).min(1).max(100),
|
|
43
|
+
});
|
|
50
44
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/cards/schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/cards/schema.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEvE,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAA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C;CAC1C,CAAC,CAAC"}
|
|
@@ -1,64 +1,60 @@
|
|
|
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 { ExportPdfOptions } from '@cyberismo/data-handler/interfaces/project-interfaces';
|
|
14
|
-
import type { attachmentPayload } from '@cyberismo/data-handler/interfaces/request-status-interfaces';
|
|
15
|
-
import { type CommandManager } from '@cyberismo/data-handler';
|
|
1
|
+
import type { AttachmentContent, Card, ExportPdfOptions, QueryResult } from '@cyberismo/model';
|
|
2
|
+
import { type Workspace } from '@cyberismo/data-handler';
|
|
16
3
|
import { allCards } from './lib.js';
|
|
17
4
|
import type { TreeOptions } from '../../types.js';
|
|
18
|
-
export declare function
|
|
5
|
+
export declare function getCardData(ws: Workspace, key: string, staticMode: boolean): Promise<QueryResult<'card'>>;
|
|
6
|
+
/** One solve for many cards; keys the project does not hold are left out. */
|
|
7
|
+
export declare function getCardBatch(ws: Workspace, keys: string[]): Promise<Record<string, QueryResult<'card'>>>;
|
|
8
|
+
export declare function getCardContent(ws: Workspace, key: string, staticMode: boolean): Promise<{
|
|
9
|
+
adocContent: string;
|
|
10
|
+
}>;
|
|
11
|
+
type StaticCardSource = Pick<Card, 'key' | 'path' | 'content' | 'attachments'>;
|
|
12
|
+
export declare function getCardSource(ws: Workspace, key: string, staticMode: boolean): Promise<Card | StaticCardSource>;
|
|
13
|
+
export declare function getProjectInfo(ws: Workspace): Promise<{
|
|
19
14
|
name: string;
|
|
20
15
|
prefix: string;
|
|
21
|
-
workflows:
|
|
22
|
-
cardTypes:
|
|
16
|
+
workflows: import("@cyberismo/model").Workflow[];
|
|
17
|
+
cardTypes: import("@cyberismo/model").CardType[];
|
|
23
18
|
}>;
|
|
24
|
-
export declare function updateCard(
|
|
25
|
-
export declare function deleteCard(
|
|
26
|
-
export declare function createCard(
|
|
27
|
-
export declare function uploadAttachments(
|
|
19
|
+
export declare function updateCard(ws: Workspace, key: string, body: any): Promise<void>;
|
|
20
|
+
export declare function deleteCard(ws: Workspace, key: string): Promise<void>;
|
|
21
|
+
export declare function createCard(ws: Workspace, template: string, parentKey?: string): Promise<Card[]>;
|
|
22
|
+
export declare function uploadAttachments(ws: Workspace, key: string, files: File[]): Promise<{
|
|
28
23
|
message: string;
|
|
29
24
|
files: string[];
|
|
30
25
|
}>;
|
|
31
|
-
export declare function removeAttachment(
|
|
26
|
+
export declare function removeAttachment(ws: Workspace, key: string, filename: string): Promise<{
|
|
32
27
|
message: string;
|
|
33
28
|
}>;
|
|
34
|
-
export declare function parseContent(
|
|
29
|
+
export declare function parseContent(ws: Workspace, key: string, content: string): Promise<{
|
|
35
30
|
adocContent: string;
|
|
36
31
|
}>;
|
|
37
|
-
export declare function createLink(
|
|
32
|
+
export declare function createLink(ws: Workspace, key: string, target: string, linkType: string, direction?: 'outbound' | 'inbound', description?: string): Promise<{
|
|
38
33
|
message: string;
|
|
39
34
|
}>;
|
|
40
|
-
export declare function removeLink(
|
|
35
|
+
export declare function removeLink(ws: Workspace, key: string, target: string, linkType: string, direction?: 'outbound' | 'inbound', description?: string): Promise<{
|
|
41
36
|
message: string;
|
|
42
37
|
}>;
|
|
43
|
-
export declare function updateLink(
|
|
38
|
+
export declare function updateLink(ws: Workspace, key: string, toCard: string, linkType: string, direction: 'outbound' | 'inbound', previousToCard: string, previousLinkType: string, previousDirection: 'outbound' | 'inbound', linkDescription?: string, previousLinkDescription?: string): Promise<{
|
|
44
39
|
message: string;
|
|
45
40
|
}>;
|
|
46
|
-
export declare function getAttachment(
|
|
41
|
+
export declare function getAttachment(ws: Workspace, key: string, filename: string): Promise<AttachmentContent>;
|
|
47
42
|
/**
|
|
48
43
|
* Used for exporting cards, thus static mode is assumed
|
|
49
44
|
* @param commandsthe command manager used for the query
|
|
50
45
|
* @param options optional tree query options
|
|
51
46
|
* @returns all cards in a flattened array
|
|
52
47
|
*/
|
|
53
|
-
export declare function findAllCards(
|
|
48
|
+
export declare function findAllCards(ws: Workspace, options?: TreeOptions): ReturnType<typeof allCards>;
|
|
54
49
|
/**
|
|
55
50
|
* Gets all attachments that are required for rendering the wanted cards
|
|
56
|
-
* @param
|
|
51
|
+
* @param ws the command manager used for the query
|
|
57
52
|
* @param options optional tree query options
|
|
58
53
|
* @returns all attachments for cards returned by the tree query
|
|
59
54
|
*/
|
|
60
|
-
export declare function findRelevantAttachments(
|
|
55
|
+
export declare function findRelevantAttachments(ws: Workspace, options?: TreeOptions): Promise<{
|
|
61
56
|
key: string;
|
|
62
57
|
attachment: string;
|
|
63
58
|
}[]>;
|
|
64
|
-
export declare function exportCard(
|
|
59
|
+
export declare function exportCard(ws: Workspace, options: ExportPdfOptions): Promise<Uint8Array>;
|
|
60
|
+
export {};
|
|
@@ -1,27 +1,79 @@
|
|
|
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 { evaluateMacros } from '@cyberismo/data-handler';
|
|
14
|
-
import { preprocessMermaidBlocksForHtml } from '@cyberismo/data-handler/utils/mermaid-renderer';
|
|
15
|
-
import { rewriteAsciidocCardXrefs } from '@cyberismo/data-handler/utils/asciidoc-xref';
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
import { AsciidoctorPdfError } from '@cyberismo/data-handler';
|
|
4
|
+
import { preprocessMermaidBlocksForHtml } from './mermaid.js';
|
|
16
5
|
import { allCards } from './lib.js';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
import { getCardQueryResult } from '../../export.js';
|
|
7
|
+
async function renderAdoc(ws, key, content, mode, fallback) {
|
|
8
|
+
let { content: asciidocContent } = await ws.render.macros(content, {
|
|
9
|
+
context: mode === 'staticSite' ? 'exportedSite' : 'localApp',
|
|
10
|
+
mode,
|
|
11
|
+
cardKey: key,
|
|
12
|
+
fallback,
|
|
13
|
+
});
|
|
14
|
+
// Convert [mermaid] AsciiDoc blocks to passthrough HTML before asciidoctor processes them
|
|
15
|
+
asciidocContent = preprocessMermaidBlocksForHtml(asciidocContent);
|
|
16
|
+
// Rewrite native AsciiDoc xrefs that target other cards into
|
|
17
|
+
// /projects/<prefix>/cards/<key> links.
|
|
18
|
+
return ws.render.xrefs(asciidocContent, mode);
|
|
19
|
+
}
|
|
20
|
+
export async function getCardData(ws, key, staticMode) {
|
|
21
|
+
return ws.consistent(async () => {
|
|
22
|
+
// The key reaches the logic program unchecked; details() rejects unknown keys first.
|
|
23
|
+
await ws.cards.details(key);
|
|
24
|
+
const card = staticMode
|
|
25
|
+
? await getCardQueryResult(ws, key)
|
|
26
|
+
: await ws.queries.runQuery('card', 'localApp', { cardKey: key });
|
|
27
|
+
if (card.length !== 1) {
|
|
28
|
+
throw new Error('Query failed. Check card-query syntax');
|
|
29
|
+
}
|
|
30
|
+
// Hidden fields stay off the static site; the card view never shows them.
|
|
31
|
+
const data = staticMode
|
|
32
|
+
? { ...card[0], fields: card[0].fields.filter((f) => f.visibility) }
|
|
33
|
+
: card[0];
|
|
34
|
+
return data;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** One solve for many cards; keys the project does not hold are left out. */
|
|
38
|
+
export async function getCardBatch(ws, keys) {
|
|
39
|
+
return ws.consistent(async () => {
|
|
40
|
+
// The keys reach the logic program unchecked; only known ones go through.
|
|
41
|
+
const cardKeys = [...new Set(keys)].filter((key) => ws.cards.has(key));
|
|
42
|
+
// The card query reads an empty list as no list and answers every card.
|
|
43
|
+
if (cardKeys.length === 0) {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
const cards = await ws.queries.runQuery('card', 'localApp', { cardKeys });
|
|
47
|
+
return Object.fromEntries(cards.map((card) => [card.key, card]));
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export async function getCardContent(ws, key, staticMode) {
|
|
51
|
+
return ws.consistent(async () => {
|
|
52
|
+
const card = await ws.cards.details(key);
|
|
53
|
+
const adocContent = await renderAdoc(ws, key, card.content || '', staticMode ? 'staticSite' : 'inject', '');
|
|
54
|
+
return { adocContent };
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export async function getCardSource(ws, key, staticMode) {
|
|
58
|
+
const card = await ws.cards.details(key);
|
|
59
|
+
if (!staticMode) {
|
|
60
|
+
return card;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
key: card.key,
|
|
64
|
+
path: card.path,
|
|
65
|
+
content: card.content,
|
|
66
|
+
attachments: card.attachments,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export async function getProjectInfo(ws) {
|
|
70
|
+
return ws.consistent(async () => {
|
|
71
|
+
const projectResponse = await ws.settings.info();
|
|
72
|
+
const workflowsResponse = await ws.resources.contents('workflows');
|
|
21
73
|
if (!workflowsResponse) {
|
|
22
74
|
throw new Error('No workflows found');
|
|
23
75
|
}
|
|
24
|
-
const cardTypesResponse = await
|
|
76
|
+
const cardTypesResponse = await ws.resources.contents('cardTypes');
|
|
25
77
|
if (!cardTypesResponse) {
|
|
26
78
|
throw new Error('No card types found');
|
|
27
79
|
}
|
|
@@ -33,53 +85,46 @@ export async function getProjectInfo(commands) {
|
|
|
33
85
|
};
|
|
34
86
|
});
|
|
35
87
|
}
|
|
36
|
-
export async function updateCard(
|
|
88
|
+
export async function updateCard(ws, key,
|
|
37
89
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
90
|
body) {
|
|
39
|
-
|
|
40
|
-
await commands.atomic(async () => {
|
|
91
|
+
await ws.atomic(async () => {
|
|
41
92
|
if (body.state) {
|
|
42
|
-
await
|
|
43
|
-
written = true;
|
|
93
|
+
await ws.cards.transition(key, body.state);
|
|
44
94
|
}
|
|
45
95
|
if (body.content != null) {
|
|
46
|
-
await
|
|
47
|
-
written = true;
|
|
96
|
+
await ws.cards.edit(key, body.content);
|
|
48
97
|
}
|
|
49
98
|
if (body.metadata) {
|
|
50
99
|
for (const [metadataKey, metadataValue] of Object.entries(body.metadata)) {
|
|
51
|
-
await
|
|
52
|
-
written = true;
|
|
100
|
+
await ws.cards.editField(key, metadataKey, metadataValue);
|
|
53
101
|
}
|
|
54
102
|
}
|
|
55
103
|
if (body.parent) {
|
|
56
|
-
await
|
|
57
|
-
written = true;
|
|
104
|
+
await ws.cards.move(key, body.parent);
|
|
58
105
|
}
|
|
59
106
|
if (body.index != null) {
|
|
60
|
-
await
|
|
61
|
-
written = true;
|
|
107
|
+
await ws.cards.rankAt(key, body.index);
|
|
62
108
|
}
|
|
63
109
|
}, `Update card ${key}`);
|
|
64
|
-
return written;
|
|
65
110
|
}
|
|
66
|
-
export async function deleteCard(
|
|
67
|
-
await
|
|
111
|
+
export async function deleteCard(ws, key) {
|
|
112
|
+
await ws.cards.remove(key);
|
|
68
113
|
}
|
|
69
|
-
export async function createCard(
|
|
70
|
-
const result = await
|
|
114
|
+
export async function createCard(ws, template, parentKey) {
|
|
115
|
+
const result = await ws.cards.create(template, parentKey === 'root' ? undefined : parentKey);
|
|
71
116
|
if (result.length === 0) {
|
|
72
117
|
throw new Error('No cards created');
|
|
73
118
|
}
|
|
74
119
|
return result;
|
|
75
120
|
}
|
|
76
|
-
export async function uploadAttachments(
|
|
121
|
+
export async function uploadAttachments(ws, key, files) {
|
|
77
122
|
const succeeded = [];
|
|
78
|
-
await
|
|
123
|
+
await ws.atomic(async () => {
|
|
79
124
|
for (const file of files) {
|
|
80
125
|
if (file instanceof File) {
|
|
81
126
|
const buffer = await file.arrayBuffer();
|
|
82
|
-
await
|
|
127
|
+
await ws.cards.addAttachment(key, file.name, Buffer.from(buffer));
|
|
83
128
|
succeeded.push(file.name);
|
|
84
129
|
}
|
|
85
130
|
}
|
|
@@ -95,61 +140,44 @@ function validateAttachmentFileName(filename) {
|
|
|
95
140
|
throw new Error('Invalid attachment filename');
|
|
96
141
|
}
|
|
97
142
|
}
|
|
98
|
-
export async function removeAttachment(
|
|
143
|
+
export async function removeAttachment(ws, key, filename) {
|
|
99
144
|
validateAttachmentFileName(filename);
|
|
100
|
-
await
|
|
145
|
+
await ws.cards.removeAttachment(key, filename);
|
|
101
146
|
return { message: 'Attachment removed successfully' };
|
|
102
147
|
}
|
|
103
|
-
export async function parseContent(
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
asciidocContent = await evaluateMacros(content, {
|
|
108
|
-
context: 'localApp',
|
|
109
|
-
mode: 'inject',
|
|
110
|
-
project: commands.project,
|
|
111
|
-
cardKey: key,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
asciidocContent = `Macro error: ${error instanceof Error ? error.message : 'Unknown error'}\n\n${content}`;
|
|
116
|
-
}
|
|
117
|
-
// Convert [mermaid] AsciiDoc blocks to passthrough HTML before asciidoctor processes them
|
|
118
|
-
asciidocContent = preprocessMermaidBlocksForHtml(asciidocContent);
|
|
119
|
-
// Rewrite native AsciiDoc xrefs that target other cards into
|
|
120
|
-
// /projects/<prefix>/cards/<key> links.
|
|
121
|
-
asciidocContent = rewriteAsciidocCardXrefs(asciidocContent, commands.project, 'inject');
|
|
122
|
-
return { adocContent: asciidocContent };
|
|
123
|
-
});
|
|
148
|
+
export async function parseContent(ws, key, content) {
|
|
149
|
+
return ws.consistent(async () => ({
|
|
150
|
+
adocContent: await renderAdoc(ws, key, content, 'inject'),
|
|
151
|
+
}));
|
|
124
152
|
}
|
|
125
|
-
export async function createLink(
|
|
153
|
+
export async function createLink(ws, key, target, linkType, direction = 'outbound', description) {
|
|
126
154
|
// For outbound: key is source, target is destination
|
|
127
155
|
// For inbound: target is source, key is destination
|
|
128
156
|
const source = direction === 'outbound' ? key : target;
|
|
129
157
|
const destination = direction === 'outbound' ? target : key;
|
|
130
|
-
await
|
|
158
|
+
await ws.cards.addLink(source, destination, linkType, description, direction);
|
|
131
159
|
return { message: 'Link created successfully' };
|
|
132
160
|
}
|
|
133
|
-
export async function removeLink(
|
|
161
|
+
export async function removeLink(ws, key, target, linkType, direction = 'outbound', description) {
|
|
134
162
|
// For outbound: key is source, target is destination
|
|
135
163
|
// For inbound: target is source, key is destination
|
|
136
164
|
const source = direction === 'outbound' ? key : target;
|
|
137
165
|
const destination = direction === 'outbound' ? target : key;
|
|
138
|
-
await
|
|
166
|
+
await ws.cards.removeLink(source, destination, linkType, description);
|
|
139
167
|
return { message: 'Link removed successfully' };
|
|
140
168
|
}
|
|
141
|
-
export async function updateLink(
|
|
169
|
+
export async function updateLink(ws, key, toCard, linkType, direction, previousToCard, previousLinkType, previousDirection, linkDescription, previousLinkDescription) {
|
|
142
170
|
// For simplicity create the new link first so that duplicate-link validation runs before
|
|
143
171
|
// the old link is removed. This also handles direction changes.
|
|
144
|
-
return
|
|
145
|
-
await createLink(
|
|
146
|
-
await removeLink(
|
|
172
|
+
return ws.atomic(async () => {
|
|
173
|
+
await createLink(ws, key, toCard, linkType, direction, linkDescription);
|
|
174
|
+
await removeLink(ws, key, previousToCard, previousLinkType, previousDirection, previousLinkDescription);
|
|
147
175
|
return { message: 'Link updated successfully' };
|
|
148
176
|
}, `Update link on ${key} to ${toCard}`);
|
|
149
177
|
}
|
|
150
|
-
export async function getAttachment(
|
|
178
|
+
export async function getAttachment(ws, key, filename) {
|
|
151
179
|
validateAttachmentFileName(filename);
|
|
152
|
-
return
|
|
180
|
+
return ws.cards.attachment(key, filename);
|
|
153
181
|
}
|
|
154
182
|
/**
|
|
155
183
|
* Used for exporting cards, thus static mode is assumed
|
|
@@ -157,18 +185,18 @@ export async function getAttachment(commands, key, filename) {
|
|
|
157
185
|
* @param options optional tree query options
|
|
158
186
|
* @returns all cards in a flattened array
|
|
159
187
|
*/
|
|
160
|
-
export async function findAllCards(
|
|
161
|
-
return allCards(
|
|
188
|
+
export async function findAllCards(ws, options) {
|
|
189
|
+
return allCards(ws, options);
|
|
162
190
|
}
|
|
163
191
|
/**
|
|
164
192
|
* Gets all attachments that are required for rendering the wanted cards
|
|
165
|
-
* @param
|
|
193
|
+
* @param ws the command manager used for the query
|
|
166
194
|
* @param options optional tree query options
|
|
167
195
|
* @returns all attachments for cards returned by the tree query
|
|
168
196
|
*/
|
|
169
|
-
export async function findRelevantAttachments(
|
|
170
|
-
const cards = new Set((await allCards(
|
|
171
|
-
const attachments = await
|
|
197
|
+
export async function findRelevantAttachments(ws, options) {
|
|
198
|
+
const cards = new Set((await allCards(ws, options)).map((c) => c.key));
|
|
199
|
+
const attachments = await ws.cards.attachments();
|
|
172
200
|
return attachments
|
|
173
201
|
.filter((attachment) => cards.has(attachment.card) && attachment.mimeType?.startsWith('image/'))
|
|
174
202
|
.map((attachment) => ({
|
|
@@ -176,8 +204,16 @@ export async function findRelevantAttachments(commands, options) {
|
|
|
176
204
|
attachment: attachment.fileName,
|
|
177
205
|
}));
|
|
178
206
|
}
|
|
179
|
-
export async function exportCard(
|
|
180
|
-
|
|
181
|
-
|
|
207
|
+
export async function exportCard(ws, options) {
|
|
208
|
+
try {
|
|
209
|
+
return (await ws.export.pdf(options)).pdf;
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
// Diagnostics can carry server paths: logged here, never sent.
|
|
213
|
+
if (error instanceof AsciidoctorPdfError) {
|
|
214
|
+
console.error(error.message, error.diagnostics.join('\n'));
|
|
215
|
+
}
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
182
218
|
}
|
|
183
219
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/cards/service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/cards/service.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AASzC,OAAO,EAAE,mBAAmB,EAAkB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrD,KAAK,UAAU,UAAU,CACvB,EAAa,EACb,GAAW,EACX,OAAe,EACf,IAAgB,EAChB,QAAiB;IAEjB,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;QACjE,OAAO,EAAE,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,UAAU;QAC5D,IAAI;QACJ,OAAO,EAAE,GAAG;QACZ,QAAQ;KACT,CAAC,CAAC;IAEH,0FAA0F;IAC1F,eAAe,GAAG,8BAA8B,CAAC,eAAe,CAAC,CAAC;IAElE,6DAA6D;IAC7D,wCAAwC;IACxC,OAAO,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAChD,C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AAC,IAAI,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAC1E;SACA,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACpB,GAAG,EAAE,UAAU,CAAC,IAAI;QACpB,UAAU,EAAE,UAAU,CAAC,QAAQ;KAChC,CAAC,CAAC,CAAC;AACR,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,EAAa,EACb,OAAyB;IAEzB,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,+DAA+D;QAC/D,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;YACzC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2026
|
|
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. This program is distributed in the hope that it
|
|
7
|
-
will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
8
|
-
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
9
|
-
See the GNU Affero General Public License for more details.
|
|
10
|
-
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 2026
|
|
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. This program is distributed in the hope that it
|
|
7
|
-
will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
8
|
-
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
9
|
-
See the GNU Affero General Public License for more details.
|
|
10
|
-
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 { isSSGContext } from 'hono/ssg';
|
|
15
5
|
import * as connectorsService from './service.js';
|
|
@@ -29,8 +19,8 @@ router.get('/', requireRole(UserRole.Reader), async (c) => {
|
|
|
29
19
|
if (isSSGContext(c)) {
|
|
30
20
|
return c.json([]);
|
|
31
21
|
}
|
|
32
|
-
const
|
|
33
|
-
const connectors = await connectorsService.getConnectors(
|
|
22
|
+
const ws = c.get('ws');
|
|
23
|
+
const connectors = await connectorsService.getConnectors(ws);
|
|
34
24
|
return c.json(connectors);
|
|
35
25
|
});
|
|
36
26
|
export default router;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/connectors/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/connectors/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,yCAAyC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,iBAAiB,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACxD,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC7D,OAAO,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Cyberismo
|
|
3
|
-
Copyright © Cyberismo Ltd and contributors 2024
|
|
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
|
export interface ExternalItem {
|
|
15
3
|
key: string;
|
|
16
4
|
title: string;
|
|
@@ -20,4 +8,4 @@ export interface Connector {
|
|
|
20
8
|
displayName: string;
|
|
21
9
|
items: ExternalItem[];
|
|
22
10
|
}
|
|
23
|
-
export declare function getConnectors(
|
|
11
|
+
export declare function getConnectors(ws: Workspace): Promise<Connector[]>;
|
|
@@ -1,17 +1,7 @@
|
|
|
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 getConnectors(commands) {
|
|
14
|
-
const results = await commands.calculateCmd.runQuery('connectors', 'localApp');
|
|
1
|
+
// SPDX-FileCopyrightText: Cyberismo Ltd and contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
export async function getConnectors(ws) {
|
|
4
|
+
const results = await ws.queries.runQuery('connectors', 'localApp');
|
|
15
5
|
// Separate connectors from items based on type field
|
|
16
6
|
const connectorsMap = new Map();
|
|
17
7
|
const items = [];
|