cda-schematron-validator 1.1.7 → 1.1.10

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
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## Release History
4
4
 
5
+ ### 1.1.10
6
+
7
+ - Fix grunt race condition reported by github
8
+
9
+ "file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in GitHub repository gruntjs/grunt prior to 1.5.3. This vulnerability is capable of arbitrary file writes which can lead to local privilege escalation to the GruntJS user if a lower-privileged user has write access to both source and destination directories as the lower-privileged user can create a symlink to the GruntJS user's .bashrc file or replace /etc/shadow file if the GruntJS user is root."
10
+
11
+ ### 1.1.9
12
+
13
+ - Fix grunt vulnerability
14
+
15
+ ### 1.1.8
16
+
17
+ - jsdoc module added
18
+ - parseSchematron.js moved to lib
19
+
5
20
  ### 1.1.7
6
21
 
7
22
  - Introduced a new method called `validateFileObjectAsync` which allows to supply an object with key, value pairs where key represents the identifier of the xml, and the value represents xml file content or path to validate
@@ -1,7 +1,7 @@
1
1
  const Dom = require('@xmldom/xmldom').DOMParser;
2
2
  const crypto = require('crypto');
3
3
  const _get = require('lodash.get');
4
- const parseSchematron = require('../parseSchematron');
4
+ const parseSchematron = require('./parseSchematron');
5
5
  /**
6
6
  * @method getSchematronMap A method to get the schematron map from the provided schematron or utilize the data from cache or options object
7
7
  * @param {string} schematron String data of schematron
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cda-schematron-validator",
3
- "version": "1.1.7",
3
+ "version": "1.1.10",
4
4
  "description": "Fork of Eric Wadkins' javascript implementation of schematron testing for C-CDA XML documents. This includes bug fixes and some house keeping.",
5
5
  "main": "validator.js",
6
6
  "scripts": {
@@ -29,21 +29,22 @@
29
29
  },
30
30
  "homepage": "https://github.com/priyaranjan-tokachichu/cda-schematron-validator#readme",
31
31
  "devDependencies": {
32
- "chai": "~4.3.6",
32
+ "chai": "^4.3.6",
33
33
  "eslint": "^8.12.0",
34
34
  "eslint-config-google": "^0.14.0",
35
- "grunt": "~1.4.1",
36
- "grunt-contrib-jshint": "~3.2.0",
37
- "grunt-mocha-test": "~0.13.3",
38
- "husky": "~7.0.4",
39
- "lint-staged": "~12.3.7",
40
- "mocha": "~9.2.2",
41
- "prettier": "~2.6.2"
35
+ "grunt": "^1.5.3",
36
+ "grunt-contrib-jshint": "^3.2.0",
37
+ "grunt-mocha-test": "^0.13.3",
38
+ "husky": "^7.0.4",
39
+ "jsdoc": "^3.6.10",
40
+ "lint-staged": "^12.3.7",
41
+ "mocha": "^9.2.2",
42
+ "prettier": "^2.6.2"
42
43
  },
43
44
  "dependencies": {
44
- "@xmldom/xmldom": "~0.7.2",
45
- "lodash.get": "~4.4.2",
46
- "xpath": "~0.0.32"
45
+ "@xmldom/xmldom": "^0.7.2",
46
+ "lodash.get": "^4.4.2",
47
+ "xpath": "^0.0.32"
47
48
  },
48
49
  "directories": {
49
50
  "test": "test"
package/validateAsync.js CHANGED
@@ -54,7 +54,7 @@ async function validateAsync(xml, schematron, options = {}) {
54
54
  /**
55
55
  * @method validateFileListAsync Run the validateAsync method on each xml file of the array provided, and combine the results into an array and return it.
56
56
  * It is important to know that the results could be in a different order than the submitted files. We can't reliably identify which error belongs to which file.
57
- * You should use this if all that you care about is the type of error, but not about in which file this error occurred.
57
+ * The property `fileIndex` of each result object will provide the index of the xml data to which the error belongs to.
58
58
  * @param {array} xmlArray array of string content of an xml file or path to an xml file
59
59
  * @param {string} schematron string content of a schematron file or path to a schematron file
60
60
  * @param {object} options object that takes parameters
@@ -83,7 +83,7 @@ async function validateFileListAsync(xmlArray, schematron, options = {}) {
83
83
  /**
84
84
  * @method validateFileObjectAsync Run the validateAsync method on each xml file of the xml data object provided, and combine the results into an array and return it.
85
85
  * It is important to know that the results could be in a different order than the submitted files. We can't reliably identify which error belongs to which file.
86
- * You should use this if all that you care about is the type of error, but not about in which file this error occurred.
86
+ * The property `fileInfo` of each result object will provide the information (probably an identifier or the name of the xml) the xml data to which the error belongs to.
87
87
  * @param {object} xmlDataObject object with key identifying the xml and value to be the xml file data or xml file path
88
88
  * @param {string} schematron string content of a schematron file or path to a schematron file
89
89
  * @param {object} options object that takes parameters
package/validator.js CHANGED
@@ -12,5 +12,5 @@ module.exports = {
12
12
  validateFileObjectAsync: require('./validateAsync').validateFileObjectAsync,
13
13
  clearCache: require('./validateSync').clearCache,
14
14
  clearCacheAsync: require('./validateAsync').clearCache,
15
- parseSchematron: require('./parseSchematron')
15
+ parseSchematron: require('./lib/parseSchematron')
16
16
  };