@heliofi/common 0.2.214 → 0.2.217
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/src/domain/constants/urlValidation.d.ts +2 -1
- package/dist/src/domain/constants/urlValidation.js +17 -2
- package/dist/src/domain/constants/urlValidation.js.map +1 -1
- package/dist/src/domain/model/charge/entities/Charge.entity.d.ts +1 -0
- package/dist/src/domain/model/charge/entities/Charge.entity.js.map +1 -1
- package/dist/src/domain/model/deposit/entities/DepositCustomerEnriched.entity.d.ts +1 -0
- package/dist/src/domain/model/deposit/entities/DepositCustomerEnriched.entity.js.map +1 -1
- package/dist/src/domain/model/sweep-attempt/entities/RecentSweepAttempt.d.ts +1 -0
- package/dist/src/domain/model/sweep-attempt/entities/RecentSweepAttempt.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_URL_LENGTH = exports.
|
|
4
|
-
|
|
3
|
+
exports.MAX_URL_LENGTH = exports.isValidUrl = exports.ALLOWED_CUSTOM_SCHEMES = void 0;
|
|
4
|
+
const HTTP_URL_REGEX = /^https?:\/\/.(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/;
|
|
5
|
+
const CUSTOM_SCHEME_REGEX = /^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\/.+$/;
|
|
6
|
+
exports.ALLOWED_CUSTOM_SCHEMES = [
|
|
7
|
+
'wsopplus://',
|
|
8
|
+
'wsopplus-stage://',
|
|
9
|
+
'wsopplus-test://',
|
|
10
|
+
'exp://',
|
|
11
|
+
];
|
|
12
|
+
const isValidUrl = (url) => {
|
|
13
|
+
if (HTTP_URL_REGEX.test(url))
|
|
14
|
+
return true;
|
|
15
|
+
if (!CUSTOM_SCHEME_REGEX.test(url))
|
|
16
|
+
return false;
|
|
17
|
+
return exports.ALLOWED_CUSTOM_SCHEMES.some((scheme) => url.toLowerCase().startsWith(scheme));
|
|
18
|
+
};
|
|
19
|
+
exports.isValidUrl = isValidUrl;
|
|
5
20
|
exports.MAX_URL_LENGTH = 256;
|
|
6
21
|
//# sourceMappingURL=urlValidation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlValidation.js","sourceRoot":"","sources":["../../../../src/domain/constants/urlValidation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"urlValidation.js","sourceRoot":"","sources":["../../../../src/domain/constants/urlValidation.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAClB,8FAA8F,CAAC;AAEjG,MAAM,mBAAmB,GAAG,mCAAmC,CAAC;AAEnD,QAAA,sBAAsB,GAAG;IACpC,aAAa;IACb,mBAAmB;IACnB,kBAAkB;IAClB,QAAQ;CACT,CAAC;AAEK,MAAM,UAAU,GAAG,CAAC,GAAW,EAAW,EAAE;IACjD,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAEjD,OAAO,8BAAsB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAC5C,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,UAAU,cAOrB;AAEW,QAAA,cAAc,GAAG,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Charge.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/charge/entities/Charge.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAKtC,MAAa,MAAO,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"Charge.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/charge/entities/Charge.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAKtC,MAAa,MAAO,SAAQ,eAAM;CA0BjC;AA1BD,wBA0BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepositCustomerEnriched.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/DepositCustomerEnriched.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAQtC,MAAa,6BAA8B,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"DepositCustomerEnriched.entity.js","sourceRoot":"","sources":["../../../../../../src/domain/model/deposit/entities/DepositCustomerEnriched.entity.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAQtC,MAAa,6BAA8B,SAAQ,eAAM;CAsCxD;AAtCD,sEAsCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecentSweepAttempt.js","sourceRoot":"","sources":["../../../../../../src/domain/model/sweep-attempt/entities/RecentSweepAttempt.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAGtC,MAAa,YAAa,SAAQ,eAAM;
|
|
1
|
+
{"version":3,"file":"RecentSweepAttempt.js","sourceRoot":"","sources":["../../../../../../src/domain/model/sweep-attempt/entities/RecentSweepAttempt.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAGtC,MAAa,YAAa,SAAQ,eAAM;CAsBvC;AAtBD,oCAsBC"}
|