@cyberismo/assets 0.0.10 → 0.0.12

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 (41) hide show
  1. package/dist/index.js +130 -22
  2. package/dist/schemas.d.ts +267 -210
  3. package/dist/static/defaultGraphView/.schema +7 -0
  4. package/dist/static/defaultGraphView/parameterSchema.json +22 -0
  5. package/dist/static/defaultGraphView/view.lp.hbs +0 -0
  6. package/dist/static/defaultReport/parameterSchema.json +4 -4
  7. package/package.json +2 -2
  8. package/src/calculations/common/queryLanguage.lp +8 -1
  9. package/src/exportPdfReport/index.adoc.hbs +25 -6
  10. package/src/exportPdfReport/query.lp.hbs +112 -2
  11. package/src/hub/moduleList.json +34 -0
  12. package/src/schema/cardBaseSchema.json +4 -4
  13. package/src/schema/cardTreeDirectorySchema.json +179 -179
  14. package/src/schema/cardsConfigSchema.json +16 -4
  15. package/src/schema/csvSchema.json +3 -3
  16. package/src/schema/dotSchema.json +3 -3
  17. package/src/schema/hubSchema.json +58 -0
  18. package/src/schema/macros/createCardsMacroSchema.json +3 -3
  19. package/src/schema/macros/graphMacroBaseSchema.json +3 -3
  20. package/src/schema/macros/imageMacroSchema.json +3 -3
  21. package/src/schema/macros/includeMacroSchema.json +3 -3
  22. package/src/schema/macros/percentageMacroSchema.json +3 -3
  23. package/src/schema/macros/reportMacroBaseSchema.json +3 -3
  24. package/src/schema/macros/scoreCardMacroSchema.json +3 -3
  25. package/src/schema/macros/vegaLiteMacroSchema.json +8 -8
  26. package/src/schema/macros/vegaMacroSchema.json +10 -10
  27. package/src/schema/macros/xrefMacroSchema.json +3 -3
  28. package/src/schema/resources/cardTypeSchema.json +4 -4
  29. package/src/schema/resources/fieldTypeSchema.json +4 -4
  30. package/src/schema/resources/graphModelSchema.json +3 -3
  31. package/src/schema/resources/graphViewSchema.json +3 -3
  32. package/src/schema/resources/linkTypeSchema.json +4 -4
  33. package/src/schema/resources/reportSchema.json +3 -3
  34. package/src/schema/resources/templateSchema.json +4 -4
  35. package/src/schema/resources/workflowSchema.json +4 -4
  36. package/src/schema/schema.json +4 -4
  37. package/src/schemas.ts +2 -0
  38. package/src/static/defaultGraphView/.schema +7 -0
  39. package/src/static/defaultGraphView/parameterSchema.json +22 -0
  40. package/src/static/defaultGraphView/view.lp.hbs +0 -0
  41. package/src/static/defaultReport/parameterSchema.json +4 -4
@@ -1,8 +1,6 @@
1
1
  {
2
- "title": "Csv content",
3
2
  "$id": "csvSchema",
4
3
  "description": "Contains the content of a CSV file as an array of objects. Each object represents a row in the CSV file.",
5
- "type": "array",
6
4
  "items": {
7
5
  "type": "object",
8
6
  "additionalProperties": true,
@@ -26,5 +24,7 @@
26
24
  }
27
25
  },
28
26
  "required": ["title", "template"]
29
- }
27
+ },
28
+ "title": "Csv content",
29
+ "type": "array"
30
30
  }
@@ -1,8 +1,6 @@
1
1
  {
2
- "title": "Dot Schema",
3
2
  "$id": "dotSchema",
4
3
  "description": "Schema of the .schema ",
5
- "type": "array",
6
4
  "items": {
7
5
  "type": "object",
8
6
  "additionalProperties": false,
@@ -21,5 +19,7 @@
21
19
  }
22
20
  },
23
21
  "required": ["version", "id"]
24
- }
22
+ },
23
+ "title": "Dot Schema",
24
+ "type": "array"
25
25
  }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$id": "hubSchema",
