@cyberismo/backend 0.0.15 → 0.0.17

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.
Files changed (108) hide show
  1. package/dist/app.d.ts +21 -0
  2. package/dist/app.js +11 -3
  3. package/dist/app.js.map +1 -1
  4. package/dist/common/validationSchemas.d.ts +48 -0
  5. package/dist/domain/calculations/index.d.ts +15 -0
  6. package/dist/domain/calculations/schema.d.ts +16 -0
  7. package/dist/domain/calculations/service.d.ts +14 -0
  8. package/dist/domain/cardTypes/index.d.ts +15 -0
  9. package/dist/domain/cardTypes/schema.d.ts +17 -0
  10. package/dist/domain/cardTypes/service.d.ts +15 -0
  11. package/dist/domain/cards/index.d.ts +15 -0
  12. package/dist/domain/cards/index.js +22 -6
  13. package/dist/domain/cards/index.js.map +1 -1
  14. package/dist/domain/cards/lib.d.ts +29 -0
  15. package/dist/domain/cards/lib.js +73 -2
  16. package/dist/domain/cards/lib.js.map +1 -1
  17. package/dist/domain/cards/service.d.ts +61 -0
  18. package/dist/domain/cards/service.js +20 -12
  19. package/dist/domain/cards/service.js.map +1 -1
  20. package/dist/domain/fieldTypes/index.d.ts +15 -0
  21. package/dist/domain/fieldTypes/schema.d.ts +28 -0
  22. package/dist/domain/fieldTypes/service.d.ts +16 -0
  23. package/dist/domain/graphModels/index.d.ts +15 -0
  24. package/dist/domain/graphModels/schema.d.ts +16 -0
  25. package/dist/domain/graphModels/service.d.ts +14 -0
  26. package/dist/domain/graphViews/index.d.ts +15 -0
  27. package/dist/domain/graphViews/schema.d.ts +4 -0
  28. package/dist/domain/graphViews/service.d.ts +14 -0
  29. package/dist/domain/labels/index.d.ts +15 -0
  30. package/dist/domain/labels/index.js +33 -0
  31. package/dist/domain/labels/index.js.map +1 -0
  32. package/dist/domain/labels/service.d.ts +19 -0
  33. package/dist/domain/labels/service.js +21 -0
  34. package/dist/domain/labels/service.js.map +1 -0
  35. package/dist/domain/linkTypes/index.d.ts +15 -0
  36. package/dist/domain/linkTypes/schema.d.ts +16 -0
  37. package/dist/domain/linkTypes/service.d.ts +15 -0
  38. package/dist/domain/logicPrograms/index.d.ts +15 -0
  39. package/dist/domain/logicPrograms/service.d.ts +15 -0
  40. package/dist/domain/project/index.d.ts +15 -0
  41. package/dist/domain/project/index.js +42 -0
  42. package/dist/domain/project/index.js.map +1 -0
  43. package/dist/domain/project/schema.d.ts +20 -0
  44. package/dist/domain/project/schema.js +21 -0
  45. package/dist/domain/project/schema.js.map +1 -0
  46. package/dist/domain/project/service.d.ts +30 -0
  47. package/dist/domain/project/service.js +54 -0
  48. package/dist/domain/project/service.js.map +1 -0
  49. package/dist/domain/reports/index.d.ts +15 -0
  50. package/dist/domain/reports/schema.d.ts +16 -0
  51. package/dist/domain/reports/service.d.ts +14 -0
  52. package/dist/domain/resources/index.d.ts +15 -0
  53. package/dist/domain/resources/schema.d.ts +60 -0
  54. package/dist/domain/resources/service.d.ts +36 -0
  55. package/dist/domain/resources/service.js +60 -31
  56. package/dist/domain/resources/service.js.map +1 -1
  57. package/dist/domain/templates/index.d.ts +15 -0
  58. package/dist/domain/templates/index.js +1 -1
  59. package/dist/domain/templates/index.js.map +1 -1
  60. package/dist/domain/templates/schema.d.ts +22 -0
  61. package/dist/domain/templates/service.d.ts +16 -0
  62. package/dist/domain/tree/index.d.ts +15 -0
  63. package/dist/domain/tree/index.js +3 -2
  64. package/dist/domain/tree/index.js.map +1 -1
  65. package/dist/domain/tree/service.d.ts +22 -0
  66. package/dist/domain/tree/service.js +10 -2
  67. package/dist/domain/tree/service.js.map +1 -1
  68. package/dist/domain/workflows/index.d.ts +15 -0
  69. package/dist/domain/workflows/schema.d.ts +16 -0
  70. package/dist/domain/workflows/service.d.ts +14 -0
  71. package/dist/export.d.ts +42 -0
  72. package/dist/export.js +48 -152
  73. package/dist/export.js.map +1 -1
  74. package/dist/index.d.ts +13 -0
  75. package/dist/index.js.map +1 -1
  76. package/dist/main.d.ts +1 -0
  77. package/dist/middleware/commandManager.d.ts +20 -0
  78. package/dist/middleware/tree.d.ts +9 -0
  79. package/dist/middleware/tree.js +13 -0
  80. package/dist/middleware/tree.js.map +1 -0
  81. package/dist/middleware/zvalidator.d.ts +9 -0
  82. package/dist/public/THIRD-PARTY.txt +77 -83
  83. package/dist/public/assets/index-BrNy_4vV.js +163198 -0
  84. package/dist/public/index.html +1 -1
  85. package/dist/types.d.ts +29 -0
  86. package/dist/utils.d.ts +11 -0
  87. package/dist/utils.js +0 -32
  88. package/dist/utils.js.map +1 -1
  89. package/package.json +14 -8
  90. package/src/app.ts +13 -4
  91. package/src/domain/cards/index.ts +31 -6
  92. package/src/domain/cards/lib.ts +93 -3
  93. package/src/domain/cards/service.ts +36 -24
  94. package/src/domain/labels/index.ts +36 -0
  95. package/src/domain/labels/service.ts +23 -0
  96. package/src/domain/project/index.ts +58 -0
  97. package/src/domain/project/schema.ts +23 -0
  98. package/src/domain/project/service.ts +88 -0
  99. package/src/domain/resources/service.ts +87 -41
  100. package/src/domain/templates/index.ts +1 -1
  101. package/src/domain/tree/index.ts +10 -3
  102. package/src/domain/tree/service.ts +15 -1
  103. package/src/export.ts +59 -192
  104. package/src/index.ts +5 -1
  105. package/src/middleware/tree.ts +17 -0
  106. package/src/types.ts +13 -0
  107. package/src/utils.ts +0 -39
  108. package/dist/public/assets/index-Dtn1rQ-9.js +0 -163921
