cassproject 5.0.10 → 5.0.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cassproject",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11",
|
|
4
4
|
"description": "Competency and Skills Service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"multitest": "concurrently --kill-others-on-fail \"npm run test15\" \"npm run test14\" \"npm run test13\" \"npm run test12\"",
|
|
11
11
|
"testCassTest": "npm run testkill && docker run -d --platform linux/amd64 --network cass-net --name cass-test -p80:80 -e CASS_LOOPBACK cass-test && wait-on http://localhost/api/ping && npm run testNode18 && npm run testNode18Fips && npm run testCypressEdge && npm run testCypress && npm run testkill",
|
|
12
12
|
"testDevHttps": "npm run testkill && docker run -d --platform linux/amd64 --network cass-net --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 testCypressEdgeHttps && npm run testCypressHttps",
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 && 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
|
+
"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 && 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
|
+
"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 && 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 && 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",
|
|
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 && 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 && 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",
|
|
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 && 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",
|
|
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 && 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 && 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",
|
|
22
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",
|
|
23
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",
|
|
24
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",
|
|
@@ -180,16 +180,16 @@
|
|
|
180
180
|
"convert-hrtime": "^5.0.0",
|
|
181
181
|
"cypress": "^15.10.0",
|
|
182
182
|
"cypress-fail-fast": "^7.1.1",
|
|
183
|
-
"eslint": "^9.39.
|
|
183
|
+
"eslint": "^9.39.3",
|
|
184
184
|
"fake-indexeddb": "^6.2.5",
|
|
185
185
|
"mocha": "^11.7.5",
|
|
186
186
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
187
|
-
"nodemon": "^3.1.
|
|
187
|
+
"nodemon": "^3.1.14",
|
|
188
188
|
"nyc": "^17.1.0",
|
|
189
189
|
"sinon": "^21.0.1",
|
|
190
190
|
"url-polyfill": "^1.1.14",
|
|
191
|
-
"wait-on": "^9.0.
|
|
192
|
-
"webpack": "^5.105.
|
|
191
|
+
"wait-on": "^9.0.4",
|
|
192
|
+
"webpack": "^5.105.2",
|
|
193
193
|
"webpack-cli": "^6.0.1"
|
|
194
194
|
},
|
|
195
195
|
"packageManager": "npm@11.3.0+sha512.96eb611483f49c55f7fa74df61b588de9e213f80a256728e6798ddc67176c7b07e4a1cfc7de8922422cbce02543714367037536955221fa451b0c4fefaf20c66"
|
|
@@ -110,7 +110,8 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
110
110
|
endpoint,
|
|
111
111
|
eim,
|
|
112
112
|
progressionsFlag,
|
|
113
|
-
validationRules
|
|
113
|
+
validationRules,
|
|
114
|
+
duplicateChecks
|
|
114
115
|
) {
|
|
115
116
|
if (eim === undefined || eim == null)
|
|
116
117
|
eim = EcIdentityManager.default;
|
|
@@ -155,6 +156,7 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
155
156
|
const terms = JSON.parse(JSON.stringify((await EcRemote.getExpectingObject("https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassConceptsTerms"))));
|
|
156
157
|
let schemeArray = [];
|
|
157
158
|
let concepts = [];
|
|
159
|
+
let conceptCtids = {};
|
|
158
160
|
let rowsWithErrors = new Set(); // Track rows that have errors
|
|
159
161
|
for (let each = 0; each < tabularData.length; each++) {
|
|
160
162
|
let pretranslatedE = tabularData[each];
|
|
@@ -461,6 +463,7 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
461
463
|
"schema:dateModified"
|
|
462
464
|
] = new Date().toISOString();
|
|
463
465
|
concepts.push(f);
|
|
466
|
+
conceptCtids[f.shortId()] = pretranslatedE["ceterms:ctid"] || pretranslatedE["@id"];
|
|
464
467
|
} else if (
|
|
465
468
|
pretranslatedE["@type"] == null ||
|
|
466
469
|
pretranslatedE["@type"] == ""
|
|
@@ -476,6 +479,13 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
476
479
|
continue;
|
|
477
480
|
}
|
|
478
481
|
}
|
|
482
|
+
// Run duplicate CTID checks if any were provided by the caller
|
|
483
|
+
const checks = duplicateChecks || [];
|
|
484
|
+
const conceptIds = concepts.map(c => c.shortId());
|
|
485
|
+
for (const check of checks) {
|
|
486
|
+
const checkErrors = await check(repo, conceptIds, schemeArray, conceptCtids);
|
|
487
|
+
errors.push(...checkErrors);
|
|
488
|
+
}
|
|
479
489
|
// If there are any errors, report them all at once
|
|
480
490
|
if (errors.length > 0) {
|
|
481
491
|
failure(errors);
|
|
@@ -494,7 +504,8 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
494
504
|
ceo,
|
|
495
505
|
endpoint,
|
|
496
506
|
eim,
|
|
497
|
-
validationRules
|
|
507
|
+
validationRules,
|
|
508
|
+
duplicateChecks
|
|
498
509
|
) {
|
|
499
510
|
Papa.parse(file, {
|
|
500
511
|
header: true,
|
|
@@ -525,6 +536,7 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
525
536
|
const terms = JSON.parse(JSON.stringify((await EcRemote.getExpectingObject("https://schema.cassproject.org/0.4/jsonld1.1/ceasn2cassConceptsTerms"))));
|
|
526
537
|
let schemeArray = [];
|
|
527
538
|
let concepts = [];
|
|
539
|
+
let conceptCtids = {};
|
|
528
540
|
let rowsWithErrors = new Set(); // Track rows that have errors
|
|
529
541
|
for (let each = 0; each < tabularData.length; each++) {
|
|
530
542
|
let pretranslatedE = tabularData[each];
|
|
@@ -788,6 +800,7 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
788
800
|
] = new Date().toISOString();
|
|
789
801
|
f.subType = "Progression";
|
|
790
802
|
concepts.push(f);
|
|
803
|
+
conceptCtids[f.shortId()] = pretranslatedE["ceterms:ctid"] || pretranslatedE["@id"];
|
|
791
804
|
} else if (
|
|
792
805
|
pretranslatedE["@type"] == null ||
|
|
793
806
|
pretranslatedE["@type"] == ""
|
|
@@ -803,6 +816,13 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
803
816
|
continue;
|
|
804
817
|
}
|
|
805
818
|
}
|
|
819
|
+
// Run duplicate CTID checks if any were provided by the caller
|
|
820
|
+
const checks = duplicateChecks || [];
|
|
821
|
+
const conceptIds = concepts.map(c => c.shortId());
|
|
822
|
+
for (const check of checks) {
|
|
823
|
+
const checkErrors = await check(repo, conceptIds, schemeArray, conceptCtids);
|
|
824
|
+
errors.push(...checkErrors);
|
|
825
|
+
}
|
|
806
826
|
// If there are any errors, report them all at once
|
|
807
827
|
if (errors.length > 0) {
|
|
808
828
|
failure(errors);
|
|
@@ -134,7 +134,8 @@ module.exports = class CTDLASNCSVImport {
|
|
|
134
134
|
eim,
|
|
135
135
|
collectionsFlag,
|
|
136
136
|
skip,
|
|
137
|
-
validationRules
|
|
137
|
+
validationRules,
|
|
138
|
+
duplicateChecks
|
|
138
139
|
) {
|
|
139
140
|
if (eim === undefined || eim == null)
|
|
140
141
|
eim = EcIdentityManager.default;
|
|
@@ -185,6 +186,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
185
186
|
let competencyRows = {};
|
|
186
187
|
let relations = [];
|
|
187
188
|
let relationById = {};
|
|
189
|
+
let competencyCtids = {};
|
|
188
190
|
let rowsWithErrors = new Set(); // Track rows that have errors to avoid duplicate processing
|
|
189
191
|
for (let i = 0; i < tabularData.length; i++) {
|
|
190
192
|
if (!tabularData[i]) {
|
|
@@ -701,6 +703,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
701
703
|
f["ceasn:hasChild"] = null;
|
|
702
704
|
setVersionIdentifier(f);
|
|
703
705
|
competencies.push(f);
|
|
706
|
+
competencyCtids[f.shortId()] = pretranslatedE["ceterms:ctid"] || pretranslatedE["@id"];
|
|
704
707
|
competencyRows[f.shortId()] = e;
|
|
705
708
|
} else if (
|
|
706
709
|
pretranslatedE["@type"] == null ||
|
|
@@ -717,6 +720,13 @@ module.exports = class CTDLASNCSVImport {
|
|
|
717
720
|
continue;
|
|
718
721
|
}
|
|
719
722
|
}
|
|
723
|
+
// Run duplicate CTID checks if any were provided by the caller
|
|
724
|
+
const checks = duplicateChecks || [];
|
|
725
|
+
const competencyIds = competencies.map(comp => comp.shortId());
|
|
726
|
+
for (const check of checks) {
|
|
727
|
+
const checkErrors = await check(repo, competencyIds, frameworkArray, competencyCtids);
|
|
728
|
+
errors.push(...checkErrors);
|
|
729
|
+
}
|
|
720
730
|
// If there are any errors, report them all at once
|
|
721
731
|
if (errors.length > 0) {
|
|
722
732
|
failure(errors);
|
|
@@ -736,7 +746,8 @@ module.exports = class CTDLASNCSVImport {
|
|
|
736
746
|
endpoint,
|
|
737
747
|
eim,
|
|
738
748
|
skip,
|
|
739
|
-
validationRules
|
|
749
|
+
validationRules,
|
|
750
|
+
duplicateChecks
|
|
740
751
|
) {
|
|
741
752
|
Papa.parse(file, {
|
|
742
753
|
header: true,
|
|
@@ -773,6 +784,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
773
784
|
let competencyRows = {};
|
|
774
785
|
let relations = [];
|
|
775
786
|
let relationById = {};
|
|
787
|
+
let competencyCtids = {};
|
|
776
788
|
let rowsWithErrors = new Set(); // Track rows that have errors
|
|
777
789
|
for (let i = 0; i < tabularData.length; i++) {
|
|
778
790
|
let pretranslatedE = tabularData[i];
|
|
@@ -1140,6 +1152,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
1140
1152
|
f["ceterms:isMemberOf"] = null;
|
|
1141
1153
|
setVersionIdentifier(f);
|
|
1142
1154
|
competencies.push(f);
|
|
1155
|
+
competencyCtids[f.shortId()] = pretranslatedE["ceterms:ctid"] || pretranslatedE["@id"];
|
|
1143
1156
|
competencyRows[f.shortId()] = e;
|
|
1144
1157
|
} else if (
|
|
1145
1158
|
pretranslatedE["@type"] == null ||
|
|
@@ -1156,6 +1169,13 @@ module.exports = class CTDLASNCSVImport {
|
|
|
1156
1169
|
continue;
|
|
1157
1170
|
}
|
|
1158
1171
|
}
|
|
1172
|
+
// Run duplicate CTID checks if any were provided by the caller
|
|
1173
|
+
const checks = duplicateChecks || [];
|
|
1174
|
+
const competencyIds = competencies.map(comp => comp.shortId());
|
|
1175
|
+
for (const check of checks) {
|
|
1176
|
+
const checkErrors = await check(repo, competencyIds, frameworkArray, competencyCtids);
|
|
1177
|
+
errors.push(...checkErrors);
|
|
1178
|
+
}
|
|
1159
1179
|
// If there are any errors, report them all at once
|
|
1160
1180
|
if (errors.length > 0) {
|
|
1161
1181
|
failure(errors);
|