3
+ "additionalProperties": false,
4
+ "description": "The contents of a Cyberismo hub.",
5
+ "properties": {
6
+ "displayName": {
7
+ "description": "Display name of the hub",
8
+ "type": "string",
9
+ "minLength": 1
10
+ },
11
+ "description": {
12
+ "description": "Description of the hub",
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "modules": {
17
+ "description": "List of modules that are available in the hub",
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "properties": {
22
+ "name": {
23
+ "description": "Module name (project prefix). Must be unique globally.",
24
+ "type": "string"
25
+ },
26
+ "displayName": {
27
+ "description": "Display name of the module",
28
+ "type": "string"
29
+ },
30
+ "category": {
31
+ "description": "Category of the module",
32
+ "type": "string"
33
+ },
34
+ "location": {
35
+ "description": "Git remote URL, or relative file reference.",
36
+ "type": "string"
37
+ },
38
+ "documentationLocation": {
39
+ "description": "URI to the documentation of the module",
40
+ "type": "string"
41
+ },
42
+ "branch": {
43
+ "description": "If using git remote URL in 'location' defines git branch. If empty, uses repository default branch'.",
44
+ "type": "string"
45
+ },
46
+ "private": {
47
+ "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.",
48
+ "type": "boolean"
49
+ }
50
+ },
51
+ "required": ["name", "location"]
52
+ }
53
+ }
54
+ },
55
+ "required": ["displayName", "description"],
56
+ "title": "Hub",
57
+ "type": "object"
58
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
- "type": "object",
3
2
  "$id": "createCardsMacroSchema",
3
+ "additionalProperties": false,
4
4
  "properties": {
5
5
  "buttonLabel": {
6
6
  "type": "string",
@@ -34,6 +34,6 @@
34
34
  "required": ["linkType", "direction", "cardKey"]
35
35
  }
36
36
  },
37
- "additionalProperties": false,
38
- "required": ["buttonLabel", "template"]
37
+ "required": ["buttonLabel", "template"],
38
+ "type": "object"
39
39
  }
@@ -1,8 +1,6 @@
1
1
  {
2
- "title": "Graph",
3
2
  "$id": "graphMacroBaseSchema",
4
3
  "description": "A graph object provides supplemental information about a graph",
5
- "type": "object",
6
4
  "properties": {
7
5
  "model": {
8
6
  "description": "Model",
@@ -13,5 +11,7 @@
13
11
  "type": "string"
14
12
  }
15
13
  },
16
- "required": ["model", "view"]
14
+ "required": ["model", "view"],
15
+ "title": "Graph",
16
+ "type": "object"
17
17
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "type": "object",
3
2
  "$id": "imageMacroSchema",
3
+ "additionalProperties": false,
4
4
  "properties": {
5
5
  "fileName": {
6
6
  "type": "string",
@@ -19,6 +19,6 @@
19
19
  "description": "Title attribute for the image"
20
20
  }
21
21
  },
22
- "additionalProperties": false,
23
- "required": ["fileName"]
22
+ "required": ["fileName"],
23
+ "type": "object"
24
24
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "type": "object",
3
2
  "$id": "includeMacroSchema",
3
+ "additionalProperties": false,
4
4
  "properties": {
5
5
  "cardKey": {
6
6
  "type": "string",
@@ -21,6 +21,6 @@
21
21
  "enum": ["normal", "discrete"]
22
22
  }
23
23
  },
24
- "additionalProperties": false,
25
- "required": ["cardKey"]
24
+ "required": ["cardKey"],
25
+ "type": "object"
26
26
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "type": "object",
3
2
  "$id": "percentageMacroSchema",
3
+ "additionalProperties": false,
4
4
  "properties": {
5
5
  "title": {
6
6
  "type": "string",
@@ -20,6 +20,6 @@
20
20
  "description": "Colour of the progress arc (optional)"
21
21
  }
22
22
  },
23
- "additionalProperties": false,
24
- "required": ["title", "value", "legend"]
23
+ "required": ["title", "value", "legend"],
24
+ "type": "object"
25
25
  }
