@cyberismo/assets 0.0.13 → 0.0.15

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/schemas.d.ts CHANGED
@@ -40196,22 +40196,26 @@ export declare const parentSchema: {
40196
40196
  calculationResourceSchema: {
40197
40197
  type: string;
40198
40198
  properties: {
40199
+ additionalProperties: boolean;
40199
40200
  directories: {
40200
40201
  type: string;
40201
40202
  additionalProperties: boolean;
40202
- };
40203
- files: {
40204
- type: string;
40205
- $comment: string;
40206
- additionalProperties: boolean;
40207
40203
  patternProperties: {
40208
- "^.+\\.lp$": {
40204
+ ".+": {
40209
40205
  type: string;
40206
+ properties: {
40207
+ files: {
40208
+ type: string;
40209
+ properties: {
40210
+ "calculation.lp": {
40211
+ type: string;
40212
+ };
40213
+ };
40214
+ required: string[];
40215
+ };
40216
+ };
40210
40217
  };
40211
40218
  };
40212
- properties: {
40213
- ".gitkeep": {};
40214
- };
40215
40219
  };
40216
40220
  };
40217
40221
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyberismo/assets",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
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.25.9",
18
+ "esbuild": "^0.25.11",
19
19
  "esbuild-plugin-import-glob": "^0.1.1"
20
20
  },
21
21
  "files": [
@@ -41,8 +41,47 @@ toc::[]
41
41
  | {{displayName}} | xref:{{this.key}}[{{this.title}}]{{#if this.linkDescription}} - {{this.linkDescription}}{{/if}}
42
42
  {{/each}}
43
43
  |===
44
+ {empty} +
44
45
  {{/if}}
46
+ {{#if this.notifications}}
47
+ [discrete]
48
+ ==== Notifications
49
+
50
+ [cols="1,2,3",options="header",frame=none,grid=rows]
51
+ |===
52
+ | Category | Title | Message
53
+ {{#each this.notifications}}
54
+ | {{category}} | {{title}} | {{message}}
55
+ {{/each}}
56
+ |===
45
57
  {empty} +
58
+ {{/if}}
59
+ {{#if this.policyChecks.successes}}
60
+ [discrete]
61
+ ==== Passed policy checks
62
+
63
+ [cols="1,3",options="header",frame=none,grid=rows]
64
+ |===
65
+ | Category | Title
66
+ {{#each this.policyChecks.successes}}
67
+ | {{category}} | {{title}}
68
+ {{/each}}
69
+ |===
70
+ {empty} +
71
+ {{/if}}
72
+ {{#if this.policyChecks.failures}}
73
+ [discrete]
74
+ ==== Failed policy checks
75
+
76
+ [cols="1,2,3",options="header",frame=none,grid=rows]
77
+ |===
78
+ | Category | Title | Details
79
+ {{#each this.policyChecks.failures}}
80
+ | {{category}} | {{title}} | {{errorMessage}}{{#if fieldName}} ({{fieldName}}){{/if}}
81
+ {{/each}}
82
+ |===
83
+ {empty} +
84
+ {{/if}}
46
85
  {{#include}}
47
86
  "cardKey": "{{this.key}}",
48
87
  "levelOffset": "{{this.levelOffset}}",
@@ -132,6 +132,8 @@ select(1, "cardTypeDisplayName").
132
132
  select(1, "key").
133
133
  select(1, "lastUpdated").
134
134
  select(1, "links").
135
+ select(1, "notifications").
136
+ select(1, "policyChecks").
135
137
  select(1, "labels").
136
138
  select(1, "levelOffset").
137
139
  select(1, "treePath").
@@ -122,21 +122,25 @@
122
122
  "calculationResourceSchema": {
123
123
  "type": "object",
124
124
  "properties": {
125
+ "additionalProperties": false,
125
126
  "directories": {
126
127
  "type": "object",
127
- "additionalProperties": false
128
- },
129
- "files": {
130
- "type": "object",
131
- "$comment": "Each file must be a logic program file",
132
128
  "additionalProperties": false,
133
129
  "patternProperties": {
134
- "^.+\\.lp$": {
135
- "type": "object"
130
+ ".+": {
131
+ "type": "object",
132
+ "properties": {
133
+ "files": {
134
+ "type": "object",
135
+ "properties": {
136
+ "calculation.lp": {
137
+ "type": "object"
138
+ }
139
+ },
140
+ "required": ["calculation.lp"]
141
+ }
142
+ }
136
143
  }
137
- },
138
- "properties": {
139
- ".gitkeep": {}
140
144
  }
141
145
  }
142
146
  }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$id": "calculationSchema",
3
+ "additionalProperties": false,
4
+ "description": "A calculation object provides logic programming rules and metadata for calculations",
5
+ "properties": {
6
+ "name": {
7
+ "description": "The name of this calculation",
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "pattern": "^[A-Za-z0-9/._-]+$"
11
+ },
12
+ "displayName": {
13
+ "description": "The name of the calculation as it should be displayed in the user interface",
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "description": "A description of the calculation and its purpose",
18
+ "type": "string"
19
+ },
20
+ "calculation": {
21
+ "description": "The logic programming content for this calculation",
22
+ "type": "string"
23
+ }
24
+ },
25
+ "required": ["name"],
26
+ "title": "Calculation",
27
+ "type": "object"
28
+ }
package/src/schemas.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  */
13
13
 
14
14
  /* THIS IS AN AUTOGENERATED FILE, DO NOT EDIT IT MANUALLY */
15
+ import calculationSchema from './schema/resources/calculationSchema.json' with { type: 'json' };
15
16
  import cardBaseSchema from './schema/cardBaseSchema.json' with { type: 'json' };
16
17
  import cardsConfigSchema from './schema/cardsConfigSchema.json' with { type: 'json' };
17
18
  import cardTypeSchema from './schema/resources/cardTypeSchema.json' with { type: 'json' };
@@ -39,6 +40,7 @@ import xrefMacroSchema from './schema/macros/xrefMacroSchema.json' with { type:
39
40
  import cardTreeDirectorySchema from './schema/cardTreeDirectorySchema.json' with { type: 'json' };
40
41
 
41
42
  export const schemas = [
43
+ calculationSchema,
42
44
  cardBaseSchema,
43
45
  cardsConfigSchema,
44
46
  cardTypeSchema,