@garfish/core
Advanced tools
Comparing version 0.0.8-alpha.5 to 0.0.8-alpha.7
@@ -196,11 +196,2 @@ 'use strict'; | ||
} | ||
function validURL(str) { | ||
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol | ||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name | ||
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address | ||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path | ||
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string | ||
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator | ||
return !!pattern.test(str); | ||
} | ||
function assert(condition, msg) { | ||
@@ -844,3 +835,3 @@ if (!condition) { | ||
var _this = this; | ||
this.version = "0.0.8-alpha.5"; | ||
this.version = "0.0.8-alpha.7"; | ||
this.running = false; | ||
@@ -918,3 +909,3 @@ this.options = getDefaultOptions(); | ||
else { | ||
assert(!validURL(info.entry), info.name + " application entry is not url"); | ||
assert(!info.entry, info.name + " application entry is not url: " + info.entry); | ||
adds[info.name] = info; | ||
@@ -921,0 +912,0 @@ this.appInfos[info.name] = info; |
@@ -196,11 +196,2 @@ 'use strict'; | ||
} | ||
function validURL(str) { | ||
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol | ||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name | ||
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address | ||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path | ||
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string | ||
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator | ||
return !!pattern.test(str); | ||
} | ||
function assert(condition, msg) { | ||
@@ -840,3 +831,3 @@ if (!condition) { | ||
var _this = this; | ||
this.version = "0.0.8-alpha.5"; | ||
this.version = "0.0.8-alpha.7"; | ||
this.running = false; | ||
@@ -910,3 +901,3 @@ this.options = getDefaultOptions(); | ||
else { | ||
assert(!validURL(info.entry), info.name + " application entry is not url"); | ||
assert(!info.entry, info.name + " application entry is not url: " + info.entry); | ||
adds[info.name] = info; | ||
@@ -913,0 +904,0 @@ this.appInfos[info.name] = info; |
@@ -997,11 +997,2 @@ import { parse } from 'himalaya'; | ||
} | ||
function validURL(str) { | ||
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol | ||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name | ||
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address | ||
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path | ||
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string | ||
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator | ||
return !!pattern.test(str); | ||
} | ||
function assert(condition, msg) { | ||
@@ -1645,3 +1636,3 @@ if (!condition) { | ||
var _this = this; | ||
this.version = "0.0.8-alpha.5"; | ||
this.version = "0.0.8-alpha.7"; | ||
this.running = false; | ||
@@ -1720,3 +1711,3 @@ this.options = getDefaultOptions(); | ||
else { | ||
assert(!validURL(info.entry), info.name + " application entry is not url"); | ||
assert(!info.entry, info.name + " application entry is not url: " + info.entry); | ||
adds[info.name] = info; | ||
@@ -1723,0 +1714,0 @@ this.appInfos[info.name] = info; |
{ | ||
"name": "@garfish/core", | ||
"version": "0.0.8-alpha.5", | ||
"version": "0.0.8-alpha.7", | ||
"description": "core module.", | ||
@@ -41,3 +41,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "0faaf77f27801e3dd60721b74e91eb317cc3d45b" | ||
"gitHead": "2dd070234cbeb55e3b603543e506036454c5bf2e" | ||
} |
@@ -8,5 +8,19 @@ # `@garfish/core` | ||
``` | ||
import @garfish/core from '@garfish/core'; | ||
yarn add @garfish/core @garfish/cjs-app @garfish/router @garfish/browser-vm @garfish/browser-snapshot | ||
import Garfish from '@garfish/core'; | ||
import GarfishRouter from '@garfish/router'; | ||
import GarfishBrowserVm from '@garfish/browser-vm'; | ||
import GarfishBrowserSnapshot from '@garfish/browser-snapshot'; | ||
let GarfishInstance = new Garfish({ | ||
apps, | ||
plugins: [ | ||
GarfishRouter(), | ||
GarfishBrowserVm(), | ||
GarfishBrowserSnapshot() | ||
] | ||
}); | ||
// TODO: DEMONSTRATE API | ||
``` |
@@ -99,4 +99,4 @@ import { Hooks } from '../hooks'; | ||
assert( | ||
!validURL(info.entry), | ||
`${info.name} application entry is not url`, | ||
!info.entry, | ||
`${info.name} application entry is not url: ${info.entry}`, | ||
); | ||
@@ -103,0 +103,0 @@ adds[info.name] = info; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26
365849
9830