perimeterx-js-core 0.6.1 → 0.7.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/README.md +1 -0
- package/lib/action/ActionData.d.ts +1 -1
- package/lib/action/Decision.d.ts +1 -1
- package/lib/action/ProductAction.d.ts +5 -0
- package/lib/action/ProductAction.js +1 -0
- package/lib/action/index.d.ts +2 -0
- package/lib/action/index.js +2 -0
- package/lib/action/utils.d.ts +6 -0
- package/lib/action/utils.js +34 -0
- package/lib/activities/HttpActivityClient.js +3 -3
- package/lib/activities/IActivityClient.d.ts +2 -1
- package/lib/activities/model/Activity.d.ts +1 -1
- package/lib/activities/model/ActivityDetails.d.ts +5 -5
- package/lib/activities/utils.js +1 -1
- package/lib/additional_activity_handler/AdditionalActivityHandler.d.ts +1 -1
- package/lib/additional_activity_handler/AdditionalActivityHandlerUtils.js +1 -1
- package/lib/config/ConfigurationParams.d.ts +1 -1
- package/lib/context/DefaultContext.d.ts +4 -1
- package/lib/context/DefaultContext.js +6 -3
- package/lib/context/interfaces/MobileData.d.ts +1 -1
- package/lib/context/interfaces/ReadonlyContext.d.ts +1 -1
- package/lib/context/interfaces/RequestData.d.ts +6 -1
- package/lib/context/interfaces/RiskApiData.d.ts +1 -1
- package/lib/context/interfaces/ServerData.d.ts +1 -1
- package/lib/context/interfaces/TlsData.d.ts +1 -1
- package/lib/context/interfaces/TokenData.d.ts +1 -1
- package/lib/cors/CustomBlockResponseHeadersHandler.d.ts +1 -1
- package/lib/cors/CustomPreflightHandler.d.ts +1 -1
- package/lib/cors/ICors.d.ts +4 -4
- package/lib/custom_parameters/CustomParameters.d.ts +1 -1
- package/lib/custom_parameters/CustomParametersFunction.d.ts +1 -1
- package/lib/enforcer/options/EnforcerBaseOptions.d.ts +1 -1
- package/lib/enforcer/options/EnforcerOptionsType.d.ts +1 -1
- package/lib/enforcer/options/EnforcerV2Options.d.ts +1 -1
- package/lib/enforcer/options/EnforcerV3Options.d.ts +1 -1
- package/lib/filter/FilterReason.d.ts +2 -1
- package/lib/filter/FilterReason.js +1 -0
- package/lib/first_party/FirstPartyData.d.ts +1 -1
- package/lib/first_party/IFirstParty.d.ts +2 -1
- package/lib/graphql/IGraphQLParser.d.ts +2 -1
- package/lib/graphql/model/GraphQLData.d.ts +1 -1
- package/lib/graphql/model/GraphQLOperation.d.ts +1 -1
- package/lib/http/impl/FormDataImpl.js +2 -2
- package/lib/http/impl/MinimalResponseImpl.d.ts +1 -1
- package/lib/http/impl/OutgoingRequestImpl.d.ts +1 -1
- package/lib/http/interfaces/IHttpClient.d.ts +3 -2
- package/lib/http/interfaces/ReadonlyHeaders.d.ts +1 -1
- package/lib/phase/IPhase.d.ts +2 -1
- package/lib/phase/PhaseResult.d.ts +1 -1
- package/lib/phase/impl/DecideActionPhase.d.ts +0 -9
- package/lib/phase/impl/DecideActionPhase.js +2 -29
- package/lib/products/account_defender/AccountDefender.d.ts +1 -1
- package/lib/products/account_defender/AccountDefenderData.d.ts +1 -1
- package/lib/products/account_defender/JwtData.d.ts +1 -1
- package/lib/products/bot_defender/BotDefender.d.ts +1 -1
- package/lib/products/bot_defender/BotDefenderData.d.ts +1 -1
- package/lib/products/bot_defender/block/model/BlockData.d.ts +1 -1
- package/lib/products/bot_defender/block/model/JsonBlockPayload.d.ts +1 -1
- package/lib/products/bot_defender/block/model/MobileBlockPayload.d.ts +1 -1
- package/lib/products/bot_defender/block/utils.js +5 -4
- package/lib/products/bot_defender/reasons/BotDefenderReasonType.d.ts +1 -1
- package/lib/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.d.ts +1 -1
- package/lib/products/credential_intelligence/endpoint/ICredentialEndpoint.d.ts +3 -3
- package/lib/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.d.ts +1 -1
- package/lib/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +3 -14
- package/lib/products/credential_intelligence/endpoint/extractor/ICredentialExtractor.d.ts +2 -2
- package/lib/products/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.d.ts +3 -3
- package/lib/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.d.ts +1 -1
- package/lib/products/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.d.ts +2 -1
- package/lib/products/credential_intelligence/model/CredentialData.d.ts +1 -1
- package/lib/products/credential_intelligence/model/CredentialIntelligenceData.d.ts +1 -1
- package/lib/products/credential_intelligence/model/Credentials.d.ts +1 -1
- package/lib/products/credential_intelligence/model/CustomExtractionCallback.d.ts +1 -1
- package/lib/products/interfaces/IProduct.d.ts +6 -5
- package/lib/products/interfaces/ProductData.d.ts +1 -1
- package/lib/products/interfaces/ProductDataType.d.ts +1 -1
- package/lib/products/interfaces/ProductType.d.ts +1 -1
- package/lib/products/interfaces/Products.d.ts +1 -1
- package/lib/pxde/IDataEnrichment.d.ts +3 -2
- package/lib/pxde/model/PXDE.d.ts +1 -1
- package/lib/pxde/model/PxdeData.d.ts +1 -1
- package/lib/pxhd/model/PXHD.d.ts +1 -1
- package/lib/risk_api/client/IRiskApiClient.d.ts +2 -1
- package/lib/risk_api/client/PostRiskApiClientBase.js +1 -1
- package/lib/risk_api/model/RiskActivity.d.ts +5 -5
- package/lib/risk_api/risk_response/RiskResponsePayloadType.d.ts +1 -1
- package/lib/risk_api/risk_response/v2/RiskResponseV2Payload.d.ts +1 -1
- package/lib/risk_api/risk_response/v3/RiskResponseV3Payload.d.ts +1 -1
- package/lib/risk_token/parser/DefaultTokenV2Parser.d.ts +1 -1
- package/lib/risk_token/parser/DefaultTokenV3Parser.d.ts +1 -1
- package/lib/risk_token/parser/ITokenParser.d.ts +2 -1
- package/lib/risk_token/parser/TokenParserOptions.d.ts +1 -1
- package/lib/risk_token/token/TokenPayloadType.d.ts +1 -1
- package/lib/risk_token/token/v2/TokenV2Payload.d.ts +1 -1
- package/lib/risk_token/token/v3/TokenV3Payload.d.ts +1 -1
- package/lib/telemetry/ITelemetry.d.ts +3 -2
- package/lib/telemetry/model/TelemetryActivity.d.ts +2 -2
- package/lib/utils/cipher/ICipherUtils.d.ts +1 -1
- package/lib/utils/constants.d.ts +1 -1
- package/lib/utils/constants.js +1 -1
- package/lib/utils/hash/CryptoJSHashUtils.d.ts +5 -0
- package/lib/utils/hash/CryptoJSHashUtils.js +12 -0
- package/lib/utils/hash/index.d.ts +1 -0
- package/lib/utils/hash/index.js +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/url_parser/DefaultUrlParser.d.ts +13 -0
- package/lib/utils/url_parser/DefaultUrlParser.js +21 -0
- package/lib/utils/url_parser/IURLParser.d.ts +4 -0
- package/lib/utils/url_parser/IURLParser.js +1 -0
- package/lib/utils/url_parser/index.d.ts +2 -0
- package/lib/utils/url_parser/index.js +2 -0
- package/lib/utils/utils.d.ts +5 -0
- package/lib/utils/utils.js +5 -1
- package/package.json +5 -5
package/lib/utils/utils.js
CHANGED
|
@@ -39,8 +39,12 @@ export const getExtension = (route) => {
|
|
|
39
39
|
}
|
|
40
40
|
return endOfPath.substring(extensionIndex);
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param rawUrl
|
|
45
|
+
* @deprecated use {@link IURLParser} instead.
|
|
46
|
+
*/
|
|
42
47
|
export const getDecodedUrl = (rawUrl) => {
|
|
43
|
-
rawUrl = rawUrl.replace(/%/g, '%25');
|
|
44
48
|
try {
|
|
45
49
|
return new URL(decodeURIComponent(rawUrl));
|
|
46
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "perimeterx-js-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"ip-range-check": "^0.2.0",
|
|
26
26
|
"js-base64": "^3.7.2",
|
|
27
27
|
"phin": "^3.7.0",
|
|
28
|
+
"ts-essentials": "^9.3.2",
|
|
28
29
|
"uuid": "^9.0.0"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"@types/crypto-js": "^4.1.1",
|
|
35
36
|
"@types/mocha": "^10.0.0",
|
|
36
37
|
"@types/sinon": "^10.0.13",
|
|
37
|
-
"@types/uuid": "^
|
|
38
|
+
"@types/uuid": "^9.0.2",
|
|
38
39
|
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
|
39
40
|
"@typescript-eslint/parser": "^5.40.0",
|
|
40
41
|
"chai": "^4.3.6",
|
|
@@ -48,11 +49,10 @@
|
|
|
48
49
|
"mocha": "^10.0.0",
|
|
49
50
|
"nyc": "^15.1.0",
|
|
50
51
|
"prettier": "^2.7.1",
|
|
51
|
-
"sinon": "^
|
|
52
|
-
"ts-essentials": "^9.3.2",
|
|
52
|
+
"sinon": "^15.2.0",
|
|
53
53
|
"ts-loader": "^9.4.1",
|
|
54
54
|
"ts-node": "^10.9.1",
|
|
55
|
-
"typescript": "^
|
|
55
|
+
"typescript": "^5.1.6"
|
|
56
56
|
},
|
|
57
57
|
"lint-staged": {
|
|
58
58
|
"*.ts": "npm run lint:fix"
|