cassproject 1.5.70 → 1.5.71

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
@@ -49,6 +49,9 @@ Development unit tests presume you have a CaSS Repository running on `localhost:
49
49
 
50
50
  # Changelog
51
51
 
52
+ ## 1.5.71
53
+ * Fixed issue by trimming spaces in some inputs.
54
+
52
55
  ## 1.5.70
53
56
  * Fixed issue with L2 caching of data with mismatched index/permanent records.
54
57
  * Lots of updates to tests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cassproject",
3
- "version": "1.5.70",
3
+ "version": "1.5.71",
4
4
  "description": "Competency and Skills Service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -75,6 +75,15 @@ module.exports = class CTDLASNCSVConceptImport {
75
75
  encoding: "UTF-8",
76
76
  complete: async function(results) {
77
77
  let tabularData = results["data"];
78
+ try {
79
+ for (let data of tabularData) {
80
+ for (let [key, value] of Object.entries(data)) {
81
+ data[key] = value.trim();
82
+ }
83
+ }
84
+ } catch (e) {
85
+ console.error('Error trimming data', e);
86
+ }
78
87
  const terms = JSON.parse(JSON.stringify((await EcRemote.getExpectingObject("https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassConceptsTerms"))));
79
88
  let schemeArray = [];
80
89
  let concepts = [];
@@ -324,6 +333,15 @@ module.exports = class CTDLASNCSVConceptImport {
324
333
  encoding: "UTF-8",
325
334
  complete: async function(results) {
326
335
  let tabularData = results["data"];
336
+ try {
337
+ for (let data of tabularData) {
338
+ for (let [key, value] of Object.entries(data)) {
339
+ data[key] = value.trim();
340
+ }
341
+ }
342
+ } catch (e) {
343
+ console.error('Error trimming data', e);
344
+ }
327
345
  const terms = JSON.parse(JSON.stringify((await EcRemote.getExpectingObject("https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassConceptsTerms"))));
328
346
  let schemeArray = [];
329
347
  let concepts = [];
@@ -125,6 +125,16 @@ module.exports = class CTDLASNCSVImport {
125
125
  encoding: "UTF-8",
126
126
  complete: async function(results) {
127
127
  let tabularData = results["data"];
128
+ try {
129
+ for (let data of tabularData) {
130
+ for (let [key, value] of Object.entries(data)) {
131
+ data[key] = value.trim();
132
+ }
133
+ }
134
+ } catch (e) {
135
+ console.error('Error trimming data', e);
136
+ }
137
+
128
138
  const terms = JSON.parse(JSON.stringify((await EcRemote.getExpectingObject("https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassTerms"))));
129
139
  let frameworks = {};
130
140
  let frameworkArray = [];
@@ -606,6 +616,16 @@ module.exports = class CTDLASNCSVImport {
606
616
  encoding: "UTF-8",
607
617
  complete: async function(results) {
608
618
  let tabularData = results["data"];
619
+ try {
620
+ for (let data of tabularData) {
621
+ for (let [key, value] of Object.entries(data)) {
622
+ data[key] = value.trim();
623
+ }
624
+ }
625
+ } catch (e) {
626
+ console.error('Error trimming data', e);
627
+ }
628
+
609
629
  const terms = JSON.parse(JSON.stringify((await EcRemote.getExpectingObject("https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassTerms"))));
610
630
  let frameworks = {};
611
631
  let frameworkArray = [];