perimeterx-js-core 0.1.1 → 0.3.0
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/activities/HttpActivityClient.d.ts +10 -2
- package/lib/activities/HttpActivityClient.js +10 -1
- package/lib/activities/HttpBatchedActivityClient.d.ts +21 -0
- package/lib/activities/HttpBatchedActivityClient.js +137 -0
- package/lib/activities/index.d.ts +1 -0
- package/lib/activities/index.js +3 -1
- package/lib/activities/model/ActivityDetails.d.ts +4 -2
- package/lib/activities/utils.js +2 -1
- package/lib/config/ConfigurationParams.d.ts +4 -0
- package/lib/config/DefaultConfigurations.js +6 -2
- package/lib/config/IConfiguration.d.ts +26 -0
- package/lib/config/StaticConfigurationBase.d.ts +6 -0
- package/lib/config/StaticConfigurationBase.js +42 -0
- package/lib/context/ContextBase.d.ts +3 -2
- package/lib/context/ContextBase.js +13 -77
- package/lib/context/IContext.d.ts +4 -3
- package/lib/custom_parameters/CustomParametersUtils.d.ts +3 -0
- package/lib/custom_parameters/CustomParametersUtils.js +59 -0
- package/lib/enforcer/EnforcerBase.d.ts +6 -1
- package/lib/enforcer/EnforcerBase.js +46 -8
- package/lib/first_party/DefaultFirstParty.js +1 -1
- package/lib/graphql/DefaultGraphQLParser.d.ts +19 -0
- package/lib/graphql/DefaultGraphQLParser.js +183 -0
- package/lib/graphql/IGraphQLParser.d.ts +5 -0
- package/lib/graphql/IGraphQLParser.js +2 -0
- package/lib/graphql/index.d.ts +5 -0
- package/lib/graphql/index.js +7 -0
- package/lib/graphql/model/GraphQLData.d.ts +7 -0
- package/lib/graphql/model/GraphQLData.js +2 -0
- package/lib/graphql/model/GraphQLOperation.d.ts +5 -0
- package/lib/graphql/model/GraphQLOperation.js +2 -0
- package/lib/graphql/model/GraphQLOperationType.d.ts +5 -0
- package/lib/graphql/model/GraphQLOperationType.js +9 -0
- package/lib/http/utils/HttpHeaders.d.ts +3 -1
- package/lib/http/utils/HttpHeaders.js +19 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/risk_api/PostRiskApiClient.d.ts +13 -0
- package/lib/risk_api/PostRiskApiClient.js +21 -3
- package/lib/risk_api/model/RiskActivity.d.ts +2 -0
- package/lib/risk_api/model/RiskResponseV2.d.ts +2 -0
- package/lib/risk_api/risk_response_handler/RiskResponseV2Handler.js +1 -0
- package/lib/risk_token/RiskTokenScoreRetriever.js +1 -1
- package/lib/utils/constants.d.ts +1 -1
- package/lib/utils/constants.js +1 -1
- package/lib/utils/utils.js +1 -1
- package/package.json +2 -3
package/lib/utils/constants.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare const BYPASS_MONITOR_HEADER_VALUE = "1";
|
|
|
7
7
|
export declare const X_PX_AUTHORIZATION_HEADER_NAME = "x-px-authorization";
|
|
8
8
|
export declare const X_PX_ORIGINAL_TOKEN_HEADER_NAME = "x-px-original-token";
|
|
9
9
|
export declare const X_PX_BYPASS_REASON_HEADER_NAME = "x-px-bypass-reason";
|
|
10
|
-
export declare const CORE_MODULE_VERSION = "JS Core 0.
|
|
10
|
+
export declare const CORE_MODULE_VERSION = "JS Core 0.3.0";
|
package/lib/utils/constants.js
CHANGED
|
@@ -10,4 +10,4 @@ exports.BYPASS_MONITOR_HEADER_VALUE = '1';
|
|
|
10
10
|
exports.X_PX_AUTHORIZATION_HEADER_NAME = 'x-px-authorization';
|
|
11
11
|
exports.X_PX_ORIGINAL_TOKEN_HEADER_NAME = 'x-px-original-token';
|
|
12
12
|
exports.X_PX_BYPASS_REASON_HEADER_NAME = 'x-px-bypass-reason';
|
|
13
|
-
exports.CORE_MODULE_VERSION = 'JS Core 0.
|
|
13
|
+
exports.CORE_MODULE_VERSION = 'JS Core 0.3.0';
|
package/lib/utils/utils.js
CHANGED
|
@@ -104,7 +104,7 @@ var isRouteMatch = function (route, pattern) {
|
|
|
104
104
|
if (!route || !pattern) {
|
|
105
105
|
return false;
|
|
106
106
|
}
|
|
107
|
-
if (pattern instanceof RegExp &&
|
|
107
|
+
if (pattern instanceof RegExp && pattern.test(route)) {
|
|
108
108
|
return true;
|
|
109
109
|
}
|
|
110
110
|
if (typeof pattern === 'string' && route.startsWith(pattern)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "perimeterx-js-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"test": "mocha",
|
|
16
16
|
"coverage": "nyc npm run test",
|
|
17
17
|
"pre-commit": "./node_modules/.bin/lint-staged",
|
|
18
|
-
"
|
|
18
|
+
"prepare": "husky install"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"cookie": "^0.5.0",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"core-js": "^3.19.1",
|
|
40
40
|
"eslint": "^8.25.0",
|
|
41
41
|
"eslint-config-prettier": "^8.5.0",
|
|
42
|
-
"eslint-plugin-no-loops": "^0.3.0",
|
|
43
42
|
"eslint-plugin-prettier": "^4.2.1",
|
|
44
43
|
"husky": "^8.0.3",
|
|
45
44
|
"lint-staged": "^13.1.0",
|