@mitre/inspec-objects 0.0.18 → 0.0.19
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/lib/utilities/update.js +15 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/lib/utilities/CciNistMappingData.d.ts +0 -5100
- package/lib/utilities/CciNistMappingData.js +0 -5103
package/lib/utilities/update.js
CHANGED
|
@@ -37,6 +37,7 @@ function projectValuesOntoExistingObj(dst, src, currentPath = '') {
|
|
|
37
37
|
function getExistingDescribeFromControl(control) {
|
|
38
38
|
if (control.code) {
|
|
39
39
|
let existingDescribeBlock = '';
|
|
40
|
+
let currentQuoteEscape = '';
|
|
40
41
|
let inQuoteBlock = false;
|
|
41
42
|
control.code.split('\n').forEach((line) => {
|
|
42
43
|
const wordSplit = line.trim().split(' ');
|
|
@@ -44,7 +45,20 @@ function getExistingDescribeFromControl(control) {
|
|
|
44
45
|
const charSplit = word.split('');
|
|
45
46
|
charSplit.forEach((char, index) => {
|
|
46
47
|
if (char === '"' && charSplit[index - 1] !== '\\') {
|
|
47
|
-
|
|
48
|
+
if (!currentQuoteEscape) {
|
|
49
|
+
currentQuoteEscape = '"';
|
|
50
|
+
}
|
|
51
|
+
if (currentQuoteEscape === '"') {
|
|
52
|
+
inQuoteBlock = !inQuoteBlock;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else if (char === "'" && charSplit[index - 1] !== '\\') {
|
|
56
|
+
if (!currentQuoteEscape) {
|
|
57
|
+
currentQuoteEscape = "'";
|
|
58
|
+
}
|
|
59
|
+
if (currentQuoteEscape === "'") {
|
|
60
|
+
inQuoteBlock = !inQuoteBlock;
|
|
61
|
+
}
|
|
48
62
|
}
|
|
49
63
|
});
|
|
50
64
|
});
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mitre/inspec-objects",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@mitre/inspec-objects",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.17",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@types/flat": "^5.0.2",
|