cassproject 1.5.39 → 1.5.41
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
CHANGED
|
@@ -48,6 +48,14 @@ Development unit tests presume you have a CaSS Repository running on `localhost:
|
|
|
48
48
|
|
|
49
49
|
# Changelog
|
|
50
50
|
|
|
51
|
+
## 1.5.41
|
|
52
|
+
* Updates to CEASN Concept Scheme import
|
|
53
|
+
* Updated libraries
|
|
54
|
+
* Failing to log an error message now logs an error message.
|
|
55
|
+
|
|
56
|
+
## 1.5.40
|
|
57
|
+
* Fixed an issue found in downstream unit tests.
|
|
58
|
+
|
|
51
59
|
## 1.5.39
|
|
52
60
|
* Removed axios due to incompatibility with http2 and security findings.
|
|
53
61
|
* Now uses fetch for http/s traffic.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cassproject",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.41",
|
|
4
4
|
"description": "Competency and Skills Service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"multitest": "concurrently --kill-others --kill-others-on-fail \"npm run test15\" \"npm run test14\" \"npm run test13\" \"npm run test12\"",
|
|
10
10
|
"testCassTest": "npm run testkill && docker run -d --name cass-test -p80:80 -e CASS_LOOPBACK cass-test && wait-on http://localhost/api/ping && npm run testNode18 && npm run testNode18Fips && npm run testNode16 && npm run testNode15 && npm run testNode14 && npm run testNode13 && npm run testNode12 && npm run testCypressEdge && npm run testCypress && npm run testkill",
|
|
11
11
|
"testDevHttps": "npm run testkill && docker run -d --name cass-test -p443:80 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:dev && wait-on https://localhost/api/ping && npm run testNode18HttpsFips && npm run testNode18Https && npm run testNode16Https && npm run testNode15Https && npm run testNode14Https && npm run testNode13Https && npm run testNode12Https && npm run testCypressEdgeHttps && npm run testCypressHttps",
|
|
12
|
-
"test15HttpsFips": "npm run testkill && docker run -d --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.
|
|
13
|
-
"test15Https11Fips": "npm run testkill && docker run -d --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.
|
|
12
|
+
"test15HttpsFips": "npm run testkill && docker run -d --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.40 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
|
|
13
|
+
"test15Https11Fips": "npm run testkill && docker run -d --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.40 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
|
|
14
14
|
"test15Https": "npm run testkill && docker run -d --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.32 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
|
|
15
15
|
"test15Https11": "npm run testkill && docker run -d --name cass-test -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.32 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" \"npm run testNode18HttpsFips\" \"npm run testNode16Https\" && npm run testkill",
|
|
16
|
-
"test15Fips": "export CASS_LOOPBACK=http://localhost/api/|| set CASS_LOOPBACK=http://localhost/api/&& npm run testkill15 && docker run -d -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.
|
|
16
|
+
"test15Fips": "export CASS_LOOPBACK=http://localhost/api/|| set CASS_LOOPBACK=http://localhost/api/&& npm run testkill15 && docker run -d -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.40 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" \"npm run testNode18Fips\" \"npm run testNode16\" && npm run testkill15",
|
|
17
17
|
"test15": "export CASS_LOOPBACK=http://localhost/api/|| set CASS_LOOPBACK=http://localhost/api/&& npm run testkill15 && docker run -d -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.32 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" \"npm run testNode18Fips\" \"npm run testNode16\" && npm run testkill15",
|
|
18
18
|
"test14": "npm run testkill14 && docker run -d -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",
|
|
19
19
|
"test13": "npm run testkill13 && docker run -d -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",
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"base64-arraybuffer": "^1.0.2",
|
|
110
110
|
"forge": "^2.3.0",
|
|
111
|
-
"jsonld": "^8.3.
|
|
111
|
+
"jsonld": "^8.3.2",
|
|
112
112
|
"node-forge": "^1.3.1",
|
|
113
113
|
"papaparse": "^5.4.1",
|
|
114
114
|
"pem-jwk": "^2.0.0",
|
|
115
115
|
"promise-worker": "^2.0.1",
|
|
116
116
|
"rdf-canonize": "^3.4.0",
|
|
117
|
-
"web-worker": "^1.
|
|
117
|
+
"web-worker": "^1.3.0"
|
|
118
118
|
},
|
|
119
119
|
"files": [
|
|
120
120
|
"lib/",
|
|
@@ -138,23 +138,23 @@
|
|
|
138
138
|
},
|
|
139
139
|
"homepage": "https://github.com/cassproject/cass-npm#readme",
|
|
140
140
|
"devDependencies": {
|
|
141
|
-
"@babel/core": "^7.23.
|
|
142
|
-
"@babel/preset-env": "^7.23.
|
|
141
|
+
"@babel/core": "^7.23.7",
|
|
142
|
+
"@babel/preset-env": "^7.23.8",
|
|
143
143
|
"@cypress/browserify-preprocessor": "^3.0.2",
|
|
144
|
-
"@cypress/vite-dev-server": "^5.0.
|
|
145
|
-
"@cypress/webpack-preprocessor": "^6.0.
|
|
144
|
+
"@cypress/vite-dev-server": "^5.0.7",
|
|
145
|
+
"@cypress/webpack-preprocessor": "^6.0.1",
|
|
146
146
|
"babel-eslint": "^10.1.0",
|
|
147
147
|
"babel-plugin-transform-remove-strict-mode": "^0.0.2",
|
|
148
|
-
"chai": "^4.
|
|
148
|
+
"chai": "^4.4.0",
|
|
149
149
|
"concurrently": "^8.2.2",
|
|
150
150
|
"convert-hrtime": "^5.0.0",
|
|
151
|
-
"cypress": "^13.
|
|
152
|
-
"eslint": "^8.
|
|
151
|
+
"cypress": "^13.6.2",
|
|
152
|
+
"eslint": "^8.56.0",
|
|
153
153
|
"mocha": "^10.2.0",
|
|
154
154
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
155
|
-
"nodemon": "^3.0.
|
|
155
|
+
"nodemon": "^3.0.2",
|
|
156
156
|
"nyc": "^15.1.0",
|
|
157
|
-
"wait-on": "^7.0
|
|
157
|
+
"wait-on": "^7.2.0",
|
|
158
158
|
"webpack": "^5.89.0",
|
|
159
159
|
"webpack-cli": "^5.1.4",
|
|
160
160
|
"wtfnode": "^0.9.1"
|
|
@@ -161,9 +161,7 @@ module.exports = class EcRemote {
|
|
|
161
161
|
body: fd,
|
|
162
162
|
headers: headers || {},
|
|
163
163
|
}).then(async (response) => {
|
|
164
|
-
|
|
165
|
-
throw new Error(response.statusText);
|
|
166
|
-
}
|
|
164
|
+
|
|
167
165
|
const contentType = response.headers.get("content-type");
|
|
168
166
|
let result = null;
|
|
169
167
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
@@ -176,7 +174,13 @@ module.exports = class EcRemote {
|
|
|
176
174
|
catch(ex) {
|
|
177
175
|
// Text is not json
|
|
178
176
|
}
|
|
179
|
-
}
|
|
177
|
+
}
|
|
178
|
+
if (!response.ok) {
|
|
179
|
+
if (result)
|
|
180
|
+
throw new Error(result);
|
|
181
|
+
else
|
|
182
|
+
throw new Error(response.statusText);
|
|
183
|
+
}
|
|
180
184
|
return result;
|
|
181
185
|
}).catch((err) => {
|
|
182
186
|
if (isNode && typeof dns !== 'undefined') {
|
|
@@ -232,9 +236,7 @@ module.exports = class EcRemote {
|
|
|
232
236
|
let url = EcRemote.urlAppend(server, service);
|
|
233
237
|
url = EcRemote.upgradeHttpToHttps(url);
|
|
234
238
|
let p = fetch(url).then(async (response) => {
|
|
235
|
-
|
|
236
|
-
throw new Error(response.statusText);
|
|
237
|
-
}
|
|
239
|
+
|
|
238
240
|
const contentType = response.headers.get("content-type");
|
|
239
241
|
let result = null;
|
|
240
242
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
@@ -248,6 +250,12 @@ module.exports = class EcRemote {
|
|
|
248
250
|
// Text is not json
|
|
249
251
|
}
|
|
250
252
|
}
|
|
253
|
+
if (!response.ok) {
|
|
254
|
+
if (result)
|
|
255
|
+
throw new Error(result);
|
|
256
|
+
else
|
|
257
|
+
throw new Error(response.statusText);
|
|
258
|
+
}
|
|
251
259
|
if (isNode && typeof dns !== 'undefined') {
|
|
252
260
|
dns.lookup(new URL(url).hostname, ((error, address) => {
|
|
253
261
|
if (error) {
|
|
@@ -113,6 +113,10 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
113
113
|
"https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassConcepts.json",
|
|
114
114
|
"https://schema.cassproject.org/0.4/skos"
|
|
115
115
|
);
|
|
116
|
+
if (e["ceterms:AgentSector"] != null) {
|
|
117
|
+
e["https://purl.org/ctdl/terms/AgentSector"] = e["ceterms:AgentSector"];
|
|
118
|
+
delete e["ceterms:AgentSector"];
|
|
119
|
+
}
|
|
116
120
|
e.type = "ConceptScheme";
|
|
117
121
|
let f = new EcConceptScheme();
|
|
118
122
|
f.copyFrom(e);
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
if (!global.auditLogger) { // Running client-side
|
|
2
2
|
global.auditLogger = {
|
|
3
3
|
report: function(system, severity, message, ...data) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
try {
|
|
5
|
+
if (severity === 'error') {
|
|
6
|
+
console.trace(system + ": " + severity + ": " + message + ": " + data);
|
|
7
|
+
} else {
|
|
8
|
+
console.log(system + ": " + severity + ": " + message + ": " + data);
|
|
9
|
+
}
|
|
10
|
+
} catch (ex) {
|
|
11
|
+
console.trace("Could not log error message.");
|
|
8
12
|
}
|
|
9
13
|
},
|
|
10
14
|
LogCategory: {},
|