@cyberismo/assets 0.0.22 → 0.0.24
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/index.d.ts +5 -0
- package/dist/index.js +237 -24
- package/dist/schemas.d.ts +52 -5
- package/package.json +2 -2
- package/src/calculations/common/base.lp +6 -0
- package/src/calculations/common/utils.lp +57 -6
- package/src/calculations/queries/card.lp +1 -0
- package/src/calculations/queries/connectors.lp +11 -0
- package/src/exportPdfReport/index.adoc.hbs +9 -6
- package/src/exportPdfReport/query.lp.hbs +1 -0
- package/src/index.ts +13 -4
- package/src/schema/cardBaseSchema.json +39 -0
- package/src/schema/cardsConfigSchema.json +20 -9
- package/src/schema/hubSchema.json +1 -5
- package/src/schema/macros/mermaidMacroSchema.json +13 -0
- package/src/schema/resources/linkTypeSchema.json +7 -0
- package/src/schema/version.json +1 -1
- package/src/schemas.ts +2 -0
- package/src/workflowGraph/model.lp +86 -0
- package/src/workflowGraph/view.lp.hbs +4 -0
package/dist/schemas.d.ts
CHANGED
|
@@ -45,6 +45,11 @@ export declare const schemas: ({
|
|
|
45
45
|
format: string;
|
|
46
46
|
description: string;
|
|
47
47
|
};
|
|
48
|
+
createdAt: {
|
|
49
|
+
type: string;
|
|
50
|
+
format: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
48
53
|
labels: {
|
|
49
54
|
type: string;
|
|
50
55
|
description: string;
|
|
@@ -78,6 +83,40 @@ export declare const schemas: ({
|
|
|
78
83
|
additionalProperties: boolean;
|
|
79
84
|
};
|
|
80
85
|
};
|
|
86
|
+
externalLinks: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
items: {
|
|
90
|
+
type: string;
|
|
91
|
+
properties: {
|
|
92
|
+
connector: {
|
|
93
|
+
type: string;
|
|
94
|
+
minLength: number;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
externalItemKey: {
|
|
98
|
+
type: string;
|
|
99
|
+
minLength: number;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
linkType: {
|
|
103
|
+
description: string;
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
linkDescription: {
|
|
107
|
+
type: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
direction: {
|
|
111
|
+
type: string;
|
|
112
|
+
enum: string[];
|
|
113
|
+
description: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
required: string[];
|
|
117
|
+
additionalProperties: boolean;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
81
120
|
templateCardKey: {
|
|
82
121
|
type: string;
|
|
83
122
|
description: string;
|
|
@@ -183,7 +222,7 @@ export declare const schemas: ({
|
|
|
183
222
|
properties: {
|
|
184
223
|
name: {
|
|
185
224
|
description: string;
|
|
186
|
-
|
|
225
|
+
$ref: string;
|
|
187
226
|
};
|
|
188
227
|
displayName: {
|
|
189
228
|
description: string;
|
|
@@ -201,10 +240,6 @@ export declare const schemas: ({
|
|
|
201
240
|
description: string;
|
|
202
241
|
type: string;
|
|
203
242
|
};
|
|
204
|
-
branch: {
|
|
205
|
-
description: string;
|
|
206
|
-
type: string;
|
|
207
|
-
};
|
|
208
243
|
private: {
|
|
209
244
|
description: string;
|
|
210
245
|
type: string;
|
|
@@ -217,6 +252,18 @@ export declare const schemas: ({
|
|
|
217
252
|
required: string[];
|
|
218
253
|
title: string;
|
|
219
254
|
type: string;
|
|
255
|
+
} | {
|
|
256
|
+
$id: string;
|
|
257
|
+
$schema: string;
|
|
258
|
+
additionalProperties: boolean;
|
|
259
|
+
properties: {
|
|
260
|
+
code: {
|
|
261
|
+
type: string;
|
|
262
|
+
description: string;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
required: string[];
|
|
266
|
+
type: string;
|
|
220
267
|
} | {
|
|
221
268
|
$id: string;
|
|
222
269
|
additionalProperties: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberismo/assets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "This package contains static resources",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"bugs": "https://github.com/CyberismoCom/cyberismo/issues",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"esbuild": "^0.
|
|
18
|
+
"esbuild": "^0.28.0",
|
|
19
19
|
"esbuild-plugin-import-glob": "^0.1.1"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
@@ -19,9 +19,15 @@ templateCard(C) :- card(C), field(C, "container", "template").
|
|
|
19
19
|
dataType(Card, "lastUpdated", "dateTime") :-
|
|
20
20
|
field(Card, "lastUpdated", _).
|
|
21
21
|
|
|
22
|
+
dataType(Card, "createdAt", "dateTime") :-
|
|
23
|
+
field(Card, "createdAt", _).
|
|
24
|
+
|
|
22
25
|
dataType(Connector, "lastSynchronised", "dateTime") :-
|
|
23
26
|
field(Connector, "lastSynchronised", _).
|
|
24
27
|
|
|
28
|
+
dataType(Card, "progress", "integer") :-
|
|
29
|
+
field(Card, "progress", _).
|
|
30
|
+
|
|
25
31
|
% add workflow state category as a calculated field for Cards
|
|
26
32
|
field(Card, "workflowStateCategory", Category) :-
|
|
27
33
|
card(Card),
|
|
@@ -101,22 +101,73 @@ resultField((Source, Destination, LinkType, LinkDescription, Direction), "linkSo
|
|
|
101
101
|
childResult(_, (Source, Destination, LinkType, LinkDescription, Direction), "links"),
|
|
102
102
|
calculatedLink(Source, Destination, LinkType, LinkDescription).
|
|
103
103
|
|
|
104
|
-
% links: title
|
|
104
|
+
% links: title - for card destinations
|
|
105
105
|
resultField((Card, Destination, LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
|
|
106
106
|
childResult(Card, (Card, Destination, LinkType, LinkDescription, Direction), "links"),
|
|
107
|
-
field(Destination, "title", Title)
|
|
107
|
+
field(Destination, "title", Title),
|
|
108
|
+
card(Destination).
|
|
108
109
|
|
|
110
|
+
% links: title - for external item destinations (from externalItem facts)
|
|
111
|
+
resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
|
|
112
|
+
childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links"),
|
|
113
|
+
field((Connector, ItemKey), "title", Title).
|
|
114
|
+
|
|
115
|
+
% links: title - for external item destinations (fallback to key if no title fact)
|
|
116
|
+
resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "title", ItemKey, "shortText") :-
|
|
117
|
+
childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links"),
|
|
118
|
+
not field((Connector, ItemKey), "title", _).
|
|
119
|
+
|
|
120
|
+
% links: title - for card sources (inbound)
|
|
109
121
|
resultField((Source, Card, LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
|
|
110
122
|
childResult(Card, (Source, Card, LinkType, LinkDescription, Direction), "links"),
|
|
111
|
-
field(Source, "title", Title)
|
|
123
|
+
field(Source, "title", Title),
|
|
124
|
+
card(Source).
|
|
125
|
+
|
|
126
|
+
% links: title - for external item sources (inbound, from externalItem facts)
|
|
127
|
+
resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "title", Title, "shortText") :-
|
|
128
|
+
childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links"),
|
|
129
|
+
field((Connector, ItemKey), "title", Title).
|
|
112
130
|
|
|
113
|
-
% links: key
|
|
131
|
+
% links: title - for external item sources (inbound, fallback to key if no title fact)
|
|
132
|
+
resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "title", ItemKey, "shortText") :-
|
|
133
|
+
childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links"),
|
|
134
|
+
not field((Connector, ItemKey), "title", _).
|
|
135
|
+
|
|
136
|
+
% links: key - for card destinations
|
|
114
137
|
resultField((Card, Destination, LinkType, LinkDescription, Direction), "key", Destination, "shortText") :-
|
|
115
|
-
childResult(Card, (Card, Destination, LinkType, LinkDescription, Direction), "links")
|
|
138
|
+
childResult(Card, (Card, Destination, LinkType, LinkDescription, Direction), "links"),
|
|
139
|
+
card(Destination).
|
|
140
|
+
|
|
141
|
+
% links: key - for external item destinations
|
|
142
|
+
resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "key", ItemKey, "shortText") :-
|
|
143
|
+
childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links").
|
|
116
144
|
|
|
145
|
+
% links: key - for card sources (inbound)
|
|
117
146
|
resultField((Source, Card, LinkType, LinkDescription, Direction), "key", Source, "shortText") :-
|
|
118
147
|
childResult(Card, (Source, Card, LinkType, LinkDescription, Direction), "links"),
|
|
119
|
-
|
|
148
|
+
card(Source).
|
|
149
|
+
|
|
150
|
+
% links: key - for external item sources (inbound)
|
|
151
|
+
resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "key", ItemKey, "shortText") :-
|
|
152
|
+
childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links").
|
|
153
|
+
|
|
154
|
+
% links: connector - for external item destinations
|
|
155
|
+
resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "connector", Connector, "shortText") :-
|
|
156
|
+
childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links").
|
|
157
|
+
|
|
158
|
+
% links: connector - for external item sources (inbound)
|
|
159
|
+
resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "connector", Connector, "shortText") :-
|
|
160
|
+
childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links").
|
|
161
|
+
|
|
162
|
+
% links: url - for external item destinations (only if url fact exists)
|
|
163
|
+
resultField((Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "url", Url, "shortText") :-
|
|
164
|
+
childResult(Card, (Card, (Connector, ItemKey), LinkType, LinkDescription, Direction), "links"),
|
|
165
|
+
field((Connector, ItemKey), "url", Url).
|
|
166
|
+
|
|
167
|
+
% links: url - for external item sources (inbound, only if url fact exists)
|
|
168
|
+
resultField(((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "url", Url, "shortText") :-
|
|
169
|
+
childResult(Card, ((Connector, ItemKey), Card, LinkType, LinkDescription, Direction), "links"),
|
|
170
|
+
field((Connector, ItemKey), "url", Url).
|
|
120
171
|
|
|
121
172
|
|
|
122
173
|
% notifications
|
|
@@ -96,6 +96,7 @@ select(1, "results", "cardTypeDisplayName").
|
|
|
96
96
|
select(1, "results", "title").
|
|
97
97
|
select(1, "results", "key").
|
|
98
98
|
select(1, "results", "lastUpdated").
|
|
99
|
+
select(1, "results", "createdAt").
|
|
99
100
|
select(1, "results", "workflowState").
|
|
100
101
|
select(1, "results", "policyChecks").
|
|
101
102
|
select(1, "results", "links").
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
% Connectors
|
|
2
|
+
result(Name) :- connector(Name).
|
|
3
|
+
resultField(Name, "type", "connector", "shortText") :- connector(Name).
|
|
4
|
+
resultField(Name, "displayName", Value, "shortText") :- connector(Name), field(Name, "displayName", Value).
|
|
5
|
+
|
|
6
|
+
% External items
|
|
7
|
+
result((Connector, Key)) :- externalItem((Connector, Key)).
|
|
8
|
+
resultField((Connector, Key), "type", "item", "shortText") :- externalItem((Connector, Key)).
|
|
9
|
+
resultField((Connector, Key), "connector", Connector, "shortText") :- externalItem((Connector, Key)).
|
|
10
|
+
resultField((Connector, Key), "itemKey", Key, "shortText") :- externalItem((Connector, Key)).
|
|
11
|
+
resultField((Connector, Key), "title", Value, "shortText") :- externalItem((Connector, Key)), field((Connector, Key), "title", Value).
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
:toc: macro
|
|
5
5
|
:numbered:
|
|
6
6
|
:imagesdir: images
|
|
7
|
-
:revnumber: {{version}}
|
|
8
|
-
:revdate: {{date}}
|
|
9
|
-
:revremark: {{revremark}}
|
|
10
|
-
:!chapter-signifier:
|
|
7
|
+
{{#if version}}:revnumber: {{version}}
|
|
8
|
+
{{/if}}{{#if date}}:revdate: {{date}}
|
|
9
|
+
{{/if}}{{#if revremark}}:revremark: {{revremark}}
|
|
10
|
+
{{/if}}:!chapter-signifier:
|
|
11
11
|
:source-highlighter: rouge
|
|
12
12
|
:toclevels: 5
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
toc::[]
|
|
15
15
|
{{#each results}}
|
|
16
16
|
{{#include}}
|
|
@@ -23,6 +23,9 @@ toc::[]
|
|
|
23
23
|
| Card key | {{this.key}}
|
|
24
24
|
| Card type | {{#if this.cardTypeDisplayName}}{{this.cardTypeDisplayName}}{{else}}{{this.cardType}}{{/if}}
|
|
25
25
|
| Last modified | {{this.lastUpdated}}
|
|
26
|
+
{{#if this.createdAt}}
|
|
27
|
+
| Created at | {{this.createdAt}}
|
|
28
|
+
{{/if}}
|
|
26
29
|
{{#if this.labels}}
|
|
27
30
|
| Labels | {{#each this.labels}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}
|
|
28
31
|
{{/if}}
|
|
@@ -38,7 +41,7 @@ toc::[]
|
|
|
38
41
|
[cols="1,4",frame=none,grid=none]
|
|
39
42
|
|===
|
|
40
43
|
{{#each this.links}}
|
|
41
|
-
| {{displayName}} | xref:{{this.key}}[{{this.title}}]{{#if this.linkDescription}} - {{this.linkDescription}}{{/if}}
|
|
44
|
+
| {{displayName}} | {{#if this.url}}{{this.url}}[{{this.title}}]{{else}}xref:{{this.key}}[{{this.title}}]{{/if}}{{#if this.linkDescription}} - {{this.linkDescription}}{{/if}}
|
|
42
45
|
{{/each}}
|
|
43
46
|
|===
|
|
44
47
|
{empty} +
|
package/src/index.ts
CHANGED
|
@@ -8,13 +8,16 @@ import commonUtils from './calculations/common/utils.lp';
|
|
|
8
8
|
import queriesCard from './calculations/queries/card.lp';
|
|
9
9
|
import queriesOnCreation from './calculations/queries/onCreation.lp';
|
|
10
10
|
import queriesOnTransition from './calculations/queries/onTransition.lp';
|
|
11
|
+
import queriesConnectors from './calculations/queries/connectors.lp';
|
|
11
12
|
import queriesTree from './calculations/queries/tree.lp';
|
|
12
13
|
import testModel from './calculations/test/model.lp';
|
|
13
14
|
|
|
14
|
-
import pdfReportIndex from './exportPdfReport/index.adoc.hbs';
|
|
15
|
-
import pdfReportQuery from './exportPdfReport/query.lp.hbs';
|
|
16
|
-
import graphvizReportIndex from './graphvizReport/index.adoc.hbs';
|
|
17
|
-
import graphvizReportQuery from './graphvizReport/query.lp.hbs';
|
|
15
|
+
import pdfReportIndex from './exportPdfReport/index.adoc.hbs' with { type: 'text' };
|
|
16
|
+
import pdfReportQuery from './exportPdfReport/query.lp.hbs' with { type: 'text' };
|
|
17
|
+
import graphvizReportIndex from './graphvizReport/index.adoc.hbs' with { type: 'text' };
|
|
18
|
+
import graphvizReportQuery from './graphvizReport/query.lp.hbs' with { type: 'text' };
|
|
19
|
+
import workflowGraphModel from './workflowGraph/model.lp' with { type: 'text' };
|
|
20
|
+
import workflowGraphView from './workflowGraph/view.lp.hbs' with { type: 'text' };
|
|
18
21
|
|
|
19
22
|
export const graphvizReport = {
|
|
20
23
|
query: graphvizReportQuery,
|
|
@@ -26,6 +29,11 @@ export const pdfReport = {
|
|
|
26
29
|
content: pdfReportIndex,
|
|
27
30
|
};
|
|
28
31
|
|
|
32
|
+
export const workflowGraph = {
|
|
33
|
+
model: workflowGraphModel,
|
|
34
|
+
view: workflowGraphView,
|
|
35
|
+
};
|
|
36
|
+
|
|
29
37
|
export const lpFiles = {
|
|
30
38
|
common: {
|
|
31
39
|
base: commonBase,
|
|
@@ -34,6 +42,7 @@ export const lpFiles = {
|
|
|
34
42
|
},
|
|
35
43
|
queries: {
|
|
36
44
|
card: queriesCard,
|
|
45
|
+
connectors: queriesConnectors,
|
|
37
46
|
onCreation: queriesOnCreation,
|
|
38
47
|
onTransition: queriesOnTransition,
|
|
39
48
|
tree: queriesTree,
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"format": "date-time",
|
|
33
33
|
"description": "The date and time of the last update of the card"
|
|
34
34
|
},
|
|
35
|
+
"createdAt": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"format": "date-time",
|
|
38
|
+
"description": "The date and time when the card was created"
|
|
39
|
+
},
|
|
35
40
|
"labels": {
|
|
36
41
|
"type": "array",
|
|
37
42
|
"description": "Labels or tags that can be used for organising cards",
|
|
@@ -65,6 +70,40 @@
|
|
|
65
70
|
"additionalProperties": false
|
|
66
71
|
}
|
|
67
72
|
},
|
|
73
|
+
"externalLinks": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"description": "links from this card to external items in connected systems",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"connector": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"description": "The name of the connector (e.g., 'jira')"
|
|
83
|
+
},
|
|
84
|
+
"externalItemKey": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "The key of the external item (e.g., 'PROJECT-1032')"
|
|
88
|
+
},
|
|
89
|
+
"linkType": {
|
|
90
|
+
"description": "The name of the link type. For example, 'base/linkTypes/causes'",
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"linkDescription": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "A description of the link"
|
|
96
|
+
},
|
|
97
|
+
"direction": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"enum": ["outbound", "inbound"],
|
|
100
|
+
"description": "Direction of the link: outbound = card links to external, inbound = external links to card"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": ["connector", "externalItemKey", "linkType", "direction"],
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
68
107
|
"templateCardKey": {
|
|
69
108
|
"type": "string",
|
|
70
109
|
"description": "Card key from which this card has been instantiated"
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"projectPrefix": {
|
|
4
|
+
"type": "string",
|
|
5
|
+
"description": "Project prefix: 3–10 lowercase letters.",
|
|
6
|
+
"pattern": "^[a-z]+$",
|
|
7
|
+
"minLength": 3,
|
|
8
|
+
"maxLength": 10
|
|
9
|
+
}
|
|
10
|
+
},
|
|
2
11
|
"$id": "cardsConfigSchema",
|
|
3
12
|
"additionalProperties": false,
|
|
4
13
|
"description": "General configuration settings for the card tree.",
|
|
@@ -8,11 +17,8 @@
|
|
|
8
17
|
"description": "Project schema version"
|
|
9
18
|
},
|
|
10
19
|
"cardKeyPrefix": {
|
|
11
|
-
"type": "string",
|
|
12
20
|
"description": "The prefix or the fist component of the card key. For example, ABC",
|
|
13
|
-
"
|
|
14
|
-
"minLength": 3,
|
|
15
|
-
"maxLength": 10
|
|
21
|
+
"$ref": "#/$defs/projectPrefix"
|
|
16
22
|
},
|
|
17
23
|
"name": {
|
|
18
24
|
"description": "Project name",
|
|
@@ -40,6 +46,11 @@
|
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
},
|
|
49
|
+
"version": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Project version (semver)",
|
|
52
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
|
53
|
+
},
|
|
43
54
|
"modules": {
|
|
44
55
|
"description": "List of modules that have been included in the project",
|
|
45
56
|
"type": "array",
|
|
@@ -48,19 +59,19 @@
|
|
|
48
59
|
"properties": {
|
|
49
60
|
"name": {
|
|
50
61
|
"description": "Module name (project prefix). Must be unique.",
|
|
51
|
-
"
|
|
62
|
+
"$ref": "#/$defs/projectPrefix"
|
|
52
63
|
},
|
|
53
64
|
"location": {
|
|
54
65
|
"description": "Git remote URL, or relative file reference.",
|
|
55
66
|
"type": "string"
|
|
56
67
|
},
|
|
57
|
-
"branch": {
|
|
58
|
-
"description": "If using git remote URL in 'location' defines git branch. If empty, uses repository default branch'.",
|
|
59
|
-
"type": "string"
|
|
60
|
-
},
|
|
61
68
|
"private": {
|
|
62
69
|
"description": "If true, the module is private and requires credentials (CYBERISMO_GIT_USER / CYBERISMO_GIT_TOKEN) or SSH. Does not apply for local file modules.",
|
|
63
70
|
"type": "boolean"
|
|
71
|
+
},
|
|
72
|
+
"version": {
|
|
73
|
+
"description": "Semver version or range constraint (e.g., '1.0.0', '^1.0.0', '>=1.2.0 <2.0.0'). When omitted, any version is accepted.",
|
|
74
|
+
"type": "string"
|
|
64
75
|
}
|
|
65
76
|
},
|
|
66
77
|
"required": ["name", "location"]
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"properties": {
|
|
27
27
|
"name": {
|
|
28
28
|
"description": "Module name (project prefix). Must be unique globally.",
|
|
29
|
-
"
|
|
29
|
+
"$ref": "cardsConfigSchema#/$defs/projectPrefix"
|
|
30
30
|
},
|
|
31
31
|
"displayName": {
|
|
32
32
|
"description": "Display name of the module",
|
|
@@ -44,10 +44,6 @@
|
|
|
44
44
|
"description": "URI to the documentation of the module",
|
|
45
45
|
"type": "string"
|
|
46
46
|
},
|
|
47
|
-
"branch": {
|
|
48
|
-
"description": "If using git remote URL in 'location' defines git branch. If empty, uses repository default branch'.",
|
|
49
|
-
"type": "string"
|
|
50
|
-
},
|
|
51
47
|
"private": {
|
|
52
48
|
"description": "If true, the module is private and requires credentials (CYBERISMO_GIT_USER / CYBERISMO_GIT_TOKEN) or SSH. Does not apply for local file modules.",
|
|
53
49
|
"type": "boolean"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "mermaidMacroSchema",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"code": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Mermaid diagram definition text"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"required": ["code"],
|
|
12
|
+
"type": "object"
|
|
13
|
+
}
|
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
"type": "string"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
"destinationConnectors": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"description": "The connectors that can be the target of this link type for external links.",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
46
53
|
"enableLinkDescription": {
|
|
47
54
|
"type": "boolean",
|
|
48
55
|
"description": "If true, the user can add a description to the link."
|
package/src/schema/version.json
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -27,6 +27,7 @@ import hubSchema from './schema/hubSchema.json' with { type: 'json' };
|
|
|
27
27
|
import imageMacroSchema from './schema/macros/imageMacroSchema.json' with { type: 'json' };
|
|
28
28
|
import includeMacroSchema from './schema/macros/includeMacroSchema.json' with { type: 'json' };
|
|
29
29
|
import linkTypeSchema from './schema/resources/linkTypeSchema.json' with { type: 'json' };
|
|
30
|
+
import mermaidMacroSchema from './schema/macros/mermaidMacroSchema.json' with { type: 'json' };
|
|
30
31
|
import percentageMacroSchema from './schema/macros/percentageMacroSchema.json' with { type: 'json' };
|
|
31
32
|
import reportMacroBaseSchema from './schema/macros/reportMacroBaseSchema.json' with { type: 'json' };
|
|
32
33
|
import reportSchema from './schema/resources/reportSchema.json' with { type: 'json' };
|
|
@@ -58,6 +59,7 @@ export const schemas = [
|
|
|
58
59
|
imageMacroSchema,
|
|
59
60
|
includeMacroSchema,
|
|
60
61
|
linkTypeSchema,
|
|
62
|
+
mermaidMacroSchema,
|
|
61
63
|
percentageMacroSchema,
|
|
62
64
|
reportMacroBaseSchema,
|
|
63
65
|
reportSchema,
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
graph(toplevelGraph).
|
|
2
|
+
attr(graph, toplevelGraph, rankdir, "TD").
|
|
3
|
+
|
|
4
|
+
% the "initial node" from where the card is created
|
|
5
|
+
node("", toplevelGraph) :- workflowState(Workflow, State, _), visible(Workflow).
|
|
6
|
+
|
|
7
|
+
% Let's add a separate "Any state" for every state that has transitions from "*"
|
|
8
|
+
node(("*", To), toplevelGraph) :-
|
|
9
|
+
workflowTransition(Workflow, _, "*", To),
|
|
10
|
+
visible(Workflow).
|
|
11
|
+
|
|
12
|
+
attr(node, ("*", To), label, @concatenate("<<font point-size='11'> Any state </font>>")) :-
|
|
13
|
+
workflowTransition(Workflow, _, "*", To),
|
|
14
|
+
visible(Workflow).
|
|
15
|
+
|
|
16
|
+
node(State, toplevelGraph) :- workflowState(Workflow, State, _), visible(Workflow).
|
|
17
|
+
|
|
18
|
+
% Regular state label
|
|
19
|
+
attr(node, State, label, @concatenate("<<font point-size='14'> <b>", State, "</b> </font> <br/> <font point-size='10'>", StateCategory, "</font>>")) :-
|
|
20
|
+
workflowState(Workflow, State, StateCategory),
|
|
21
|
+
visible(Workflow),
|
|
22
|
+
not currentState(State),
|
|
23
|
+
State != "",
|
|
24
|
+
State != "*".
|
|
25
|
+
|
|
26
|
+
% Current state label is rendered larger and underlined to stand out
|
|
27
|
+
attr(node, State, label, @concatenate("<<font point-size='16'> <b><u>", State, "</u></b> </font> <br/> <font point-size='10'>", StateCategory, "</font>>")) :-
|
|
28
|
+
workflowState(Workflow, State, StateCategory),
|
|
29
|
+
visible(Workflow),
|
|
30
|
+
currentState(State),
|
|
31
|
+
State != "",
|
|
32
|
+
State != "*".
|
|
33
|
+
|
|
34
|
+
edge((From, To, Transition), toplevelGraph) :-
|
|
35
|
+
workflowTransition(Workflow, Transition, From, To),
|
|
36
|
+
visible(Workflow),
|
|
37
|
+
From != "*".
|
|
38
|
+
|
|
39
|
+
attr(edge, (From, To, Transition), label, @concatenate("<<font point-size='10'>", Transition, "</font>>")) :-
|
|
40
|
+
workflowTransition(Workflow, Transition, From, To),
|
|
41
|
+
visible(Workflow),
|
|
42
|
+
From != "*".
|
|
43
|
+
|
|
44
|
+
edge((("*", To), To, Transition), toplevelGraph) :-
|
|
45
|
+
workflowTransition(Workflow, Transition, "*", To),
|
|
46
|
+
visible(Workflow).
|
|
47
|
+
|
|
48
|
+
attr(edge, (("*", To), To, Transition), label, @concatenate("<<font point-size='10'>", Transition, "</font>>")) :-
|
|
49
|
+
workflowTransition(Workflow, Transition, "*", To),
|
|
50
|
+
visible(Workflow).
|
|
51
|
+
|
|
52
|
+
% margins
|
|
53
|
+
attr(graph, toplevelGraph, pad, "0.1").
|
|
54
|
+
attr(graph, toplevelGraph, nodesep, "0.6").
|
|
55
|
+
attr(graph, toplevelGraph, ranksep, "0.7").
|
|
56
|
+
attr(node, X, margin, "0.15") :- node(X, _).
|
|
57
|
+
attr(graph, X, margin, "8") :- graph(X, _).
|
|
58
|
+
|
|
59
|
+
% penwidth
|
|
60
|
+
attr(graph, X, penwidth, "1") :- graph(X).
|
|
61
|
+
attr(graph, X, penwidth, "1") :- graph(X, _).
|
|
62
|
+
attr(node, X, penwidth, "1") :- node(X, _), X != "", not currentState(X).
|
|
63
|
+
attr(node, X, penwidth, "3") :- node(X, _), currentState(X).
|
|
64
|
+
attr(node, X, penwidth, "2") :- node(X, _), X = "".
|
|
65
|
+
attr(edge, (X, Y, N), penwidth, "1") :- edge((X, Y, N), _).
|
|
66
|
+
attr(edge, (X, Y, N), arrowsize, "0.8") :- edge((X, Y, N), _).
|
|
67
|
+
|
|
68
|
+
% shapes of nodes
|
|
69
|
+
attr(node, X, shape, rectangle) :- node(X, _), X != "".
|
|
70
|
+
attr(node, X, shape, circle) :- node(X, _), X = "".
|
|
71
|
+
attr(node, X, style, rounded) :- node(X, _).
|
|
72
|
+
|
|
73
|
+
% node colours
|
|
74
|
+
attr(node, State, color, "#FF9300") :-
|
|
75
|
+
workflowState(Workflow, State, "active"),
|
|
76
|
+
visible(Workflow).
|
|
77
|
+
|
|
78
|
+
attr(node, State, color, "#37E900") :-
|
|
79
|
+
workflowState(Workflow, State, "closed"),
|
|
80
|
+
visible(Workflow).
|
|
81
|
+
|
|
82
|
+
% fonts
|
|
83
|
+
attr(graph, G, fontname, "helvetica") :- graph(G).
|
|
84
|
+
attr(graph, G, fontname, "helvetica") :- graph(G, _).
|
|
85
|
+
attr(node, N, fontname, "helvetica") :- node(N, _).
|
|
86
|
+
attr(edge, (X, Y, N), fontname, "helvetica") :- edge((X, Y, N), _).
|