@@ -1,13 +1,13 @@
1
1
  {
2
- "title": "Report",
3
2
  "$id": "reportMacroBaseSchema",
4
3
  "description": "A report object provides supplemental information about a report",
5
- "type": "object",
6
4
  "properties": {
7
5
  "name": {
8
6
  "description": "The name of the report",
9
7
  "type": "string"
10
8
  }
11
9
  },
12
- "required": ["name"]
10
+ "required": ["name"],
11
+ "title": "Report",
12
+ "type": "object"
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "type": "object",
3
2
  "$id": "scoreCardMacroSchema",
3
+ "additionalProperties": false,
4
4
  "properties": {
5
5
  "title": {
6
6
  "type": "string",
@@ -19,6 +19,6 @@
19
19
  "description": "Description text shown below the value (optional)"
20
20
  }
21
21
  },
22
- "additionalProperties": false,
23
- "required": ["value"]
22
+ "required": ["value"],
23
+ "type": "object"
24
24
  }
@@ -1,13 +1,6 @@
1
1
  {
2
2
  "$id": "vegaLiteMacroSchema",
3
- "type": "object",
4
- "properties": {
5
- "spec": {
6
- "$ref": "#/definitions/TopLevelSpec"
7
- }
8
- },
9
3
  "$schema": "http://json-schema.org/draft-07/schema#",
10
- "required": ["spec"],
11
4
  "definitions": {
12
5
  "Aggregate": {
13
6
  "anyOf": [
@@ -31707,5 +31700,12 @@
31707
31700
  "required": ["window"],
31708
31701
  "type": "object"
31709
31702
  }
31710
- }
31703
+ },
31704
+ "properties": {
31705
+ "spec": {
31706
+ "$ref": "#/definitions/TopLevelSpec"
31707
+ }
31708
+ },
31709
+ "required": ["spec"],
31710
+ "type": "object"
31711
31711
  }
@@ -1,14 +1,6 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "Vega Visualization Specification Language",
4
2
  "$id": "vegaMacroSchema",
5
- "type": "object",
6
- "properties": {
7
- "spec": {
8
- "$ref": "#/definitions/TopLevelSpec"
9
- }
10
- },
11
- "required": ["spec"],
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
12
4
  "definitions": {
13
5
  "autosize": {
14
6
  "oneOf": [
@@ -14927,5 +14919,13 @@
14927
14919
  }
14928
14920
  ]
14929
14921
  }
14930
- }
14922
+ },
14923
+ "properties": {
14924
+ "spec": {
14925
+ "$ref": "#/definitions/TopLevelSpec"
14926
+ }
14927
+ },
14928
+ "required": ["spec"],
14929
+ "title": "Vega Visualization Specification Language",
14930
+ "type": "object"
14931
14931
  }
@@ -1,12 +1,12 @@
1
1
  {
2
- "type": "object",
3
2
  "$id": "xrefMacroSchema",
3
+ "additionalProperties": false,
4
4
  "properties": {
5
5
  "cardKey": {
6
6
  "type": "string",
7
7
  "description": "The key of the card to create a cross-reference to"
8
8
  }
9
9
  },
10
- "additionalProperties": false,
11
- "required": ["cardKey"]
10
+ "required": ["cardKey"],
11
+ "type": "object"
12
12
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "title": "Cardtype",
3
2
  "$id": "cardTypeSchema",
4
- "description": "Card type defines the workflow and optional additional fields for the cards.",
5
- "type": "object",
6
3
  "additionalProperties": false,
4
+ "description": "Card type defines the workflow and optional additional fields for the cards.",
7
5
  "properties": {
8
6
  "name": {
9
7
  "description": "The name of the card type",
@@ -61,5 +59,7 @@
61
59
  }
62
60
  }
63
61
  },
