cassproject 5.0.9 → 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/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2017 Eduworks Corporation
189
+ Copyright 2017-2026 Eduworks Corporation
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -21,7 +21,6 @@ We're assuming you're coming from the NPM / GitHub space. To see a developer gui
21
21
 
22
22
  The CaSS Library is a library, and as such can only be run self-contained against unit tests.
23
23
 
24
-
25
24
  # Dependencies
26
25
 
27
26
  * `git clone --recurse-submodules -b <branch> https://github.com/cassproject/cass-npm` - Get the code.
@@ -32,8 +31,7 @@ Running `npm test` requires Docker.
32
31
 
33
32
  ## Release testing
34
33
 
35
- * `npm test` - Runs unit tests in docker images against the CaSS 1.5 repositories using supported Node versions (18+) and Cypress against Edge, Chrome, Firefox and Electron. Takes some time.
36
-
34
+ * `npm test` - Runs unit tests in docker images against the CaSS 1.5 repositories using supported Node versions (18+) and Cypress against Edge, Chrome and Electron. Takes some time.
37
35
 
38
36
  ## Development unit testing
39
37
  Development unit tests presume you have a CaSS Repository running on `localhost:80`. You may get one by running `docker run -d --name cass-test -p80:80 cassproject/cass:1.5.0`
