perimeterx-js-core 0.15.2 → 0.15.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.
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DefaultUrlUtils = void 0;
|
|
4
|
+
var UrlImpl_1 = require("./UrlImpl");
|
|
4
5
|
var DefaultUrlUtils = /** @class */ (function () {
|
|
5
6
|
function DefaultUrlUtils() {
|
|
6
7
|
}
|
|
7
8
|
DefaultUrlUtils.prototype.createUrl = function (rawUrl) {
|
|
8
|
-
|
|
9
|
+
try {
|
|
10
|
+
return new URL(rawUrl);
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
return new UrlImpl_1.UrlImpl(rawUrl);
|
|
14
|
+
}
|
|
9
15
|
};
|
|
10
16
|
DefaultUrlUtils.prototype.createUrlSearchParams = function (params) {
|
|
11
17
|
return new URLSearchParams(params);
|
|
@@ -13,4 +13,4 @@ exports.PUSH_DATA_HMAC_HEADER_NAME = 'x-px-pushdata';
|
|
|
13
13
|
exports.PUSH_DATA_FEATURE_HEADER_NAME = 'x-px-feature';
|
|
14
14
|
exports.EMAIL_ADDRESS_REGEX = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/;
|
|
15
15
|
exports.URL_REGEX = /^(https?\:)\/\/(([^@\s:]+):?([^@\s]*)@)?(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/;
|
|
16
|
-
exports.CORE_MODULE_VERSION = 'JS Core 0.15.
|
|
16
|
+
exports.CORE_MODULE_VERSION = 'JS Core 0.15.3';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { UrlImpl } from './UrlImpl';
|
|
1
2
|
export class DefaultUrlUtils {
|
|
2
3
|
createUrl(rawUrl) {
|
|
3
|
-
|
|
4
|
+
try {
|
|
5
|
+
return new URL(rawUrl);
|
|
6
|
+
}
|
|
7
|
+
catch (e) {
|
|
8
|
+
return new UrlImpl(rawUrl);
|
|
9
|
+
}
|
|
4
10
|
}
|
|
5
11
|
createUrlSearchParams(params) {
|
|
6
12
|
return new URLSearchParams(params);
|
|
@@ -10,4 +10,4 @@ export const PUSH_DATA_HMAC_HEADER_NAME = 'x-px-pushdata';
|
|
|
10
10
|
export const PUSH_DATA_FEATURE_HEADER_NAME = 'x-px-feature';
|
|
11
11
|
export const EMAIL_ADDRESS_REGEX = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/;
|
|
12
12
|
export const URL_REGEX = /^(https?\:)\/\/(([^@\s:]+):?([^@\s]*)@)?(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/;
|
|
13
|
-
export const CORE_MODULE_VERSION = 'JS Core 0.15.
|
|
13
|
+
export const CORE_MODULE_VERSION = 'JS Core 0.15.3';
|
|
@@ -10,4 +10,4 @@ export declare const PUSH_DATA_HMAC_HEADER_NAME = "x-px-pushdata";
|
|
|
10
10
|
export declare const PUSH_DATA_FEATURE_HEADER_NAME = "x-px-feature";
|
|
11
11
|
export declare const EMAIL_ADDRESS_REGEX: RegExp;
|
|
12
12
|
export declare const URL_REGEX: RegExp;
|
|
13
|
-
export declare const CORE_MODULE_VERSION = "JS Core 0.15.
|
|
13
|
+
export declare const CORE_MODULE_VERSION = "JS Core 0.15.3";
|