cassproject 5.0.4 → 5.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/README.md +6 -0
- package/package.json +17 -12
- package/src/com/eduworks/ec/graph/EcFrameworkGraph.js +11 -2
- package/src/org/cassproject/ebac/repository/EcRepository.js +2 -2
- package/src/org/cassproject/general/AuditLogger.js +46 -2
- package/src/org/cassproject/schema/cass/competency/Relation.js +8 -0
- package/src/org/schema/3DModel.js +2 -2
- package/src/test/3.EcFrameworkGraph.test.js +90 -0
- package/test.js +0 -5048
package/README.md
CHANGED
|
@@ -50,6 +50,12 @@ Development unit tests presume you have a CaSS Repository running on `localhost:
|
|
|
50
50
|
|
|
51
51
|
# Changelog
|
|
52
52
|
|
|
53
|
+
## 5.0.6
|
|
54
|
+
* Fixed bug using success in precache with L2 caching.
|
|
55
|
+
|
|
56
|
+
## 5.0.5
|
|
57
|
+
* Added implies relation.
|
|
58
|
+
|
|
53
59
|
## 5.0.4
|
|
54
60
|
* Updates to CEASN CSV Import validation
|
|
55
61
|
* Security updates.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cassproject",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"description": "Competency and Skills Service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "concurrently --maxProcesses=
|
|
7
|
+
"test": "concurrently --maxProcesses=2 --kill-others-on-fail \"npm run test16HttpsFips\" \"npm run test16Https11Fips\" \"npm run test16Https\" \"npm run test16Https11\" \"npm run test16Fips\" \"npm run test16\" \"npm run test15HttpsFips\" \"npm run test15Https11Fips\" \"npm run test15Https\" \"npm run test15Https11\" \"npm run test15Fips\" \"npm run test15\"",
|
|
8
8
|
"testActionCypress": "npm run testkill && export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.75 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\"",
|
|
9
9
|
"testCustom": "npm run test14 && npm run test13 && npm run test12",
|
|
10
10
|
"multitest": "concurrently --kill-others-on-fail \"npm run test15\" \"npm run test14\" \"npm run test13\" \"npm run test12\"",
|
|
@@ -13,14 +13,20 @@
|
|
|
13
13
|
"test16HttpsFips": "export CASS_LOOPBACK=https://cass-testsf16/api/|| set CASS_LOOPBACK=https://cass-testsf16/api/&& npm run testkillsf16 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf16 -p450:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.7 && wait-on https://localhost:450/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode24HttpsForceFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf16",
|
|
14
14
|
"test16Https11Fips": "export CASS_LOOPBACK=https://cass-testsf1116/api/|| set CASS_LOOPBACK=https://cass-testsf1116/api/&& npm run testkillsf1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf1116 -p449:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.7 && wait-on https://localhost:449/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode24HttpsForceFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf1116",
|
|
15
15
|
"test16Https": "export CASS_LOOPBACK=https://cass-tests16/api/|| set CASS_LOOPBACK=https://cass-tests16/api/&& npm run testkills16 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests16 -p448:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.7 && wait-on https://localhost:448/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills16",
|
|
16
|
+
"test16HttpsNoFips": "export CASS_LOOPBACK=https://cass-tests16/api/|| set CASS_LOOPBACK=https://cass-tests16/api/&& npm run testkills16 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests16 -p448:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.7 && wait-on https://localhost:448/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode22Https\" \"npm run testNode20Https\" \"npm run testNode18Https\" && npm run testkills16",
|
|
16
17
|
"test16Https11": "export CASS_LOOPBACK=https://cass-tests1116/api/|| set CASS_LOOPBACK=https://cass-tests1116/api/&& npm run testkills1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1116 -p451:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.7 && wait-on https://localhost:451/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills1116",
|
|
18
|
+
"test16Https11NoFips": "export CASS_LOOPBACK=https://cass-tests1116/api/|| set CASS_LOOPBACK=https://cass-tests1116/api/&& npm run testkills1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1116 -p451:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.7 && wait-on https://localhost:451/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode22Https\" \"npm run testNode20Https\" \"npm run testNode18Https\" && npm run testkills1116",
|
|
17
19
|
"test16Fips": "export CASS_LOOPBACK=http://cass-testf16/api/|| set CASS_LOOPBACK=http://cass-testf16/api/&& npm run testkillf16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-testf16 -p83:80 cassproject/cass:1.6.7 && wait-on http://localhost:83/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode24ForceFips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode22ForceFips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" && npm run testkillf16",
|
|
18
20
|
"test16": "export CASS_LOOPBACK=http://cass-test16/api/|| set CASS_LOOPBACK=http://cass-test16/api/&& npm run testkill16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test16 -p82:80 cassproject/cass:1.6.7 && wait-on http://localhost:82/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" && npm run testkill16",
|
|
21
|
+
"test16NoFips": "export CASS_LOOPBACK=http://cass-test16/api/|| set CASS_LOOPBACK=http://cass-test16/api/&& npm run testkill16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test16 -p82:80 cassproject/cass:1.6.7 && wait-on http://localhost:82/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode22\" \"npm run testNode20\" \"npm run testNode18\" && npm run testkill16",
|
|
19
22
|
"test15HttpsFips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-testsf15/api/|| set CASS_LOOPBACK=https://cass-testsf15/api/&& npm run testkillsf15 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf15 -p446:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:446/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf15",
|
|
20
23
|
"test15Https11Fips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-testsf1115/api/|| set CASS_LOOPBACK=https://cass-testsf1115/api/&& npm run testkillsf1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf1115 -p447:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost:447/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode24HttpsForceFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf1115",
|
|
21
24
|
"test15Https": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests15/api/|| set CASS_LOOPBACK=https://cass-tests15/api/&& npm run testkills15 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests15 -p444:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:444/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills15",
|
|
25
|
+
"test15HttpsNoFips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests15/api/|| set CASS_LOOPBACK=https://cass-tests15/api/&& npm run testkills15 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests15 -p444:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:444/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode22Https\" \"npm run testNode20Https\" \"npm run testNode18Https\" && npm run testkills15",
|
|
22
26
|
"test15Https11": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests1115/api/|| set CASS_LOOPBACK=https://cass-tests1115/api/&& npm run testkills1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1115 -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills1115",
|
|
27
|
+
"test15Https11NoFips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests1115/api/|| set CASS_LOOPBACK=https://cass-tests1115/api/&& npm run testkills1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1115 -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode22Https\" \"npm run testNode20Https\" \"npm run testNode18Https\" && npm run testkills1115",
|
|
23
28
|
"test15Fips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-testf15/api/|| set CASS_LOOPBACK=http://cass-testf15/api/&& npm run testkillf15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-testf15 -p81:80 cassproject/cass:1.5.75 && wait-on http://localhost:81/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode24ForceFips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode22ForceFips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" && npm run testkillf15",
|
|
29
|
+
"test15NoFips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.75 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode22\" \"npm run testNode20\" \"npm run testNode18\" && npm run testkill15",
|
|
24
30
|
"test15": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.75 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" && npm run testkill15",
|
|
25
31
|
"test14": "npm run testkill14 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test14 -p80:80 cassproject/cass:1.4.4 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill14",
|
|
26
32
|
"test13": "npm run testkill13 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test13 -p80:80 cassproject/cass:1.3.18 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill13",
|
|
@@ -106,7 +112,6 @@
|
|
|
106
112
|
"docs": "npm install yuidocjs yuidoc-ember-cli-theme && yuidoc -c yuidoc.json -o docs -e .js src && npm remove yuidocjs yuidoc-ember-cli-theme",
|
|
107
113
|
"doclint": "npm install yuidocjs yuidoc-ember-cli-theme && yuidoc --lint -c yuidoc.json -o docs -e .js src",
|
|
108
114
|
"cypress:install": "cypress install",
|
|
109
|
-
"cypress:run": "cypress run --headless",
|
|
110
115
|
"browserify:cypress:open": "cypress open --config-file cypressBrowserify.config.js",
|
|
111
116
|
"browserify:cypress:open:https": "cypress open -e CASS_LOOPBACK=https://localhost/api/ --config-file cypressBrowserify.config.js",
|
|
112
117
|
"vite:cypress:open": "cypress open --config-file cypressVite.config.js",
|
|
@@ -183,24 +188,24 @@
|
|
|
183
188
|
"homepage": "https://github.com/cassproject/cass-npm#readme",
|
|
184
189
|
"devDependencies": {
|
|
185
190
|
"@cypress/browserify-preprocessor": "^3.0.2",
|
|
186
|
-
"@cypress/vite-dev-server": "^
|
|
187
|
-
"@cypress/webpack-preprocessor": "^
|
|
191
|
+
"@cypress/vite-dev-server": "^7.0.1",
|
|
192
|
+
"@cypress/webpack-preprocessor": "^7.0.2",
|
|
188
193
|
"chai": "4.5.0",
|
|
189
194
|
"concurrently": "^9.2.1",
|
|
190
195
|
"convert-hrtime": "^5.0.0",
|
|
191
|
-
"cypress": "^15.
|
|
196
|
+
"cypress": "^15.6.0",
|
|
192
197
|
"cypress-fail-fast": "^7.1.1",
|
|
193
198
|
"eslint": "^9.39.1",
|
|
194
|
-
"fake-indexeddb": "^6.2.
|
|
195
|
-
"mocha": "^
|
|
199
|
+
"fake-indexeddb": "^6.2.5",
|
|
200
|
+
"mocha": "^11.7.5",
|
|
196
201
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
197
|
-
"nodemon": "^3.1.
|
|
202
|
+
"nodemon": "^3.1.11",
|
|
198
203
|
"nyc": "^17.1.0",
|
|
199
|
-
"sinon": "^
|
|
204
|
+
"sinon": "^21.0.0",
|
|
200
205
|
"url-polyfill": "^1.1.14",
|
|
201
|
-
"wait-on": "^
|
|
206
|
+
"wait-on": "^9.0.3",
|
|
202
207
|
"webpack": "^5.102.1",
|
|
203
|
-
"webpack-cli": "^
|
|
208
|
+
"webpack-cli": "^6.0.1"
|
|
204
209
|
},
|
|
205
210
|
"packageManager": "npm@11.3.0+sha512.96eb611483f49c55f7fa74df61b588de9e213f80a256728e6798ddc67176c7b07e4a1cfc7de8922422cbce02543714367037536955221fa451b0c4fefaf20c66"
|
|
206
211
|
}
|
|
@@ -264,7 +264,16 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
264
264
|
).then(async () =>
|
|
265
265
|
await Promise.all(
|
|
266
266
|
this.getOutEdges(competency).map(async (alignment) =>
|
|
267
|
-
await this.getCompetency(alignment.target).then(
|
|
267
|
+
await this.getCompetency(alignment.target).then(
|
|
268
|
+
alignment.relationType == Relation.IMPLIES
|
|
269
|
+
? async (t) =>
|
|
270
|
+
await this.processAssertionBooleanOutward(
|
|
271
|
+
alignment,
|
|
272
|
+
t,
|
|
273
|
+
assertions,
|
|
274
|
+
negative,
|
|
275
|
+
visited
|
|
276
|
+
) : async (s) =>
|
|
268
277
|
await this.processAssertionBooleanInward(
|
|
269
278
|
alignment,
|
|
270
279
|
s,
|
|
@@ -285,7 +294,7 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
285
294
|
negative,
|
|
286
295
|
visited
|
|
287
296
|
) {
|
|
288
|
-
if (alignment.relationType == Relation.NARROWS || alignment.relationType == Relation.IS_EQUIVALENT_TO)
|
|
297
|
+
if (alignment.relationType == Relation.NARROWS || alignment.relationType == Relation.IS_EQUIVALENT_TO || alignment.relationType == Relation.IMPLIES)
|
|
289
298
|
await this.processAssertionsBooleanPerAssertion(
|
|
290
299
|
assertions,
|
|
291
300
|
negative,
|
|
@@ -1205,7 +1205,7 @@ module.exports = class EcRepository {
|
|
|
1205
1205
|
EcRepository.cacheBacking[cached.id] = cached;
|
|
1206
1206
|
}
|
|
1207
1207
|
}
|
|
1208
|
-
let objResults = await me.precache.call(me, results,
|
|
1208
|
+
let objResults = await me.precache.call(me, results, null, null, eim, true, versionedUrls);
|
|
1209
1209
|
if (objResults.length == results.length)
|
|
1210
1210
|
return objResults;
|
|
1211
1211
|
//Second attempt, in case the indexed object URL doesn't match the permanent URL.
|
|
@@ -1215,7 +1215,7 @@ module.exports = class EcRepository {
|
|
|
1215
1215
|
.map(u => EcRemoteLinkedData.trimVersionFromUrl(u)); //NOSONAR - Nesting functions to perform filters is normal.
|
|
1216
1216
|
if (missingUris.length > 0)
|
|
1217
1217
|
objResults.push(...await me.precache.call(me, missingUris, null, null, eim, true));
|
|
1218
|
-
return objResults;
|
|
1218
|
+
return cassPromisify(objResults, success, failure);
|
|
1219
1219
|
}
|
|
1220
1220
|
for (let i = 0; i < results.length; i++) {
|
|
1221
1221
|
let d = new EcRemoteLinkedData(null, null);
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
const InverseSeverity = {
|
|
2
|
+
0: 'EMERGENCY',
|
|
3
|
+
1: 'ALERT ',
|
|
4
|
+
2: 'CRITICAL ',
|
|
5
|
+
3: 'ERROR ',
|
|
6
|
+
4: 'WARNING ',
|
|
7
|
+
5: 'NOTICE ',
|
|
8
|
+
6: 'INFO ',
|
|
9
|
+
7: 'DEBUG ',
|
|
10
|
+
8: 'DEBUG ',
|
|
11
|
+
9: 'NETWORK ',
|
|
12
|
+
10: 'DATA '
|
|
13
|
+
};
|
|
14
|
+
|
|
1
15
|
if (!global.auditLogger) { // Running client-side
|
|
2
16
|
global.auditLogger = {
|
|
3
17
|
report: function(system, severity, message, ...data) {
|
|
@@ -11,9 +25,39 @@ if (!global.auditLogger) { // Running client-side
|
|
|
11
25
|
console.trace("Could not log error message.");
|
|
12
26
|
}
|
|
13
27
|
},
|
|
14
|
-
|
|
28
|
+
SyslogFacility: {
|
|
29
|
+
USER: 1, // user
|
|
30
|
+
DAEMON: 3, // daemon - anything that runs in the background like jobs
|
|
31
|
+
AUTH: 4, // auth - anything that deals with authentication or authorization
|
|
32
|
+
FTP: 11, // ftp - transferring files in and out of the server
|
|
33
|
+
NETWORK: 16, // local0 - network traffic related like HTTP POST, GET, and DELETE
|
|
34
|
+
STORAGE: 17, // local1 - things like DBs
|
|
35
|
+
STANDARD: 18, // local2 - anything that doesn't fit into other categories most likely goes here
|
|
36
|
+
SECURITY: 23
|
|
37
|
+
},
|
|
38
|
+
LogCategory: {
|
|
39
|
+
SYSTEM: 'sys',
|
|
40
|
+
AUTH: 'auth',
|
|
41
|
+
MESSAGE: 'msg',
|
|
42
|
+
FILE_SYSTEM: 'fs',
|
|
43
|
+
NETWORK: 'net',
|
|
44
|
+
STORAGE: 'sto',
|
|
45
|
+
ADAPTER: 'ada',
|
|
46
|
+
PROFILE: 'pro',
|
|
47
|
+
SECURITY: 'sec'
|
|
48
|
+
},
|
|
15
49
|
Severity: {
|
|
16
|
-
|
|
50
|
+
EMERGENCY: 0, // system isn't working
|
|
51
|
+
ALERT: 1, // system needs attention
|
|
52
|
+
CRITICAL: 2, // code path has failed
|
|
53
|
+
ERROR: 3, // code path has failed, but can recover
|
|
54
|
+
WARNING: 4, // unusual conditions
|
|
55
|
+
NOTICE: 5, // normal but unlikely
|
|
56
|
+
INFO: 6, // normal
|
|
57
|
+
DEBUG: 7, // extra information
|
|
58
|
+
SERVICE: 8,
|
|
59
|
+
NETWORK: 9, // traffic information
|
|
60
|
+
DATA: 10, // data information
|
|
17
61
|
}
|
|
18
62
|
}
|
|
19
63
|
}
|
|
@@ -61,6 +61,14 @@ module.exports = class Relation extends schema.CreativeWork {
|
|
|
61
61
|
* @static
|
|
62
62
|
* @type string
|
|
63
63
|
*/
|
|
64
|
+
static IMPLIES = "implies";
|
|
65
|
+
/**
|
|
66
|
+
* Relation type when information from one object is used in another.
|
|
67
|
+
*
|
|
68
|
+
* @property IMPLIES
|
|
69
|
+
* @static
|
|
70
|
+
* @type string
|
|
71
|
+
*/
|
|
64
72
|
static IS_RELATED_TO = "isRelatedTo";
|
|
65
73
|
/**
|
|
66
74
|
* Relation type when one object is equivalent to another.
|
|
@@ -6,11 +6,11 @@ schema.MediaObject = require("./MediaObject.js");
|
|
|
6
6
|
case of a single file published after Zip compression, the convention of appending '+zip' to the [[encodingFormat]] can be used. Geospatial, AR/VR, artistic/animation, gaming, engineering and scientific content can all be represented using [[3DModel]].
|
|
7
7
|
*
|
|
8
8
|
* @author schema.org
|
|
9
|
-
* @class
|
|
9
|
+
* @class ThreeDModel
|
|
10
10
|
* @module org.schema
|
|
11
11
|
* @extends MediaObject
|
|
12
12
|
*/
|
|
13
|
-
module.exports = class
|
|
13
|
+
module.exports = class ThreeDModel extends schema.MediaObject {
|
|
14
14
|
/**
|
|
15
15
|
* Constructor, automatically sets @context and @type.
|
|
16
16
|
*
|
|
@@ -868,6 +868,96 @@ describe("EcFrameworkGraph", () => {
|
|
|
868
868
|
});
|
|
869
869
|
assert.deepEqual(result, [1, 1]);
|
|
870
870
|
})
|
|
871
|
+
it('basic implies satisfied test', async () => {
|
|
872
|
+
let f = await newFramework("basic implies satisfied framework");
|
|
873
|
+
let c = await newCompetency("Add");
|
|
874
|
+
let c2 = await newCompetency("Sum");
|
|
875
|
+
f.addCompetency(c.shortId());
|
|
876
|
+
f.addCompetency(c2.shortId());
|
|
877
|
+
let r = await newRelation(c, c2, EcAlignment.IMPLIES);
|
|
878
|
+
f.addRelation(r.shortId());
|
|
879
|
+
await f.save(null, failure, repo);
|
|
880
|
+
let a = await newAssertion(c);
|
|
881
|
+
let fg = new EcFrameworkGraph();
|
|
882
|
+
let result = await fg.addFramework(
|
|
883
|
+
f,
|
|
884
|
+
repo,
|
|
885
|
+
() => { },
|
|
886
|
+
() => { }
|
|
887
|
+
).then(async () => {
|
|
888
|
+
let assertions = [];
|
|
889
|
+
assertions.push(a);
|
|
890
|
+
let result = await fg.processAssertionsBoolean(
|
|
891
|
+
assertions,
|
|
892
|
+
() => { },
|
|
893
|
+
() => { }
|
|
894
|
+
).then(() => {
|
|
895
|
+
let result = [];
|
|
896
|
+
if (fg.getMetaStateCompetency(c)["positiveAssertion"] != null)
|
|
897
|
+
result.push(fg.getMetaStateCompetency(c)["positiveAssertion"].length);
|
|
898
|
+
if (fg.getMetaStateCompetency(c2)["positiveAssertion"] != null)
|
|
899
|
+
result.push(fg.getMetaStateCompetency(c2)["positiveAssertion"].length);
|
|
900
|
+
return result;
|
|
901
|
+
}).catch((err) => {
|
|
902
|
+
assert.fail(err);
|
|
903
|
+
});
|
|
904
|
+
return result;
|
|
905
|
+
}).catch((err) => {
|
|
906
|
+
assert.fail(err);
|
|
907
|
+
}).finally(async () => {
|
|
908
|
+
await deleteById(f.shortId());
|
|
909
|
+
await deleteById(c.shortId());
|
|
910
|
+
await deleteById(c2.shortId());
|
|
911
|
+
await deleteById(a.shortId());
|
|
912
|
+
await deleteById(r.shortId());
|
|
913
|
+
});
|
|
914
|
+
assert.deepEqual(result, [1, 1]);
|
|
915
|
+
})
|
|
916
|
+
it('basic implies false test', async () => {
|
|
917
|
+
let f = await newFramework("basic implies false framework");
|
|
918
|
+
let c = await newCompetency("Add");
|
|
919
|
+
let c2 = await newCompetency("Sum");
|
|
920
|
+
f.addCompetency(c.shortId());
|
|
921
|
+
f.addCompetency(c2.shortId());
|
|
922
|
+
let r = await newRelation(c, c2, EcAlignment.IMPLIES);
|
|
923
|
+
f.addRelation(r.shortId());
|
|
924
|
+
await f.save(null, failure, repo);
|
|
925
|
+
let a = await newFalseAssertion(c);
|
|
926
|
+
let fg = new EcFrameworkGraph();
|
|
927
|
+
let result = await fg.addFramework(
|
|
928
|
+
f,
|
|
929
|
+
repo,
|
|
930
|
+
() => { },
|
|
931
|
+
() => { }
|
|
932
|
+
).then(async () => {
|
|
933
|
+
let assertions = [];
|
|
934
|
+
assertions.push(await EcAssertion.get(a.shortId()));
|
|
935
|
+
let result = await fg.processAssertionsBoolean(
|
|
936
|
+
assertions,
|
|
937
|
+
() => { },
|
|
938
|
+
() => { }
|
|
939
|
+
).then(() => {
|
|
940
|
+
let result = [];
|
|
941
|
+
if (fg.getMetaStateCompetency(c)["negativeAssertion"] != null)
|
|
942
|
+
result.push(fg.getMetaStateCompetency(c)["negativeAssertion"].length);
|
|
943
|
+
if (fg.getMetaStateCompetency(c2)["negativeAssertion"] != null)
|
|
944
|
+
result.push(fg.getMetaStateCompetency(c2)["negativeAssertion"].length);
|
|
945
|
+
return result;
|
|
946
|
+
}).catch((err) => {
|
|
947
|
+
assert.fail(err);
|
|
948
|
+
});
|
|
949
|
+
return result;
|
|
950
|
+
}).catch((err) => {
|
|
951
|
+
assert.fail(err);
|
|
952
|
+
}).finally(async () => {
|
|
953
|
+
await deleteById(f.shortId());
|
|
954
|
+
await deleteById(c.shortId());
|
|
955
|
+
await deleteById(c2.shortId());
|
|
956
|
+
await deleteById(a.shortId());
|
|
957
|
+
await deleteById(r.shortId());
|
|
958
|
+
});
|
|
959
|
+
assert.deepEqual(result, [1, 1]);
|
|
960
|
+
})
|
|
871
961
|
it('basic narrows true test', async () => {
|
|
872
962
|
let f = await newFramework("basic narrows true framework");
|
|
873
963
|
let c = await newCompetency("Add");
|