style Dashboard

This commit is contained in:
Lieu Le
2019-09-13 11:27:52 +07:00
parent 558fb07261
commit 07322c9084
17151 changed files with 1686347 additions and 103 deletions

15
node_modules/safe-json-parse/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,15 @@
.DS_Store
.monitor
.*.swp
.nodemonignore
releases
*.log
*.err
fleet.json
public/browserify
bin/*.json
.bin
build
compile
.lock-wscript
node_modules

14
node_modules/safe-json-parse/.testem.json generated vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"launchers": {
"node": {
"command": "node ./test"
}
},
"src_files": [
"./**/*.js"
],
"before_tests": "npm run build-test",
"on_exit": "rm test/static/bundle.js",
"test_page": "test/static/index.html",
"launch_in_dev": ["node", "phantomjs"]
}

6
node_modules/safe-json-parse/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,6 @@
language: node_js
node_js:
- 0.8
- 0.9
- 0.10
script: node ./test/index.js

19
node_modules/safe-json-parse/LICENCE generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2013 Raynos.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

39
node_modules/safe-json-parse/README.md generated vendored Normal file
View File

@@ -0,0 +1,39 @@
# safe-json-parse
[![build status][1]][2] [![dependency status][3]][4]
<!-- [![browser support][5]][6] -->
Parse JSON safely without throwing
## Example
```js
var safeParse = require("safe-json-parse")
safeParse("{}", function (err, json) {
/* we have json */
})
safeparse("WRONG", function (err) {
/* we have err! */
})
```
## Installation
`npm install safe-json-parse`
## Contributors
- Raynos
## MIT Licenced
[1]: https://secure.travis-ci.org/Raynos/safe-json-parse.png
[2]: https://travis-ci.org/Raynos/safe-json-parse
[3]: https://david-dm.org/Raynos/safe-json-parse.png
[4]: https://david-dm.org/Raynos/safe-json-parse
[5]: https://ci.testling.com/Raynos/safe-json-parse.png
[6]: https://ci.testling.com/Raynos/safe-json-parse

0
node_modules/safe-json-parse/examples/simple.js generated vendored Normal file
View File

18
node_modules/safe-json-parse/index.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
module.exports = SafeParse
function SafeParse(obj, reviver, callback) {
if (arguments.length === 2) {
callback = reviver
reviver = null
}
var json
try {
json = JSON.parse(obj, reviver)
} catch (err) {
return callback(err)
}
callback(null, json)
}

79
node_modules/safe-json-parse/package.json generated vendored Normal file
View File

@@ -0,0 +1,79 @@
{
"_from": "safe-json-parse@~1.0.1",
"_id": "safe-json-parse@1.0.1",
"_inBundle": false,
"_integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=",
"_location": "/safe-json-parse",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "safe-json-parse@~1.0.1",
"name": "safe-json-parse",
"escapedName": "safe-json-parse",
"rawSpec": "~1.0.1",
"saveSpec": null,
"fetchSpec": "~1.0.1"
},
"_requiredBy": [
"/body"
],
"_resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz",
"_shasum": "3e76723e38dfdda13c9b1d29a1e07ffee4b30b57",
"_spec": "safe-json-parse@~1.0.1",
"_where": "/Applications/XAMPP/xamppfiles/htdocs/wordpress/latehome/wp-content/plugins/opal-estate-pro/node_modules/body",
"author": {
"name": "Raynos",
"email": "raynos2@gmail.com"
},
"bugs": {
"url": "https://github.com/Raynos/safe-json-parse/issues",
"email": "raynos2@gmail.com"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Raynos"
}
],
"dependencies": {},
"deprecated": false,
"description": "Parse JSON safely without throwing",
"devDependencies": {
"tape": "~1.0.2"
},
"homepage": "https://github.com/Raynos/safe-json-parse",
"keywords": [],
"licenses": [
{
"type": "MIT",
"url": "http://github.com/Raynos/safe-json-parse/raw/master/LICENSE"
}
],
"main": "index",
"name": "safe-json-parse",
"repository": {
"type": "git",
"url": "git://github.com/Raynos/safe-json-parse.git"
},
"scripts": {
"test": "node ./test/index.js"
},
"testling": {
"files": "test/index.js",
"browsers": [
"ie/8..latest",
"firefox/16..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
},
"version": "1.0.1"
}

26
node_modules/safe-json-parse/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
var test = require("tape")
var safeParse = require("../index")
test("safeParse is a function", function (assert) {
assert.equal(typeof safeParse, "function")
assert.end()
})
test("safeParse valid json", function (assert) {
safeParse("{ \"foo\": true }", function (err, json) {
assert.ifError(err)
assert.equal(json.foo, true)
assert.end()
})
})
test("safeParse faulty", function (assert) {
safeParse("WRONG", function (err) {
assert.ok(err)
assert.equal(err.message, "Unexpected token W")
assert.end()
})
})

11
node_modules/safe-json-parse/test/static/index.html generated vendored Normal file
View File

@@ -0,0 +1,11 @@
<!doctype html>
<html>
<head>
<title>TAPE Example</title>
<script src="/testem.js"></script>
<script src="test-adapter.js"></script>
<script src="bundle.js"></script>
</head>
<body>
</body>
</html>

View File

@@ -0,0 +1,49 @@
(function () {
var Testem = window.Testem
var regex = /^((?:not )?ok) (\d+) (.+)$/
Testem.useCustomAdapter(tapAdapter)
function tapAdapter(socket){
var results = {
failed: 0
, passed: 0
, total: 0
, tests: []
}
socket.emit('tests-start')
Testem.handleConsoleMessage = function(msg){
var m = msg.match(regex)
if (m) {
var passed = m[1] === 'ok'
var test = {
passed: passed ? 1 : 0,
failed: passed ? 0 : 1,
total: 1,
id: m[2],
name: m[3],
items: []
}
if (passed) {
results.passed++
} else {
results.failed++
}
results.total++
socket.emit('test-result', test)
results.tests.push(test)
} else if (msg === '# ok' || msg.match(/^# tests \d+/)){
socket.emit('all-test-results', results)
}
// return false if you want to prevent the console message from
// going to the console
// return false
}
}
}())