64
- "required": ["displayName", "name", "workflow"]
62
+ "required": ["displayName", "name", "workflow"],
63
+ "title": "Cardtype",
64
+ "type": "object"
65
65
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "title": "FieldType",
3
2
  "$id": "fieldTypeSchema",
4
- "description": "Field type defines the workflow and optional additional fields for the cards.",
5
- "type": "object",
6
3
  "additionalProperties": false,
4
+ "description": "Field type defines the workflow and optional additional fields for the cards.",
7
5
  "properties": {
8
6
  "name": {
9
7
  "type": "string",
@@ -44,5 +42,7 @@
44
42
  }
45
43
  }
46
44
  },
47
- "required": ["displayName", "name", "dataType"]
45
+ "required": ["displayName", "name", "dataType"],
46
+ "title": "FieldType",
47
+ "type": "object"
48
48
  }
@@ -1,8 +1,7 @@
1
1
  {
2
- "title": "GraphModel",
3
2
  "$id": "graphModelSchema",
3
+ "additionalProperties": false,
4
4
  "description": "A graph model object provides data for graph views",
5
- "type": "object",
6
5
  "properties": {
7
6
  "name": {
8
7
  "description": "The name of this graph model",
@@ -24,5 +23,6 @@
24
23
  }
25
24
  },
26
25
  "required": ["displayName", "name", "displayName"],
27
- "additionalProperties": false
26
+ "title": "GraphModel",
27
+ "type": "object"
28
28
  }
@@ -1,8 +1,7 @@
1
1
  {
2
- "title": "GraphView",
3
2
  "$id": "graphViewSchema",
3
+ "additionalProperties": false,
4
4
  "description": "A graph view object provides means to show graph model data to users",
5
- "type": "object",
6
5
  "properties": {
7
6
  "name": {
8
7
  "description": "The name of this graph view",
@@ -24,5 +23,6 @@
24
23
  }
25
24
  },
26
25
  "required": ["displayName", "name", "displayName"],
27
- "additionalProperties": false
26
+ "title": "GraphView",
27
+ "type": "object"
28
28
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "title": "LinkType",
3
2
  "$id": "linkTypeSchema",
4
- "description": "Link types defined different ways to link cards together.",
5
- "type": "object",
6
3
  "additionalProperties": false,
4
+ "description": "Link types defined different ways to link cards together.",
7
5
  "properties": {
8
6
  "description": {
9
7
  "description": "A description that describes the link type",
@@ -53,5 +51,7 @@
53
51
  "sourceCardTypes",
54
52
  "destinationCardTypes",
55
53
  "enableLinkDescription"
56
- ]
54
+ ],
55
+ "title": "LinkType",
56
+ "type": "object"
57
57
  }
@@ -1,8 +1,7 @@
1
1
  {
2
- "title": "Report",
3
2
  "$id": "reportSchema",
3
+ "additionalProperties": false,
4
4
  "description": "A report object provides supplemental information about a report",
5
- "type": "object",
6
5
  "properties": {
7
6
  "name": {
8
7
  "description": "The name of this report",
@@ -24,5 +23,6 @@
24
23
  }
25
24
  },
26
25
  "required": ["name", "displayName", "category"],
27
- "additionalProperties": false
26
+ "title": "Report",
27
+ "type": "object"
28
28
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "title": "Template",
3
2
  "$id": "templateSchema",
4
- "description": "A template object provides supplemental information about a template directory structure ",
5
- "type": "object",
6
3
  "additionalProperties": false,
4
+ "description": "A template object provides supplemental information about a template directory structure ",
7
5
  "properties": {
8
6
  "name": {
9
7
  "description": "The name of this template",
@@ -24,5 +22,7 @@
24
22
  "type": "string"
25
23
  }
26
24
  },
27
- "required": ["displayName", "name"]
25
+ "required": ["displayName", "name"],
26
+ "title": "Template",
27
+ "type": "object"
28
28
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "title": "Workflow",
3
2
  "$id": "workflowSchema",
4
- "description": "A state machine for the workflow of cards",
5
- "type": "object",
6
3
  "additionalProperties": false,
4
+ "description": "A state machine for the workflow of cards",
7
5
  "properties": {
8
6
  "description": {
9
7
  "description": "A description that describes the workflow",
@@ -71,5 +69,7 @@
71
69
  }
72
70
  }
73
71
  },
