@mitre/inspec-objects 0.0.31 → 0.0.34
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/.eslintignore +2 -0
- package/.eslintrc +41 -0
- package/.github/workflows/e2e-test.yml +6 -19
- package/.github/workflows/linter.yml +27 -0
- package/.github/workflows/push-to-gpr.yml +36 -0
- package/.github/workflows/push-to-npm.yml +7 -6
- package/README.md +48 -0
- package/images/Delta_Process.jpg +0 -0
- package/images/ts-inspec-objects.jpg +0 -0
- package/lib/index.d.ts +7 -7
- package/lib/objects/control.d.ts +2 -2
- package/lib/objects/control.js +40 -21
- package/lib/objects/profile.d.ts +6 -6
- package/lib/objects/profile.js +1 -1
- package/lib/parsers/json.d.ts +2 -2
- package/lib/parsers/json.js +15 -11
- package/lib/parsers/oval.js +20 -19
- package/lib/parsers/xccdf.d.ts +1 -1
- package/lib/parsers/xccdf.js +8 -5
- package/lib/utilities/diff.d.ts +3 -3
- package/lib/utilities/diff.js +20 -18
- package/lib/utilities/diffMarkdown.d.ts +1 -1
- package/lib/utilities/diffMarkdown.js +14 -18
- package/lib/utilities/global.d.ts +1 -4
- package/lib/utilities/global.js +25 -13
- package/lib/utilities/logging.d.ts +1 -1
- package/lib/utilities/update.d.ts +2 -1
- package/lib/utilities/update.js +164 -87
- package/lib/utilities/xccdf.js +0 -1
- package/package.json +7 -4
- package/tsconfig.json +20 -21
package/lib/utilities/xccdf.js
CHANGED
|
@@ -25,7 +25,6 @@ function removeXMLSpecialCharacters(str) {
|
|
|
25
25
|
return he_1.default.decode(str);
|
|
26
26
|
}
|
|
27
27
|
exports.removeXMLSpecialCharacters = removeXMLSpecialCharacters;
|
|
28
|
-
;
|
|
29
28
|
function severityStringToImpact(string, id) {
|
|
30
29
|
var _a, _b, _c, _d, _e;
|
|
31
30
|
if ((_a = string.match(/none|na|n\/a|not[\s()*_|]?applicable/i)) === null || _a === void 0 ? void 0 : _a.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mitre/inspec-objects",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.34",
|
|
4
4
|
"description": "Typescript objects for normalizing between InSpec profiles and XCCDF benchmarks",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc -p ./tsconfig.build.json",
|
|
11
11
|
"dev": "npx -y ts-node test.ts",
|
|
12
|
-
"test": "jest"
|
|
12
|
+
"test": "jest",
|
|
13
|
+
"lint": "eslint \"**/*.ts\" --fix",
|
|
14
|
+
"lint:ci": "eslint \"**/*.ts\" --max-warnings 0"
|
|
13
15
|
},
|
|
14
16
|
"repository": {
|
|
15
17
|
"type": "git",
|
|
@@ -48,8 +50,9 @@
|
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@types/jest": "^28.1.1",
|
|
50
52
|
"@types/node": "^17.0.18",
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
52
|
-
"eslint": "^
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
|
54
|
+
"@typescript-eslint/parser": "^5.47.0",
|
|
55
|
+
"eslint": "^8.30.0",
|
|
53
56
|
"tslib": "^2.4.0"
|
|
54
57
|
},
|
|
55
58
|
"jest": {
|
package/tsconfig.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"moduleResolution": "node",
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"resolveJsonModule": true,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"importHelpers": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"outDir": "lib",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"strict": true,
|
|
13
|
+
"target": "es2019",
|
|
14
|
+
"types": ["node", "jest"]
|
|
15
|
+
},
|
|
16
|
+
"include": [
|
|
17
|
+
"index.ts",
|
|
18
|
+
"src/**/*",
|
|
19
|
+
"types/*"
|
|
20
|
+
],
|
|
21
|
+
}
|