@@ -11,9 +11,8 @@
11
11
  License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
12
  */
13
13
  import Processor from '@asciidoctor/core';
14
- import { CardLocation, } from '@cyberismo/data-handler/interfaces/project-interfaces';
15
14
  import { evaluateMacros } from '@cyberismo/data-handler';
16
- import { getCardDetails } from './lib.js';
15
+ import { allCards } from './lib.js';
17
16
  export async function getProjectInfo(commands) {
18
17
  const projectResponse = await commands.showCmd.showProject();
19
18
  const workflowsResponse = await commands.showCmd.showWorkflowsWithDetails();
@@ -86,7 +85,6 @@ body) {
86
85
  if (errors.length > 0) {
87
86
  throw new Error(errors.join('\n'));
88
87
  }
89
- return await getCardDetails(commands, key);
90
88
  }
91
89
  export async function deleteCard(commands, key) {
92
90
  await commands.removeCmd.remove('card', key);
@@ -156,17 +154,27 @@ export async function removeLink(commands, key, toCard, linkType, description) {
156
154
  export function getAttachment(commands, key, filename) {
157
155
  return commands.showCmd.showAttachment(key, filename);
158
156
  }
159
- export async function getAllCards(commands) {
160
- const fetchedCards = await commands.showCmd.showCards(CardLocation.projectOnly);
161
- const projectCards = fetchedCards.find((cardContainer) => cardContainer.type === 'project');
162
- if (!projectCards) {
163
- throw new Error('Data handler did not return project cards');
164
- }
165
- return projectCards.cards;
157
+ /**
158
+ * Used for exporting cards, thus static mode is assumed
159
+ * @param commandsthe command manager used for the query
160
+ * @param options optional tree query options
161
+ * @returns all cards in a flattened array
162
+ */
163
+ export async function findAllCards(commands, options) {
164
+ return allCards(commands, options);
166
165
  }
167
- export async function getAllAttachments(commands) {
166
+ /**
167
+ * Gets all attachments that are required for rendering the wanted cards
168
+ * @param commands the command manager used for the query
169
+ * @param options optional tree query options
170
+ * @returns all attachments for cards returned by the tree query
171
+ */
172
+ export async function findRelevantAttachments(commands, options) {
173
+ const cards = new Set((await allCards(commands, options)).map((c) => c.key));
168
174
  const attachments = await commands.showCmd.showAttachments();
169
- return attachments.map((attachment) => ({
175
+ return attachments
176
+ .filter((attachment) => cards.has(attachment.card) && attachment.mimeType?.startsWith('image/'))
177
+ .map((attachment) => ({
170
178
  key: attachment.card,
171
179
  attachment: attachment.fileName,
172
180
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/cards/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EACL,YAAY,GAEb,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC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,GAAG,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAAwB,EACxB,OAAqB;IAErB,OAAO,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AACD;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAAwB,EACxB,OAAqB;IAErB,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CACtD,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC;IAC7D,OAAO,WAAW;SACf,MAAM,CACL,CAAC,UAAU,EAAE,EAAE,CACb,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,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"}
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,28 @@
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 { z } from 'zod';
14
+ export declare const createFieldTypeSchema: z.ZodObject<{
15
+ dataType: z.ZodEnum<{
16
+ number: "number";
17
+ boolean: "boolean";
18
+ date: "date";
19
+ enum: "enum";
20
+ dateTime: "dateTime";
21
+ integer: "integer";
22
+ list: "list";
23
+ longText: "longText";
24
+ person: "person";
25
+ shortText: "shortText";
26
+ }>;
27
+ identifier: z.ZodString;
28
+ }, z.core.$strip>;
@@ -0,0 +1,16 @@
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';
14
+ import type { DataType } from '@cyberismo/data-handler/interfaces/resource-interfaces';
15
+ export declare function getFieldTypes(commands: CommandManager): Promise<import("@cyberismo/data-handler/interfaces/resource-interfaces").AnyResourceContent[]>;
16
+ export declare function createFieldType(commands: CommandManager, identifier: string, dataType: DataType): Promise<void>;
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,16 @@
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 { z } from 'zod';
14
+ export declare const createGraphModelSchema: z.ZodObject<{
15
+ identifier: z.ZodString;
16
+ }, z.core.$strip>;
@@ -0,0 +1,14 @@
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';
14
+ export declare function createGraphModel(commands: CommandManager, graphModelName: string): Promise<void>;
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare const createGraphViewSchema: z.ZodObject<{
3
+ identifier: z.ZodString;
4
+ }, z.core.$strip>;
@@ -0,0 +1,14 @@
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';
14
+ export declare function createGraphView(commands: CommandManager, graphViewName: string): Promise<void>;
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,33 @@
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 { Hono } from 'hono';
14
+ import * as labelsService from './service.js';
15
+ const router = new Hono();
16
+ /**
17
+ * @swagger
18
+ * /api/labels:
19
+ * get:
20
+ * summary: Returns all unique labels defined in the project.
21
+ * responses:
22
+ * 200:
23
+ * description: List of label strings.
24
+ * 500:
25
+ * description: Internal server error
26
+ */
27
+ router.get('/', (c) => {
28
+ const commands = c.get('commands');
29
+ const labels = labelsService.getLabels(commands);
30
+ return c.json(labels);
31
+ });
32
+ export default router;
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/labels/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,aAAa,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;IACpB,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjD,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,19 @@
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';
14
+ /**
15
+ * Returns all unique labels available in the project.
16
+ * @param commands command manager used for the query
17
+ * @returns a list of labels
18
+ */
19
+ export declare function getLabels(commands: CommandManager): string[];
@@ -0,0 +1,21 @@
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
+ /**
14
+ * Returns all unique labels available in the project.
15
+ * @param commands command manager used for the query
16
+ * @returns a list of labels
17
+ */
18
+ export function getLabels(commands) {
19
+ return commands.showCmd.showLabels().sort();
20
+ }
21
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/labels/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAIF;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,QAAwB;IAChD,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,16 @@
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 { z } from 'zod';
14
+ export declare const createLinkTypeSchema: z.ZodObject<{
15
+ identifier: z.ZodString;
16
+ }, z.core.$strip>;
@@ -0,0 +1,15 @@
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';
14
+ export declare function getLinkTypes(commands: CommandManager): Promise<import("@cyberismo/data-handler/interfaces/resource-interfaces").AnyResourceContent[]>;
15
+ export declare function createLinkType(commands: CommandManager, linkTypeName: string): Promise<void>;
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,15 @@
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';
14
+ import type { ResourceParamsWithCard } from '../../common/validationSchemas.js';
15
+ export declare function getLogicProgram(commands: CommandManager, resource: ResourceParamsWithCard): Promise<string>;
@@ -0,0 +1,15 @@
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 { Hono } from 'hono';
14
+ declare const router: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
15
+ export default router;
@@ -0,0 +1,42 @@
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 { Hono } from 'hono';
14
+ import { zValidator } from '../../middleware/zvalidator.js';
15
+ import { moduleParamSchema, updateProjectSchema } from './schema.js';
16
+ import * as projectService from './service.js';
17
+ const router = new Hono();
18
+ router.get('/', async (c) => {
19
+ const commands = c.get('commands');
20
+ const project = await projectService.getProject(commands);
21
+ return c.json(project);
22
+ });
23
+ router.patch('/', zValidator('json', updateProjectSchema), async (c) => {
24
+ const commands = c.get('commands');
25
+ const updates = c.req.valid('json');
26
+ const project = await projectService.updateProject(commands, updates);
27
+ return c.json(project);
28
+ });
29
+ router.post('/modules/:module/update', zValidator('param', moduleParamSchema), async (c) => {
30
+ const commands = c.get('commands');
31
+ const { module } = c.req.valid('param');
32
+ await projectService.updateModule(commands, module);
33
+ return c.json({ message: 'Module updated' });
34
+ });
35
+ router.delete('/modules/:module', zValidator('param', moduleParamSchema), async (c) => {
36
+ const commands = c.get('commands');
37
+ const { module } = c.req.valid('param');
38
+ await projectService.deleteModule(commands, module);
39
+ return c.json({ message: 'Module removed' });
40
+ });
41
+ export default router;
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/project/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,cAAc,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;AAE1B,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAC1B,MAAM,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAEnC,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC1D,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,CA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AAO,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAC/C,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,20 @@
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 { z } from 'zod';
14
+ export declare const moduleParamSchema: z.ZodObject<{
15
+ module: z.ZodString;
16
+ }, z.core.$strip>;
17
+ export declare const updateProjectSchema: z.ZodObject<{
18
+ name: z.ZodOptional<z.ZodString>;
19
+ cardKeyPrefix: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>;
@@ -0,0 +1,21 @@
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 { z } from 'zod';
14
+ export const moduleParamSchema = z.object({
15
+ module: z.string().min(1),
16
+ });
17
+ export const updateProjectSchema = z.object({
18
+ name: z.string().optional(),
19
+ cardKeyPrefix: z.string().optional(),
20
+ });
21
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/domain/project/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
@@ -0,0 +1,30 @@
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';
14
+ export interface ProjectModule {
15
+ name: string;
16
+ cardKeyPrefix: string;
17
+ }
18
+ export interface ProjectInfo {
19
+ name: string;
20
+ cardKeyPrefix: string;
21
+ modules: ProjectModule[];
22
+ }
23
+ export interface ProjectUpdatePayload {
24
+ name?: string;
25
+ cardKeyPrefix?: string;
26
+ }
27
+ export declare function getProject(commands: CommandManager): Promise<ProjectInfo>;
28
+ export declare function updateProject(commands: CommandManager, updates: ProjectUpdatePayload): Promise<ProjectInfo>;
29
+ export declare function updateModule(commands: CommandManager, module: string): Promise<void>;
30
+ export declare function deleteModule(commands: CommandManager, module: string): Promise<void>;
@@ -0,0 +1,54 @@
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
+ async function toModuleInfo(commands, moduleName) {
14
+ try {
15
+ const data = await commands.showCmd.showModule(moduleName);
16
+ return {
17
+ name: data.name || moduleName,
18
+ cardKeyPrefix: data.cardKeyPrefix || moduleName,
19
+ };
20
+ }
21
+ catch {
22
+ return {
23
+ name: moduleName,
24
+ cardKeyPrefix: moduleName,
25
+ };
26
+ }
27
+ }
28
+ export async function getProject(commands) {
29
+ const project = await commands.showCmd.showProject();
30
+ const modules = await commands.showCmd.showModules();
31
+ const moduleDetails = await Promise.all(modules.map((mod) => toModuleInfo(commands, mod)));
32
+ return {
33
+ name: project.name,
34
+ cardKeyPrefix: project.prefix,
35
+ modules: moduleDetails,
36
+ };
37
+ }
38
+ export async function updateProject(commands, updates) {
39
+ const { name, cardKeyPrefix } = updates;
40
+ if (cardKeyPrefix) {
41
+ await commands.renameCmd.rename(cardKeyPrefix);
42
+ }
43
+ if (name) {
44
+ await commands.project.configuration.setProjectName(name);
45
+ }
46
+ return getProject(commands);
47
+ }
48
+ export async function updateModule(commands, module) {
49
+ await commands.importCmd.updateModule(module);
50
+ }
51
+ export async function deleteModule(commands, module) {
52
+ await commands.removeCmd.remove('module', module);
53
+ }
54
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/domain/project/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EA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