@cyberismo/assets 0.0.6
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/LICENSE +702 -0
- package/README.md +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +612 -0
- package/dist/schemas.d.ts +1132 -0
- package/dist/static/defaultReport/.schema +7 -0
- package/dist/static/defaultReport/index.adoc.hbs +3 -0
- package/dist/static/defaultReport/parameterSchema.json +18 -0
- package/dist/static/defaultReport/query.lp.hbs +2 -0
- package/package.json +30 -0
- package/src/calculations/common/base.lp +71 -0
- package/src/calculations/common/queryLanguage.lp +418 -0
- package/src/calculations/queries/card.lp +129 -0
- package/src/calculations/queries/onCreation.lp +44 -0
- package/src/calculations/queries/onTransition.lp +26 -0
- package/src/calculations/queries/tree.lp +6 -0
- package/src/calculations/test/model.lp +9 -0
- package/src/declarations.d.ts +9 -0
- package/src/graphvizReport/index.adoc.hbs +34 -0
- package/src/graphvizReport/query.lp.hbs +141 -0
- package/src/index.ts +52 -0
- package/src/schema/cardBaseSchema.json +76 -0
- package/src/schema/cardTreeDirectorySchema.json +663 -0
- package/src/schema/cardsConfigSchema.json +49 -0
- package/src/schema/csvSchema.json +30 -0
- package/src/schema/dotSchema.json +25 -0
- package/src/schema/macros/createCardsMacroSchema.json +39 -0
- package/src/schema/macros/graphMacroBaseSchema.json +17 -0
- package/src/schema/macros/reportMacroBaseSchema.json +13 -0
- package/src/schema/macros/scoreCardMacroSchema.json +24 -0
- package/src/schema/resources/cardTypeSchema.json +65 -0
- package/src/schema/resources/fieldTypeSchema.json +47 -0
- package/src/schema/resources/graphModelSchema.json +28 -0
- package/src/schema/resources/graphViewSchema.json +28 -0
- package/src/schema/resources/linkTypeSchema.json +56 -0
- package/src/schema/resources/reportSchema.json +28 -0
- package/src/schema/resources/templateSchema.json +28 -0
- package/src/schema/resources/workflowSchema.json +75 -0
- package/src/schema/schema.json +166 -0
- package/src/schemas.ts +54 -0
- package/src/static/defaultReport/.schema +7 -0
- package/src/static/defaultReport/index.adoc.hbs +3 -0
- package/src/static/defaultReport/parameterSchema.json +18 -0
- package/src/static/defaultReport/query.lp.hbs +2 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "jsonSchema",
|
|
4
|
+
"title": "Core schema meta-schema",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"schemaArray": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"minItems": 1,
|
|
9
|
+
"items": { "$ref": "#" }
|
|
10
|
+
},
|
|
11
|
+
"nonNegativeInteger": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"nonNegativeIntegerDefault0": {
|
|
16
|
+
"allOf": [
|
|
17
|
+
{ "$ref": "#/definitions/nonNegativeInteger" },
|
|
18
|
+
{ "default": 0 }
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"simpleTypes": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"array",
|
|
24
|
+
"boolean",
|
|
25
|
+
"integer",
|
|
26
|
+
"null",
|
|
27
|
+
"number",
|
|
28
|
+
"object",
|
|
29
|
+
"string"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"stringArray": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "type": "string" },
|
|
35
|
+
"uniqueItems": true,
|
|
36
|
+
"default": []
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"type": ["object", "boolean"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"$id": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "uri-reference"
|
|
44
|
+
},
|
|
45
|
+
"$schema": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "uri"
|
|
48
|
+
},
|
|
49
|
+
"$ref": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"format": "uri-reference"
|
|
52
|
+
},
|
|
53
|
+
"$comment": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"title": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"description": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"default": true,
|
|
63
|
+
"readOnly": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"default": false
|
|
66
|
+
},
|
|
67
|
+
"writeOnly": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
71
|
+
"examples": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": true
|
|
74
|
+
},
|
|
75
|
+
"multipleOf": {
|
|
76
|
+
"type": "number",
|
|
77
|
+
"exclusiveMinimum": 0
|
|
78
|
+
},
|
|
79
|
+
"maximum": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
},
|
|
82
|
+
"exclusiveMaximum": {
|
|
83
|
+
"type": "number"
|
|
84
|
+
},
|
|
85
|
+
"minimum": {
|
|
86
|
+
"type": "number"
|
|
87
|
+
},
|
|
88
|
+
"exclusiveMinimum": {
|
|
89
|
+
"type": "number"
|
|
90
|
+
},
|
|
91
|
+
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
92
|
+
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
93
|
+
"pattern": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"format": "regex"
|
|
96
|
+
},
|
|
97
|
+
"additionalItems": { "$ref": "#" },
|
|
98
|
+
"items": {
|
|
99
|
+
"anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }],
|
|
100
|
+
"default": true
|
|
101
|
+
},
|
|
102
|
+
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
103
|
+
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
104
|
+
"uniqueItems": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"default": false
|
|
107
|
+
},
|
|
108
|
+
"contains": { "$ref": "#" },
|
|
109
|
+
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
110
|
+
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
111
|
+
"required": { "$ref": "#/definitions/stringArray" },
|
|
112
|
+
"additionalProperties": { "$ref": "#" },
|
|
113
|
+
"definitions": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": { "$ref": "#" },
|
|
116
|
+
"default": {}
|
|
117
|
+
},
|
|
118
|
+
"properties": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": { "$ref": "#" },
|
|
121
|
+
"default": {}
|
|
122
|
+
},
|
|
123
|
+
"patternProperties": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": { "$ref": "#" },
|
|
126
|
+
"propertyNames": { "format": "regex" },
|
|
127
|
+
"default": {}
|
|
128
|
+
},
|
|
129
|
+
"dependencies": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": {
|
|
132
|
+
"anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"propertyNames": { "$ref": "#" },
|
|
136
|
+
"const": true,
|
|
137
|
+
"enum": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": true,
|
|
140
|
+
"minItems": 1,
|
|
141
|
+
"uniqueItems": true
|
|
142
|
+
},
|
|
143
|
+
"type": {
|
|
144
|
+
"anyOf": [
|
|
145
|
+
{ "$ref": "#/definitions/simpleTypes" },
|
|
146
|
+
{
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": { "$ref": "#/definitions/simpleTypes" },
|
|
149
|
+
"minItems": 1,
|
|
150
|
+
"uniqueItems": true
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"format": { "type": "string" },
|
|
155
|
+
"contentMediaType": { "type": "string" },
|
|
156
|
+
"contentEncoding": { "type": "string" },
|
|
157
|
+
"if": { "$ref": "#" },
|
|
158
|
+
"then": { "$ref": "#" },
|
|
159
|
+
"else": { "$ref": "#" },
|
|
160
|
+
"allOf": { "$ref": "#/definitions/schemaArray" },
|
|
161
|
+
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
|
162
|
+
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
|
163
|
+
"not": { "$ref": "#" }
|
|
164
|
+
},
|
|
165
|
+
"default": true
|
|
166
|
+
}
|
package/src/schemas.ts
ADDED
|
@@ -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
|
+
|
|
14
|
+
/* THIS IS AN AUTOGENERATED FILE, DO NOT EDIT IT MANUALLY */
|
|
15
|
+
import cardBaseSchema from './schema/cardBaseSchema.json' with { type: 'json' };
|
|
16
|
+
import cardsConfigSchema from './schema/cardsConfigSchema.json' with { type: 'json' };
|
|
17
|
+
import cardTypeSchema from './schema/resources/cardTypeSchema.json' with { type: 'json' };
|
|
18
|
+
import createCardsMacroSchema from './schema/macros/createCardsMacroSchema.json' with { type: 'json' };
|
|
19
|
+
import csvSchema from './schema/csvSchema.json' with { type: 'json' };
|
|
20
|
+
import dotSchema from './schema/dotSchema.json' with { type: 'json' };
|
|
21
|
+
import fieldTypeSchema from './schema/resources/fieldTypeSchema.json' with { type: 'json' };
|
|
22
|
+
import graphMacroBaseSchema from './schema/macros/graphMacroBaseSchema.json' with { type: 'json' };
|
|
23
|
+
import graphModelSchema from './schema/resources/graphModelSchema.json' with { type: 'json' };
|
|
24
|
+
import graphViewSchema from './schema/resources/graphViewSchema.json' with { type: 'json' };
|
|
25
|
+
import linkTypeSchema from './schema/resources/linkTypeSchema.json' with { type: 'json' };
|
|
26
|
+
import reportMacroBaseSchema from './schema/macros/reportMacroBaseSchema.json' with { type: 'json' };
|
|
27
|
+
import reportSchema from './schema/resources/reportSchema.json' with { type: 'json' };
|
|
28
|
+
import schema from './schema/schema.json' with { type: 'json' };
|
|
29
|
+
import scoreCardMacroSchema from './schema/macros/scoreCardMacroSchema.json' with { type: 'json' };
|
|
30
|
+
import templateSchema from './schema/resources/templateSchema.json' with { type: 'json' };
|
|
31
|
+
import workflowSchema from './schema/resources/workflowSchema.json' with { type: 'json' };
|
|
32
|
+
import cardTreeDirectorySchema from './schema/cardTreeDirectorySchema.json' with { type: 'json' };
|
|
33
|
+
|
|
34
|
+
export const schemas = [
|
|
35
|
+
cardBaseSchema,
|
|
36
|
+
cardsConfigSchema,
|
|
37
|
+
cardTypeSchema,
|
|
38
|
+
createCardsMacroSchema,
|
|
39
|
+
csvSchema,
|
|
40
|
+
dotSchema,
|
|
41
|
+
fieldTypeSchema,
|
|
42
|
+
graphMacroBaseSchema,
|
|
43
|
+
graphModelSchema,
|
|
44
|
+
graphViewSchema,
|
|
45
|
+
linkTypeSchema,
|
|
46
|
+
reportMacroBaseSchema,
|
|
47
|
+
reportSchema,
|
|
48
|
+
schema,
|
|
49
|
+
scoreCardMacroSchema,
|
|
50
|
+
templateSchema,
|
|
51
|
+
workflowSchema,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export const parentSchema = cardTreeDirectorySchema;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Report",
|
|
3
|
+
"$id": "reportMacroDefaultSchema",
|
|
4
|
+
"description": "A report object provides supplemental information about a report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"description": "The name of the report",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"cardKey": {
|
|
12
|
+
"description": "Used to override the default cardKey, which is the cardKey of the card, in which the report macro is used",
|
|
13
|
+
"type": "string"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": ["name"]
|
|
18
|
+
}
|