@@ -47,418 +45,19 @@ Development unit tests presume you have a CaSS Repository running on `localhost:
47
45
 
48
46
  ## Publish checklist
49
47
 
50
- * `npm upgrade --save` Review dependencies, autocomplete version numbers to latest versions.
51
- * Increment version number in package.json and yuidoc.json.
52
- * Update changelog.
53
- * `npm install`
54
- * `npm audit` and fix any audit issues.
55
- * Update CaSS server version if necessary in package.json
56
- * `npm test` - Must not fail any tests.
57
- * `npm run webpack:cypressFirefoxHttps` See if the firefox test case has changed.
58
- * Document code coverage output by the previous step.
59
- * Commit changes to GitHub.
60
- * Tag release with semantic version from package.json, push tag.
61
- * `npm publish` (must be `npm login`ed)
48
+ * `npm upgrade --save` Review dependencies, autocomplete version numbers to latest versions.
49
+ * Increment version number using `npm version <patch|minor|major>`. This automatically updates `package.json` and `yuidoc.json`.
50
+ * Update changelog using `npm run changelog`, and review the changes in `CHANGELOG.md`.
51
+ * `npm install`
52
+ * `npm audit` and fix any audit issues.
53
+ * Update CaSS server version if necessary in package.json
54
+ * `npm test` - Must not fail any tests.
55
+ * `npm run webpack:cypressFirefoxHttps` See if the firefox test case has changed.
56
+ * Document code coverage output by the previous step.
57
+ * Commit changes to GitHub.
58
+ * Tag release with semantic version from package.json, push tag.
59
+ * `npm publish` (must be `npm login`ed)
62
60
 
63
61
  # Changelog
64
62
 
65
- ## 5.0.9
66
- * Fixed issue with decrypting malformed encrypted data with no secret.
67
- * Security updates
68
- * Rearranged some files & Documentation.
69
-
70
- ## 5.0.8
71
- * Security updates
72
- * CTDL-ASN import fixes
73
-
74
- ## 5.0.7
75
- * Security updates
76
- * Assertions with the same registration will no longer propagate to the same inferred assertions.
77
- * CTDL-ASN fixes
78
-
79
- ## 5.0.6
80
- * Fixed bug using success in precache with L2 caching.
81
-
82
- ## 5.0.5
83
- * Added implies relation.
84
-
85
- ## 5.0.4
86
- * Updates to CEASN CSV Import validation
87
- * Security updates.
88
-
89
- ## 5.0.3
90
- * Updates to CEASN import/export.
91
- * Security updates.
92
-
93
- ## 5.0.2
94
- * Cosmetic and security updates (to dev dependencies)
95
-
96
- ## 5.0.1
97
- * Updated CEASN import to include versionIdentifier.
98
-
99
- ## 5.0.0
100
- * Added multidelete to EcRepository.
101
- * NPM requires semantic versioning coherence, so I must now use big number for version.
102
- * Added and refined tests to include deleting, multideleting.
103
- * Made use of EcRepository.cache more consistent.
104
- * Updated libraries.
105
-
106
- ## 1.5.74
107
- * Lost Node 18 FIPS support due to incompatibility.
108
- * Updated cryptography to operate 4-10x faster.
109
- * Added Node 22 test dockerfiles.
110
-
111
- ## 1.5.73
112
- * CSV export fix
113
- * Updated libraries
114
- * CTDL ASN export fix
115
- * Caching for EcLinkedData recast (taxonomy conversion)
116
-
117
- ## 1.5.72
118
- * Throws error when importing CTDL/ASN with blank competency text.
119
-
120
- ## 1.5.71
121
- * Fixed issue by trimming spaces in some inputs.
122
-
123
- ## 1.5.70
124
- * Fixed issue with L2 caching of data with mismatched index/permanent records.
125
- * Lots of updates to tests.
126
-
127
- ## 1.5.68
128
- * Hardening and CI/CD testing.
129
- * Fixed CEASN infinite loop.
130
-
131
- ## 1.5.66
132
- * Fixed null pointer in L2 caching with arrays.
133
-
134
- ## 1.5.65
135
- * Removed memory leak in EcCrypto when caching is off.
136
- * Implemented multithreaded subtlecrypto decryption in Node.
137
- * Improved L2 cache retrieval to avoid transactions and handles.
138
- * Fixed bug with EcRepository.searchWithParams not calling eachSuccess.
139
-
140
- ## 1.5.63
141
- * Prevent search from running success more than once.
142
-
143
- ## 1.5.62
144
- * Fixed bug where setting a cache value to null was returning falsish.
145
-
146
- ## 1.5.61
147
- * Fixed bug where EcRepository.precache was modifying array of urls passed in.
148
-
149
- ## 1.5.59
150
- * Fixed bug with EcRepository.precache with CachingL2.
151
-
152
- ## 1.5.58
153
- * Added L2 Caching (persists over F5 using IndexedDB)
154
-
155
- ## 1.5.54
156
- * Fix bug in EcRepository.precache where a promise was not being returned.
157
-
158
- ## 1.5.53
159
- * EcRepository precache no longer fails to invoke success/failure on precache with cached values.
160
-
161
- ## 1.5.52
162
- * Fixed bug in EcRepository.deleteRegistered with owned objects -- ReferenceError.
163
-
164
- ## 1.5.51
165
- * Fixed bug in node causing EPIPE and ENOTFOUND under heavy load.
166
-
167
- ## 1.5.49
168
- * Fixed bug in precache.
169
-
170
- ## 1.5.48
171
- * EcRepository.precache now returns all urls it can, regardless of whether they were fetched from the server.
172
-
173
- ## 1.5.47
174
- * Fixed bug with EcRepository.get and registered data.
175
-
176
- ## 1.5.46
177
- * Added addFrameworkSoft to EcFrameworkGraph -- works better with large, poor frameworks.
178
-
179
- ## 1.5.45
180
- * Fixed an issue with caching registered data.
181
- * Updated libraries
182
-
183
- ## 1.5.41
184
- * Updates to CEASN Concept Scheme import
185
- * Updated libraries
186
- * Failing to log an error message now logs an error message.
187
-
188
- ## 1.5.40
189
- * Fixed an issue found in downstream unit tests.
190
-
191
- ## 1.5.39
192
- * Removed axios due to incompatibility with http2 and security findings.
193
- * Now uses fetch for http/s traffic.
194
- * To use fetch with http2 compatibility or on node 16, `npm install undici` (node's native fetch library, but with more features)
195
- * Started investigating node 21 compatibility.
196
-
197
- ## 1.5.38
198
- * Fixed issue with CTDL-ASN import.
199
- * Use of cassproject library with Vite.js now has appropriate mitigations in place. You will need to include the following libraries
200
- * `"buffer": "^6.0.3"`
201
- * `"stream": "npm:stream-browserify@^3.0.0"`
202
-
203
- ## 1.5.37
204
- * Can now search for and de-duplicate competencies on import.
205
-
206
- ## 1.5.35
207
- * If --force-fips is enabled, always tries to use SHA-256 instead of crashing.
208
-
209
- ### FIPS:
210
- FIPS is supported both client-side and server-side in CaSS. Here is the relevant compatibility table.
211
-
212
- Sources: https://www.openssl.org/blog/blog/2023/05/29/FIPS-3-0-8/
213
-
214
- | --> Server --> | < 1.5.35 | >= 1.5.35 with <br> OpenSSL 3.0.8 and<br> --force-fips | >= 1.5.35 with <br>OpenSSL 3.0.8 and<br> --force-fips and<br> env REJECT_SHA1=true |
215
- | - | - | - | - |
216
- | **Client/Library** | |
217
- | < 1.5.35 | SHA-1 (no FIPS) | SHA-1 (Verify only) | Incompatible
218
- | < 1.5.35 and<br> OpenSSL 3.0.8 and<br> env FIPS=true | SHA-1 (partial FIPS) | SHA-1 (Verify only) | Incompatible
219
- | >= 1.5.35 | SHA-1 (no FIPS) | SHA-1 (Verify only*), SHA-256 (FIPS) | SHA-256 (FIPS)
220
- | >= 1.5.35 and<br> env FIPS=true | SHA-1 (partial FIPS) | SHA-1 (Verify only*), SHA-256 (FIPS) | SHA-256 (FIPS)
221
- | >= 1.5.35 and<br> --force-fips | Incompatible | SHA-256 (FIPS) | SHA-256 (FIPS)
222
-
223
- To get FIPS, it is recommended to use the docker container builds.
224
-
225
- Partial FIPS means that we are still violating FIPS by using SHA-1 hashing. All other cryptographic operations are using the FIPS module.
226
-
227
- Verify only uses the exception that permits SHA-1 verification but not generation.
228
-
229
- Verify only* may fall back to SHA-1 verification if SHA-256 negotiation failed, but typically will not use SHA-1.
230
-
231
- ## 1.5.34
232
- * FIPS support (Does not support SHA-1)
233
- * Default signature method is now SHA-256
234
- * Introduced backwards compatible method of using SHA-1 signatures with servers where the feature is not detected (1.5.34 and behind).
235
-
236
- ## 1.5.32
237
- * Library updates.
238
- * Skip empty rows in Relation import.
239
-
240
- ## 1.5.30
241
- * Library updates.
242
- * Using less memory for keys in decryption cache.
243
-
244
- ## 1.5.28
245
- * Library updates.
246
-
247
- ## 1.5.27
248
- * CORS Origins and CORS requests are now sent with credentials to enable cross origin credentialing.
249
- * Extra lines in CSV import are ignored.
250
-
251
- ## 1.5.25
252
- * Repo init now fetches max length of posts. Multiput now uses multiple requests if the POST length is too long.
253
-
254
- ## 1.5.23
255
- * Fixed issue that was preventing use of webcrypto module.
256
-
257
- ## 1.5.22
258
- * Code cleanup
259
- * Better certificate authority support by setting global.ca
260
-
261
- ## 1.5.20
262
- * Added history fetch (fetches a list of results)
263
-
264
- ## 1.5.19
265
- * No longer use the selectedServerProxy URL to communicate in any context.
266
-
267
- ## 1.5.18
268
- * (PR #268) Updated Progression Type from ceasn to asn
269
- * (PR #264) Ignore sample lines in CEASN import
270
-
271
- ## 1.5.15
272
- * Fixed issue combining use of client side certificates with HTTP/2
273
- * Support import of ceasn:ProgressionModel
274
- * Ignore sample data for CEASN import.
275
- * Skip empty lines on CSV taxonomy import.
276
- * Introduced way to debounce EcRepository.get to prevent multiple HTTP requests for the same piece of data in a race condition environment.
277
- * EcPerson.getByPk now fetches people by their PK more reliably.
278
- *
279
-
280
- ## 1.5.13
281
- * Audit logging.
282
- * Classification and Markings remain unencrypted on objects.
283
- * Last login time field in stored identity object.
284
-
285
- ## 1.5.12
286
- * Improved window crypto detection.
287
-
288
- ## 1.5.11
289
- * Login fix for folks with contacts.
290
-
291
- ## 1.5.10
292
- * FIPS support on Node 18 with custom Node 18 compilation and compiled OpenSSL library.
293
-
294
- ## 1.5.9
295
- * Code coverage documentation
296
- * Login record migration
297
-
298
- ## 1.5.8
299
- * Added additional webworker fallback for forge in web worker mode.
300
- * Fixes to http2 mode
301
- * CTDLASN CSV Import fixes.
302
- * Static analysis fixes.
303
-
304
- ## 1.5.7
305
- * Browser crypto module now detected correctly
306
-
307
- ## 1.5.6
308
- * Plugin support now informed by repository
309
-
310
- ## 1.5.5
311
- * Compatibility with Vite
312
- * Directories of private frameworks are no longer encrypted.
313
-
314
- ## 1.5.4
315
- * HTTP2 support.
316
-
317
- ## 1.5.3
318
- * Library Version Increment
319
- * CTDL-ASN bug fix.
320
-
321
- ## 1.5.2
322
- * Library Version Increment
323
- * CTDL-ASN bug fix.
324
-
325
- ## 1.5.1
326
- * CTDL-ASN bug fix.
327
-
328
- ## 1.5.0
329
- * Version increment
330
-
331
- ## 0.5.31
332
- * Optimized performance of EcFrameworkGraph
333
-
334
- ## 0.5.30
335
- * Optimized performance of EcFrameworkGraph
336
- * Library Updates
337
-
338
- ## 0.5.28
339
- * Bug fixes and library updates.
340
-
341
- ## 0.5.26
342
- * Revised method of SSO based decryption.
343
-
344
- ## 0.5.23
345
- * Securing Proxy data structures and repository.
346
- * Negative assertion handling in graphs was corrected.
347
-
348
- ## 0.5.20
349
- * Bug fixes
350
- * No longer depends on yuidoc, as yuidoc is included as part of the documentation script.
351
-
352
- ## 0.5.15 to 0.5.19
353
- * Bug fixes
354
- * Wide variety of Unit tests on multiple versions of CaSS and in browsers
355
- * Updated CTDLASN CSV import
356
- * Added support for proxy servers, separating where data goes from where data belongs. `repo.selectedServerProxy`
357
-
358
- ## 0.5.8 to 0.5.15
359
- * Bug fixes.
360
- * Can now POST unlimited amounts of data.
361
- * Added unit tests in node (mocha), cypress
362
-
363
- ## 0.5.4 to 0.5.8
364
- * Bug fixes.
365
- * Performance improvements. Runs ~10x faster than 4.x.x.
366
- * Added mocha test suite. `npm run mocha` or `npm run automocha` to execute.
367
-
368
- ## 0.5.4 to 0.5.5
369
- * Now testing against supported Node versions (18+)
370
-
371
- * Fixed node async worker based cryptography.
372
-
373
- ## 0.5.3 to 0.5.4
374
- * Bug fixes. Dependency updates.
375
-
376
- ## 0.5.2 to 0.5.3
377
- EcIdentityManager is now instantiatable and may be passed into many library functions. Many method signatures have changed.
378
-
379
- ### BREAKING:
380
- * All static EcIdentityManager methods are now instance methods.
381
-
382
- ### UPDATES:
383
- * All functions with web interactions will optionally allow `repo` to be specified.
384
- * All functions with web or decryption interactions will optionally allow `eim` to be specified.
385
- * If `repo` is not specified, the library will employ several methods for operating on that data (in the case of get, delete). If it is specified, the library will strictly only operate on data in that repository. If that is not the case, that is now a defect.
386
- * If `eim` is not specified, the library will use a default EcIdentityManager found at `EcIdentityManager.default` to perform any necessary operations. In an enforced multitenancy situation, we recommend setting EcIdentityManager.default to null, in order to force errors.
387
- * If you are using `eim`, we strongly recommend disabling caching to prevent any tenancy leaks.
388
-
389
- ### Migration Guide
390
-
391
- #### 1. Replace all: `EcIdentityManager.` -> `EcIdentityManager.default.`
392
- As the new EcIdentityManager is instanceable and the static methods and properties are gone, use the default EcIdentityManager.
393
-
394
- ## 0.5.1 to 0.5.2
395
-
396
- ### CAUTION:
397
- * Caching has been altered. Results that are not found are now stored in the cache and used to speed up (failed) retreival of data.
398
-
399
- ## 4.x.x to 0.5.1
400
-
401
- Please migrate your code in a separate branch, as you may need to wait for bug fixes and the like.
402
-
403
- ### BREAKING:
404
- * All blocking calls are now asynchronous, and the blocking calls have been removed, except for fallback EcCrypto methods.
405
- * All callback based methods now primarily support promise / async / await methods.
406
- * Removed all assertion processing methods except for EcFrameworkGraph.
407
- * Removed rollup rule parsed language.
408
- * Removed /bin/. It was a neat idea.
409
- * Removed dependencies on most JS files in /lib/, except one to facilitate worker based asynchronous cryptography.
410
- * All schema.org objects are now in a schema object. As an example, `Thing` is now `schema.Thing`, `Person` is now `schema.Person`. Schema.org objects have been updated to the most recent version.
411
- * All CTDL objects are now in a `ce` object. As an example, CE’s version of `Competency` is now available under `ce.Competency`. CTDL objects have been updated to the most recent version.
412
- * All objects have been moved from using a st-js shim to do class definitions to the ECMAScript 6 class object.
413
- * Removed dependencies on antlr4, browser-or-node, pure-uuid, request, text-encoding, xmlhttprequest, and added dependencies to axios, web-worker, promise-worker.
414
- ### Migration Guide
415
- #### 1. `let out = Ec<something>.getBlocking(id)` -> `let out = await Ec<something>.get(id)`
416
- `.getBlocking` is gone. This pattern must be migrated throughout. `null` is the default return value if the method fails.
417
- #### 2. `Ec<something>.<function>(<parameters>, success, failure)`
418
- This pattern will continue to function as expected. If failure is omitted, a `new Error(error)` will be thrown instead. The following patterns are available to augment use:
419
- ##### 2.1 `await Ec<something>.<function>(<parameters>,success,failure)`
420
- All such functions will now return a promise and function with await. If you find one that does not, that is a bug.
421
- ##### 2.2 `Ec<something>.<function>(<parameters>,success,failure) .then((output)=>console.log(output)) .catch((error)=>console.error(output))`
422
- * You may use promise chaining in conjunction with callbacks.
423
- * The callbacks will operate first, and the promise chains will operate second.
424
- * The callbacks are wired into the promises, so you may `return something` from the callbacks and they will be passed into the promises `.then((something)=>{})`
425
- * The return value from `success` or `failure` will also be available as the result of an `await`ed promise.
426
- * The return value from `success` or `failure` may also be a promise.
427
- * `success` or `failure` methods may be async... that seems obvious, but you never know.
428
- ##### 2.3 `Ec<something>.<function>(<parameters>) .then( (output)=>console.log(output)) .catch((error)=>console.error(output))`
429
- You may also omit the callbacks. No callbacks are required. If failure is omitted, a `new Error(error)` will be thrown if an error occurs.
430
- ##### 2.4 `await Ec<something>.<function>(<parameters>) .then( (output)=>console.log(output)) .catch((error)=>console.error(output))`
431
- Await on promise based functions also work. This includes search and save and delete!
432
- ##### 2.5 `let out = await Ec<something>.<function>(<parameters>)`
433
- Anything that had a `success(output)` can now retreive that `output` using assignment.
434
- * `.search`, `EcEncryptedValue`, `EcFrameworkGraph` and any other methods will either use the `failure` callback or, if it doesn't exist, will `throw new Error(error)` and need `try/catch` blocks or `.catch((error)=>console.error(error))` to catch the errors.
435
- * `.get` and `Ec<RsaOaep/AesCtr>Async` will `return null` if the operations fail, though you may use a `failure` method if desired, as the callbacks are still supported. These are a special case to mirror the blockable methods.
436
- #### 3. `EcAssertion.get<encryptedField> / EcAssertion.set<encryptedField>`
437
- These methods now use awaitable promises to perform their cryptography.
438
- #### 4. `else`
439
- If any of these patterns do not work, please ask before working around, as there are expected to be edge cases that have not yet been found.
440
- #### 5. Webpack configuration
441
- If you're using the CaSS libraries with Webpack in the browser, you may need to add a rule to the Webpack configuration so that the application can understand the modern syntax used in the libraries. In the CaSS Editor application, this was accomplished by adding the following to the `configureWebpack` section of `vue.config.js`.
442
- ```
443
- module: {
444
- rules: [
445
- {
446
- test: /\.m?js$/,
447
- exclude: {test: /node_modules/, // Exclude libraries in node_modules ...
448
- not: [
449
- // Except for a few of them that needs to be transpiled because they use modern syntax
450
- /cassproject/
451
- ]},
452
- use: {
453
- loader: 'babel-loader'
454
- }
455
- }
456
- ]
457
- }
458
- ```
459
-
460
- ## 3.x to 4.x
461
-
462
- * The cassproject library is no longer created in the eduworks/ec library, and resides entirely within the cass-npm repository.
463
- * All functions work in an equivalent manner.
464
- * You must combine cass-npm with a browserify type method to make it usable on the web.
63
+ See [CHANGELOG.md](CHANGELOG.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cassproject",
3
- "version": "5.0.9",
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.8 && 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.8 && 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.8 && 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.8 && 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.8 && 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.8 && 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.8 && 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.8 && 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.8 && 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",
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",
@@ -82,18 +82,18 @@
82
82
  "autoindex": "nodemon index.js",
83
83
  "autonyc": "nodemon --exec \"npm run nyc\"",
84
84
  "nyc": "nyc --reporter lcov npm run mocha",
85
- "mocha": "mocha --timeout 30000 -b src/**/*.test.js",
86
- "mochaFips": "mocha -n 'force-fips' --timeout 30000 -b src/**/*.test.js",
87
- "mocha:httpsNoHttp2": "export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
88
- "mocha:https": "export CASS_LOOPBACK=https://localhost/api/|| set CASS_LOOPBACK=https://localhost/api/&& mocha --timeout 30000 -b src/**/*.test.js",
89
- "mocha:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
90
- "mochaFips:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha -n 'force-fips' --timeout 30000 -b src/**/*.test.js",
91
- "mocha:clientSideCertificatesDangerMouse": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
92
- "mocha:custom": "export CASS_LOOPBACK=https://tides.eduworks.us/api/|| set CASS_LOOPBACK=https://tides.eduworks.us/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 300000 -b src/**/*.test.js",
93
- "mocha:dev": "export CASS_LOOPBACK=https://dev.cassproject.org/api/|| set CASS_LOOPBACK=https://dev.cassproject.org/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 300000 -b src/**/*.test.js",
94
- "mocha:demo": "export CASS_LOOPBACK=https://demo.cassproject.org/api/|| set CASS_LOOPBACK=https://demo.cassproject.org/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 300000 -b src/**/*.test.js",
95
- "mochaGraph": "mocha --timeout 30000 -b src/com/eduworks/ec/graph/**/*.test.js",
96
- "mochaCrypto": "mocha --timeout 30000 -b src/test/*Rsa*.test.js -b src/test/*Aes*.test.js -b src/test/*Crypto*.test.js",
85
+ "mocha": "mocha --timeout 60000 -b src/**/*.test.js",
86
+ "mochaFips": "mocha -n 'force-fips' --timeout 60000 -b src/**/*.test.js",
87
+ "mocha:httpsNoHttp2": "export HTTP2=false|| set HTTP2=false&& mocha --timeout 60000 -b src/**/*.test.js",
88
+ "mocha:https": "export CASS_LOOPBACK=https://localhost/api/|| set CASS_LOOPBACK=https://localhost/api/&& mocha --timeout 60000 -b src/**/*.test.js",
89
+ "mocha:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 60000 -b src/**/*.test.js",
90
+ "mochaFips:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha -n 'force-fips' --timeout 60000 -b src/**/*.test.js",
91
+ "mocha:clientSideCertificatesDangerMouse": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 60000 -b src/**/*.test.js",
92
+ "mocha:custom": "export CASS_LOOPBACK=https://tides.eduworks.us/api/|| set CASS_LOOPBACK=https://tides.eduworks.us/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 600000 -b src/**/*.test.js",
93
+ "mocha:dev": "export CASS_LOOPBACK=https://dev.cassproject.org/api/|| set CASS_LOOPBACK=https://dev.cassproject.org/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 600000 -b src/**/*.test.js",
94
+ "mocha:demo": "export CASS_LOOPBACK=https://demo.cassproject.org/api/|| set CASS_LOOPBACK=https://demo.cassproject.org/api/&& export HTTP2=false|| set HTTP2=false&& mocha --timeout 600000 -b src/**/*.test.js",
95
+ "mochaGraph": "mocha --timeout 60000 -b src/com/eduworks/ec/graph/**/*.test.js",
96
+ "mochaCrypto": "mocha --timeout 60000 -b src/test/*Rsa*.test.js -b src/test/*Aes*.test.js -b src/test/*Crypto*.test.js",
97
97
  "automocha": "nodemon --exec \"npm run mocha\"",
98
98
  "automochaGraph": "nodemon --exec \"npm run mochaGraph\"",
99
99
  "automochaCrypto": "nodemon --exec \"npm run mochaCrypto\"",
@@ -109,7 +109,9 @@
109
109
  "webpack:cypressHttps": "cypress run -e CASS_LOOPBACK=https://localhost/api/ --config-file cypressWebpack.config.js --headless --browser chrome",
110
110
  "webpack:cypressEdge": "cypress run --config-file cypressWebpack.config.js --headless --browser edge",
111
111
  "webpack:cypressEdgeHttps": "cypress run -e CASS_LOOPBACK=https://localhost/api/ --config-file cypressWebpack.config.js --browser edge",
112
- "webpack:cypressFirefoxHttps": "cypress run -e CASS_LOOPBACK=https://localhost/api/ --config-file cypressWebpack.config.js --browser firefox"
112
+ "webpack:cypressFirefoxHttps": "cypress run -e CASS_LOOPBACK=https://localhost/api/ --config-file cypressWebpack.config.js --browser firefox",
113
+ "version": "node scripts/sync-version.js && git add yuidoc.json",
114
+ "changelog": "node scripts/update-changelog.js && git add CHANGELOG.md"
113
115
  },
114
116
  "contributors": [
115
117
  {
@@ -140,12 +142,12 @@
140
142
  "dependencies": {
141
143
  "base64-arraybuffer": "^1.0.2",
142
144
  "forge": "^2.3.0",
143
- "jsonld": "^8.3.3",
145
+ "jsonld": "^9.0.0",
144
146
  "node-forge": "^1.3.3",
145
147
  "papaparse": "^5.5.3",
146
148
  "pem-jwk": "^2.0.0",
147
149
  "promise-worker": "^2.0.1",
148
- "rdf-canonize": "^4.0.1",
150
+ "rdf-canonize": "^5.0.0",
149
151
  "web-worker": "1.3.0"
150
152
  },
151
153
  "files": [
@@ -171,23 +173,23 @@
171
173
  "homepage": "https://github.com/cassproject/cass-npm#readme",
172
174
  "devDependencies": {
173
175
  "@cypress/browserify-preprocessor": "^3.0.2",
174
- "@cypress/vite-dev-server": "^7.1.0",
176
+ "@cypress/vite-dev-server": "^7.2.0",
175
177
  "@cypress/webpack-preprocessor": "^7.0.2",
176
- "chai": "4.5.0",
178
+ "chai": "^4.5.0",
177
179
  "concurrently": "^9.2.1",
178
180
  "convert-hrtime": "^5.0.0",
179
- "cypress": "^15.8.2",
181
+ "cypress": "^15.10.0",
180
182
  "cypress-fail-fast": "^7.1.1",
181
- "eslint": "^9.39.2",
183
+ "eslint": "^9.39.3",
182
184
  "fake-indexeddb": "^6.2.5",
183
185
  "mocha": "^11.7.5",
184
186
  "node-polyfill-webpack-plugin": "^4.1.0",
185
- "nodemon": "^3.1.11",
187
+ "nodemon": "^3.1.14",
186
188
  "nyc": "^17.1.0",
187
189
  "sinon": "^21.0.1",
188
190
  "url-polyfill": "^1.1.14",
189
- "wait-on": "^9.0.3",
190
- "webpack": "^5.104.1",
191
+ "wait-on": "^9.0.4",
192
+ "webpack": "^5.105.2",
191
193
  "webpack-cli": "^6.0.1"
192
194
  },
193
195
  "packageManager": "npm@11.3.0+sha512.96eb611483f49c55f7fa74df61b588de9e213f80a256728e6798ddc67176c7b07e4a1cfc7de8922422cbce02543714367037536955221fa451b0c4fefaf20c66"
@@ -1,6 +1,7 @@
1
1
  let forge = require("node-forge");
2
2
  let EcCrypto = require("./EcCrypto.js");
3
3
  let EcRsaOaepAsyncWorker = require("./EcRsaOaepAsyncWorker.js");
4
+ let EcAesCtrAsync = require("./EcAesCtrAsync.js");
4
5
  let cassPromisify = require("../promises/helpers.js").cassPromisify;
5
6
  let cassReturnAsPromise = require("../promises/helpers.js").cassReturnAsPromise;
6
7
  /**
@@ -10,6 +10,7 @@ const cassPromisify = require("../promises/helpers.js").cassPromisify;
10
10
  const cassReturnAsPromise = require("../promises/helpers.js").cassReturnAsPromise;
11
11
  require("../../../../org/cassproject/general/AuditLogger.js");
12
12
  const EcRsaOaep = require("./EcRsaOaep.js")
13
+ const EcRsaOaepAsync = require("./EcRsaOaepAsync.js")
13
14
 
14
15
  /**
15
16
  * Asynchronous implementation of {{#crossLink
@@ -263,7 +264,7 @@ module.exports = class EcRsaOaepAsyncWorker {
263
264
  static verifySha256(pk, text, signature, success, failure) {
264
265
  this.initWorker();
265
266
  if (this.w?.[this.rotator] == null) {
266
- return cassPromisify(EcRsaOaepAsync.verify(pk, text, signature), success, failure);
267
+ return cassPromisify(EcRsaOaepAsync.verifySha256(pk, text, signature), success, failure);
267
268
  }
268
269
  let worker = this.rotator++;
269
270
  this.rotator = this.rotator % EcRsaOaepAsyncWorker.rotations;
@@ -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);