@live-change/framework 0.8.106 → 0.8.108
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/utils/validators.js +10 -0
- package/package.json +4 -4
package/lib/utils/validators.js
CHANGED
|
@@ -175,6 +175,16 @@ const validators = {
|
|
|
175
175
|
} catch(e) {
|
|
176
176
|
return 'wrongUrl'
|
|
177
177
|
}
|
|
178
|
+
},
|
|
179
|
+
httpUrlSoft: (settings) => (value) => {
|
|
180
|
+
if(!value) return false // ignore empty
|
|
181
|
+
try {
|
|
182
|
+
if(!value.match(/^https?:\/\//)) value = 'https://'+value
|
|
183
|
+
const url = new URL(value)
|
|
184
|
+
if(url.protocol !== 'http:' && url.protocol !== 'https:') return 'wrongUrl'
|
|
185
|
+
} catch(e) {
|
|
186
|
+
return 'wrongUrl'
|
|
187
|
+
}
|
|
178
188
|
}
|
|
179
189
|
}
|
|
180
190
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/framework",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.108",
|
|
4
4
|
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@live-change/dao": "^0.8.
|
|
26
|
-
"@live-change/uid": "^0.8.
|
|
25
|
+
"@live-change/dao": "^0.8.108",
|
|
26
|
+
"@live-change/uid": "^0.8.108"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "b272a01967e326d10874fea13353ab8fa5c30fe8"
|
|
29
29
|
}
|