74
- "required": ["displayName", "name", "states", "transitions"]
72
+ "required": ["displayName", "name", "states", "transitions"],
73
+ "title": "Workflow",
74
+ "type": "object"
75
75
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
2
  "$id": "jsonSchema",
4
- "title": "Core schema meta-schema",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "default": true,
5
5
  "definitions": {
6
6
  "schemaArray": {
7
7
  "type": "array",
@@ -36,7 +36,6 @@
36
36
  "default": []
37
37
  }
38
38
  },
39
- "type": ["object", "boolean"],
40
39
  "properties": {
41
40
  "$id": {
42
41
  "type": "string",
@@ -162,5 +161,6 @@
162
161
  "oneOf": { "$ref": "#/definitions/schemaArray" },
163
162
  "not": { "$ref": "#" }
164
163
  },
165
- "default": true
164
+ "title": "Core schema meta-schema",
165
+ "type": ["object", "boolean"]
166
166
  }
package/src/schemas.ts CHANGED
@@ -22,6 +22,7 @@ import fieldTypeSchema from './schema/resources/fieldTypeSchema.json' with { typ
22
22
  import graphMacroBaseSchema from './schema/macros/graphMacroBaseSchema.json' with { type: 'json' };
23
23
  import graphModelSchema from './schema/resources/graphModelSchema.json' with { type: 'json' };
24
24
  import graphViewSchema from './schema/resources/graphViewSchema.json' with { type: 'json' };
25
+ import hubSchema from './schema/hubSchema.json' with { type: 'json' };
25
26
  import imageMacroSchema from './schema/macros/imageMacroSchema.json' with { type: 'json' };
26
27
  import includeMacroSchema from './schema/macros/includeMacroSchema.json' with { type: 'json' };
27
28
  import linkTypeSchema from './schema/resources/linkTypeSchema.json' with { type: 'json' };
@@ -48,6 +49,7 @@ export const schemas = [
48
49
  graphMacroBaseSchema,
49
50
  graphModelSchema,
50
51
  graphViewSchema,
52
+ hubSchema,
51
53
  imageMacroSchema,
52
54
  includeMacroSchema,
53
55
  linkTypeSchema,
@@ -0,0 +1,7 @@
1
+ [
2
+ {
3
+ "version": 1,
4
+ "id": "jsonSchema",
5
+ "file": "parameterSchema.json"
6
+ }
7
+ ]
@@ -0,0 +1,22 @@
1
+ {
2
+ "$id": "myGraphMacroSchema",
3
+ "additionalProperties": false,
4
+ "description": "Parameters for the graph macro",
5
+ "properties": {
6
+ "model": {
7
+ "description": "The name of the graph model",
8
+ "type": "string"
9
+ },
10
+ "view": {
11
+ "description": "The name of the graph view",
12
+ "type": "string"
13
+ },
14
+ "cardKey": {
15
+ "description": "Override default cardKey of the macro with another cardKey. Default cardKey is the card where the macro is defined in.",
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": ["model", "view"],
20
+ "title": "Graph view",
21
+ "type": "object"
22
+ }
File without changes
@@ -1,8 +1,7 @@
1
1
  {
2
- "title": "Report",
3
2
  "$id": "reportMacroDefaultSchema",
3
+ "additionalProperties": false,
4
4
  "description": "A report object provides supplemental information about a report",
5
- "type": "object",
6
5
  "properties": {
7
6
  "name": {
8
7
  "description": "The name of the report",
@@ -13,6 +12,7 @@
13
12
  "type": "string"
14
13
  }
15
14
  },
16
- "additionalProperties": false,
17
- "required": ["name"]
15
+ "required": ["name"],
16
+ "title": "Report",
17
+ "type": "object"
18
18
  }