@rh-support/utils 2.5.11 → 2.5.13
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ISearchSolrQuery } from '@cee-eng/hydrajs/@types/api/search';
|
|
2
2
|
import { ISolrRecommendation, ISolrSolution } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
3
|
-
export declare const documentKindToInclude = "documentKind:(\"Solution\" OR \"Article\" OR \"Errata\" OR \"Vulnerability\" OR \"Cve\" OR \"
|
|
3
|
+
export declare const documentKindToInclude = "documentKind:(\"Solution\" OR \"Article\" OR \"Errata\" OR \"Vulnerability\" OR \"Cve\" OR \"Labs\")";
|
|
4
4
|
export declare const issuesDefaultParamsObj: ISearchSolrQuery;
|
|
5
5
|
export type IRecommendationAdditionalFilters = {
|
|
6
6
|
[key in keyof ISolrRecommendation | keyof ISolrSolution]?: string[] | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchApiUtils.d.ts","sourceRoot":"","sources":["../../src/searchApiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAG9F,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"searchApiUtils.d.ts","sourceRoot":"","sources":["../../src/searchApiUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAG9F,eAAO,MAAM,qBAAqB,yGAC4D,CAAC;AAE/F,eAAO,MAAM,sBAAsB,EAAE,gBAapC,CAAC;AAMF,MAAM,MAAM,gCAAgC,GAAG;KAC1C,GAAG,IAAI,MAAM,mBAAmB,GAAG,MAAM,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;CAC/G,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,iBAAiB,KAAA,QAc5E;AAED,wBAAgB,aAAa,CACzB,IAAI,EAAE,MAAM,EACZ,yBAAyB,EAAE,MAAM,EACjC,iBAAiB,CAAC,EAAE,gCAAgC,EACpD,WAAW,CAAC,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import cloneDeep from 'lodash/cloneDeep';
|
|
2
|
-
export const documentKindToInclude = 'documentKind:("Solution" OR "Article" OR "Errata" OR "Vulnerability" OR "Cve" OR "
|
|
2
|
+
export const documentKindToInclude = 'documentKind:("Solution" OR "Article" OR "Errata" OR "Vulnerability" OR "Cve" OR "Labs")';
|
|
3
3
|
export const issuesDefaultParamsObj = {
|
|
4
4
|
q: '*:*',
|
|
5
5
|
fq: [documentKindToInclude, '-internalTags:helper_solution'],
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
declare const emojiPattern: RegExp;
|
|
2
2
|
declare const mailformat: RegExp;
|
|
3
3
|
declare function isEmailValid(object: any): boolean;
|
|
4
|
-
declare function isEmailValidForCaseContactSelector(object: any): boolean;
|
|
5
4
|
declare function isValidRHEmail(object: any): boolean;
|
|
6
5
|
declare function isEmojiPattern(object: any): boolean;
|
|
7
6
|
declare function isValidGuid(object: any): boolean;
|
|
8
7
|
declare function isNumber(str: string): boolean;
|
|
9
8
|
declare function isRegularVersion(version: string): boolean;
|
|
10
9
|
declare function isImageFile(fileType: any): boolean;
|
|
11
|
-
export { isEmailValid,
|
|
10
|
+
export { isEmailValid, isNumber, isRegularVersion, isValidRHEmail, isEmojiPattern, emojiPattern, mailformat, isValidGuid, isImageFile, };
|
|
12
11
|
//# sourceMappingURL=validatorUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validatorUtils.d.ts","sourceRoot":"","sources":["../../src/validatorUtils.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,EAAE,MACgY,CAAC;AACrZ,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"validatorUtils.d.ts","sourceRoot":"","sources":["../../src/validatorUtils.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,EAAE,MACgY,CAAC;AACrZ,QAAA,MAAM,UAAU,QAEf,CAAC;AAIF,iBAAS,YAAY,CAAC,MAAM,KAAA,WAM3B;AAGD,iBAAS,cAAc,CAAC,MAAM,KAAA,WAM7B;AAED,iBAAS,cAAc,CAAC,MAAM,KAAA,WAM7B;AAED,iBAAS,WAAW,CAAC,MAAM,KAAA,WAO1B;AAED,iBAAS,QAAQ,CAAC,GAAG,EAAE,MAAM,WAE5B;AAED,iBAAS,gBAAgB,CAAC,OAAO,EAAE,MAAM,WAiBxC;AAED,iBAAS,WAAW,CAAC,QAAQ,KAAA,WAE5B;AAED,OAAO,EACH,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,GACd,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
const emojiPattern = /[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}\u{1f17e}-\u{1f17f}\u{1f18e}\u{3030}\u{2b50}\u{2b55}\u{2934}-\u{2935}\u{2b05}-\u{2b07}\u{2b1b}-\u{2b1c}\u{3297}\u{3299}\u{303d}\u{00a9}\u{00ae}\u{2122}\u{23f3}\u{24c2}\u{23e9}-\u{23ef}\u{25b6}\u{23f8}-\u{23fa}]/gu;
|
|
2
|
-
const mailformat = new RegExp(
|
|
3
|
-
// eslint-disable-next-line no-control-regex
|
|
4
|
-
'^([a-zA-Z0-9._%+-]+|"[^"\\r\\n]+")@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*(\\.[a-zA-Z]{2,})+|([0-9]{1,3}\\.){3}[0-9]{1,3})$');
|
|
5
|
-
const mailformatforCaseContactSelector = new RegExp('^([a-zA-Z0-9._%+-]+|"[^"\\r\\n]+")@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*(\\.[a-zA-Z]{2,})+|([0-9]{1,3}\\.){3}[0-9]{1,3})$');
|
|
2
|
+
const mailformat = new RegExp('^([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*(\\.[a-zA-Z]{2,})+|([0-9]{1,3}\\.){3}[0-9]{1,3})$');
|
|
6
3
|
const imageRegex = /^image\/(gif|png|jpeg)$/;
|
|
7
4
|
// To check if email is valid
|
|
8
5
|
function isEmailValid(object) {
|
|
@@ -13,14 +10,6 @@ function isEmailValid(object) {
|
|
|
13
10
|
return false;
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
|
-
function isEmailValidForCaseContactSelector(object) {
|
|
17
|
-
if (object.match(mailformatforCaseContactSelector)) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
13
|
// To check if email is RH email
|
|
25
14
|
function isValidRHEmail(object) {
|
|
26
15
|
if (object.match(mailformat) && object.search('redhat.com') > 0) {
|
|
@@ -71,4 +60,4 @@ function isRegularVersion(version) {
|
|
|
71
60
|
function isImageFile(fileType) {
|
|
72
61
|
return imageRegex.test(fileType);
|
|
73
62
|
}
|
|
74
|
-
export { isEmailValid,
|
|
63
|
+
export { isEmailValid, isNumber, isRegularVersion, isValidRHEmail, isEmojiPattern, emojiPattern, mailformat, isValidGuid, isImageFile, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/utils",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.13",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"defaults and supports es6-module",
|
|
75
75
|
"maintained node versions"
|
|
76
76
|
],
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "dbb149c331bc0fefa148b6158467e0181e49f0bb"
|
|
78
78
|
}
|