@cyvest/cyvest-js 5.0.0 → 5.0.3
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/dist/index.cjs +2 -4
- package/dist/index.js +2 -4
- package/package.json +1 -1
- package/src/getters.ts +3 -5
package/dist/index.cjs
CHANGED
|
@@ -1215,8 +1215,7 @@ function getCheck(inv, key) {
|
|
|
1215
1215
|
return inv.checks[key];
|
|
1216
1216
|
}
|
|
1217
1217
|
function getCheckByName(inv, checkName) {
|
|
1218
|
-
const
|
|
1219
|
-
const key = `chk:${normalizedName}`;
|
|
1218
|
+
const key = generateCheckKey(checkName);
|
|
1220
1219
|
return inv.checks[key];
|
|
1221
1220
|
}
|
|
1222
1221
|
function getAllChecks(inv) {
|
|
@@ -1256,8 +1255,7 @@ function getTag(inv, key) {
|
|
|
1256
1255
|
return inv.tags[key];
|
|
1257
1256
|
}
|
|
1258
1257
|
function getTagByName(inv, name) {
|
|
1259
|
-
const
|
|
1260
|
-
const key = `tag:${normalizedName}`;
|
|
1258
|
+
const key = generateTagKey(name);
|
|
1261
1259
|
return inv.tags[key];
|
|
1262
1260
|
}
|
|
1263
1261
|
function getAllTags(inv) {
|
package/dist/index.js
CHANGED
|
@@ -1073,8 +1073,7 @@ function getCheck(inv, key) {
|
|
|
1073
1073
|
return inv.checks[key];
|
|
1074
1074
|
}
|
|
1075
1075
|
function getCheckByName(inv, checkName) {
|
|
1076
|
-
const
|
|
1077
|
-
const key = `chk:${normalizedName}`;
|
|
1076
|
+
const key = generateCheckKey(checkName);
|
|
1078
1077
|
return inv.checks[key];
|
|
1079
1078
|
}
|
|
1080
1079
|
function getAllChecks(inv) {
|
|
@@ -1114,8 +1113,7 @@ function getTag(inv, key) {
|
|
|
1114
1113
|
return inv.tags[key];
|
|
1115
1114
|
}
|
|
1116
1115
|
function getTagByName(inv, name) {
|
|
1117
|
-
const
|
|
1118
|
-
const key = `tag:${normalizedName}`;
|
|
1116
|
+
const key = generateTagKey(name);
|
|
1119
1117
|
return inv.tags[key];
|
|
1120
1118
|
}
|
|
1121
1119
|
function getAllTags(inv) {
|
package/package.json
CHANGED
package/src/getters.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
Tag,
|
|
15
15
|
Level,
|
|
16
16
|
} from "./types.generated";
|
|
17
|
-
import { generateObservableKey, isTagChildOf } from "./keys";
|
|
17
|
+
import { generateObservableKey, generateCheckKey, generateTagKey, isTagChildOf } from "./keys";
|
|
18
18
|
import { getLevelFromScore } from "./levels";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -132,8 +132,7 @@ export function getCheckByName(
|
|
|
132
132
|
inv: CyvestInvestigation,
|
|
133
133
|
checkName: string
|
|
134
134
|
): Check | undefined {
|
|
135
|
-
const
|
|
136
|
-
const key = `chk:${normalizedName}`;
|
|
135
|
+
const key = generateCheckKey(checkName);
|
|
137
136
|
return inv.checks[key];
|
|
138
137
|
}
|
|
139
138
|
|
|
@@ -286,8 +285,7 @@ export function getTagByName(
|
|
|
286
285
|
inv: CyvestInvestigation,
|
|
287
286
|
name: string
|
|
288
287
|
): Tag | undefined {
|
|
289
|
-
const
|
|
290
|
-
const key = `tag:${normalizedName}`;
|
|
288
|
+
const key = generateTagKey(name);
|
|
291
289
|
return inv.tags[key];
|
|
292
290
|
}
|
|
293
291
|
|