chore: 修改插件机智

This commit is contained in:
sean 2017-09-06 10:18:13 +08:00
parent 4beae0f9cb
commit af471d50fd
30 changed files with 28137 additions and 385 deletions

View File

@ -38,7 +38,8 @@ module.exports = {
"always" "always"
], ],
"strict": 0, "strict": 0,
"comma-dangle": ["error", "never"] "comma-dangle": ["error", "never"],
"no-console": ["off"]
} }
}; };

3
.gitignore vendored
View File

@ -34,8 +34,9 @@ Thumbs.db
# *.tar.gz # *.tar.gz
node_modules/ node_modules/
plugins/
runtime/ runtime/
prd/ ./prd/
dev/ dev/
.tags .tags
.tags1 .tags1

View File

@ -1,6 +1,5 @@
import React from 'react' import React from 'react'
import moment from 'moment' import moment from 'moment'
// import regex_parse from './parseCommon.js';
exports.formatTime = (timestamp) => { exports.formatTime = (timestamp) => {

View File

@ -5,7 +5,7 @@ import App from './Application'
import { Provider } from 'react-redux' import { Provider } from 'react-redux'
import createStore from './reducer/create'; import createStore from './reducer/create';
import './styles/theme.less' import './styles/theme.less'
console.log('index.js')
const store = createStore(); const store = createStore();
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
ReactDOM.render( ReactDOM.render(

View File

@ -1,113 +0,0 @@
function regexp_parse(p, c) {//遍历json中的regexp字符串并将其转为RegExp对象。其中p为被转换的jsonc为存储对象。 "kry|regexp/i|":"<(.*)>(.*)<\/(.*)>|<(.*)\/>"
c = c || {};
for (var i in p) {
if (!p.hasOwnProperty(i)) {
continue;
}
if (typeof p[i] === 'object') {
c[i] = (p[i].constructor === Array) ? [] : {};
regexp_parse(p[i], c[i]);
} else {
if (/^\w+\s*\|\s*(regexp){1}\s*(\/\s*[img])?/.test(i)) {
var regexpStr = i.split("|");
var regex = regexpStr[1].split("/");
if (regex[0]) {
try {
if (regex[1]) {
c[i.replace(/\|regexp\s*(\/[img]*)?\s*/, "")] = new RegExp(p[i], regex[1]);
} else {
c[i.replace(/\|regexp\s*(\/[img]*)?\s*/, "")] = new RegExp(p[i]);
}
}
catch (e) {
c[i] = p[i];
}
}
} else {
c[i] = p[i];
}
}
}
return c;
}
function mockToDocModel(mock,doc,key) {
doc = doc || [];
key = key || [];
for (var i in mock) {
if (!mock.hasOwnProperty(i)) {
continue;
}
var index = i;
if(/^\w+(\|\w+)?/.test(i)){
index = i.split("|")[0];
}
if (typeof mock[i] === 'object') {
if (mock[i].constructor === Array) {
//为数组时
if(mock.constructor != Array){
if(key.length){
key.push("."+ index + "[]");
}else{
key.push(index + "[]");
}
}else{
key.push("[]");
}
doc.push(key.join(""));
} else {
// 为object时
if(mock.constructor != Array){
if(key.length){
key.push('.'+index);
}else{
key.push(index);
}
doc.push(key.join());
}
}
mockToDocModel(mock[i],doc,key);
key.pop();
} else {
if(mock.constructor != Array){
if(key.length){
doc.push(key.join("")+"."+index);
}else{
doc.push(index);
}
}
}
}
return doc;
}
mockToDocModel({
"errcode": "@integer",
"data|9-19": [
"123",
{
"name": "@name",
"name1": [{
"name3":"1"
}]
}],
"data4": [1,2],
"data1": "123",
"data3": {
"err": "errCode",
"arr": [1,2]
}
})
module.exports = {
mockToDocModel: mockToDocModel,
regexp_parse: regexp_parse
};

691
npm-shrinkwrap.json generated
View File

@ -5321,14 +5321,6 @@
} }
} }
}, },
"string_decoder": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
"requires": {
"safe-buffer": "5.0.1"
}
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@ -5339,6 +5331,14 @@
"strip-ansi": "3.0.1" "strip-ansi": "3.0.1"
} }
}, },
"string_decoder": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz",
"integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=",
"requires": {
"safe-buffer": "5.0.1"
}
},
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
@ -5513,6 +5513,11 @@
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/get-stdin/-/get-stdin-4.0.1.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/get-stdin/-/get-stdin-4.0.1.tgz",
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4="
}, },
"get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"getpass": { "getpass": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/getpass/-/getpass-0.1.7.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/getpass/-/getpass-0.1.7.tgz",
@ -6059,31 +6064,29 @@
} }
}, },
"happypack": { "happypack": {
"version": "3.1.0", "version": "4.0.0-beta.5",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/happypack/-/happypack-3.1.0.tgz", "resolved": "https://registry.npmjs.org/happypack/-/happypack-4.0.0-beta.5.tgz",
"integrity": "sha1-i8VeNwG6z/cY04icuItQIWQcrVk=", "integrity": "sha1-2+21xdzobr/BrMiAToq8YfdzCR0=",
"requires": { "requires": {
"async": "1.5.0", "async": "1.5.0",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"loader-utils": "0.2.16", "loader-utils": "1.1.0",
"mkdirp": "0.5.1",
"serialize-error": "2.1.0" "serialize-error": "2.1.0"
}, },
"dependencies": { "dependencies": {
"async": { "async": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/async/-/async-1.5.0.tgz", "resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz",
"integrity": "sha1-J5ZkJyNXOFlWVjP8YnRES+4vjOM=" "integrity": "sha1-J5ZkJyNXOFlWVjP8YnRES+4vjOM="
}, },
"loader-utils": { "loader-utils": {
"version": "0.2.16", "version": "1.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/loader-utils/-/loader-utils-0.2.16.tgz", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
"integrity": "sha1-8IYyBm7YKCg13/iN+1JwR2Wt7m0=", "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"requires": { "requires": {
"big.js": "3.1.3", "big.js": "3.1.3",
"emojis-list": "2.1.0", "emojis-list": "2.1.0",
"json5": "0.5.1", "json5": "0.5.1"
"object-assign": "4.1.1"
} }
} }
} }
@ -8520,6 +8523,14 @@
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/media-typer/-/media-typer-0.3.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
}, },
"mem": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
"requires": {
"mimic-fn": "1.1.0"
}
},
"memory-fs": { "memory-fs": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/memory-fs/-/memory-fs-0.4.1.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/memory-fs/-/memory-fs-0.4.1.tgz",
@ -9737,6 +9748,11 @@
"object-assign": "4.1.1" "object-assign": "4.1.1"
} }
}, },
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-limit": { "p-limit": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/p-limit/-/p-limit-1.1.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/p-limit/-/p-limit-1.1.0.tgz",
@ -11854,6 +11870,16 @@
} }
} }
}, },
"cliui": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
"requires": {
"center-align": "0.1.3",
"right-align": "0.1.3",
"wordwrap": "0.0.2"
}
},
"css-loader": { "css-loader": {
"version": "0.28.4", "version": "0.28.4",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/css-loader/-/css-loader-0.28.4.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/css-loader/-/css-loader-0.28.4.tgz",
@ -11987,6 +12013,18 @@
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz",
"integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=" "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE="
}, },
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "2.2.0",
"pify": "2.3.0",
"pinkie-promise": "2.0.1",
"strip-bom": "2.0.0"
}
},
"loader-utils": { "loader-utils": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/loader-utils/-/loader-utils-1.1.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/loader-utils/-/loader-utils-1.1.0.tgz",
@ -11997,6 +12035,16 @@
"json5": "0.5.1" "json5": "0.5.1"
} }
}, },
"path-type": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"requires": {
"graceful-fs": "4.1.11",
"pify": "2.3.0",
"pinkie-promise": "2.0.1"
}
},
"postcss": { "postcss": {
"version": "6.0.10", "version": "6.0.10",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/postcss/-/postcss-6.0.10.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/postcss/-/postcss-6.0.10.tgz",
@ -12027,6 +12075,25 @@
"asap": "2.0.6" "asap": "2.0.6"
} }
}, },
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"requires": {
"load-json-file": "1.1.0",
"normalize-package-data": "2.4.0",
"path-type": "1.1.0"
}
},
"read-pkg-up": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"requires": {
"find-up": "1.1.2",
"read-pkg": "1.1.0"
}
},
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.10.5", "version": "0.10.5",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
@ -12037,6 +12104,14 @@
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/source-list-map/-/source-list-map-0.1.8.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/source-list-map/-/source-list-map-0.1.8.tgz",
"integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=" "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY="
}, },
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"requires": {
"is-utf8": "0.2.1"
}
},
"supports-color": { "supports-color": {
"version": "4.4.0", "version": "4.4.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/supports-color/-/supports-color-4.4.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/supports-color/-/supports-color-4.4.0.tgz",
@ -12045,6 +12120,97 @@
"has-flag": "2.0.0" "has-flag": "2.0.0"
} }
}, },
"uglify-js": {
"version": "2.8.29",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"requires": {
"source-map": "0.5.7",
"uglify-to-browserify": "1.0.2",
"yargs": "3.10.0"
},
"dependencies": {
"yargs": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"requires": {
"camelcase": "1.2.1",
"cliui": "2.1.0",
"decamelize": "1.2.0",
"window-size": "0.1.0"
}
}
}
},
"webpack": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-2.6.1.tgz",
"integrity": "sha1-LgRX8KuxrF3zqxBsacZy8jZ4Xwc=",
"requires": {
"acorn": "5.1.1",
"acorn-dynamic-import": "2.0.2",
"ajv": "4.11.8",
"ajv-keywords": "1.5.1",
"async": "2.5.0",
"enhanced-resolve": "3.4.1",
"interpret": "1.0.3",
"json-loader": "0.5.7",
"json5": "0.5.1",
"loader-runner": "2.3.0",
"loader-utils": "0.2.17",
"memory-fs": "0.4.1",
"mkdirp": "0.5.1",
"node-libs-browser": "2.0.0",
"source-map": "0.5.7",
"supports-color": "3.2.3",
"tapable": "0.2.8",
"uglify-js": "2.8.29",
"watchpack": "1.4.0",
"webpack-sources": "0.2.3",
"yargs": "6.6.0"
},
"dependencies": {
"has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
},
"loader-utils": {
"version": "0.2.17",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz",
"integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=",
"requires": {
"big.js": "3.1.3",
"emojis-list": "2.1.0",
"json5": "0.5.1",
"object-assign": "4.1.1"
}
},
"source-list-map": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-1.1.2.tgz",
"integrity": "sha1-mIkBnRAkzOVc3AaUmDN+9hhqEaE="
},
"supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"requires": {
"has-flag": "1.0.0"
}
},
"webpack-sources": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.2.3.tgz",
"integrity": "sha1-F8Yr+vE8cH+dAsR54Nzd6DgGl/s=",
"requires": {
"source-list-map": "1.1.2",
"source-map": "0.5.7"
}
}
}
},
"webpack-sources": { "webpack-sources": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/webpack-sources/-/webpack-sources-1.0.1.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/webpack-sources/-/webpack-sources-1.0.1.tgz",
@ -12060,6 +12226,63 @@
"integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=" "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU="
} }
} }
},
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
},
"yargs": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
"integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=",
"requires": {
"camelcase": "3.0.0",
"cliui": "3.2.0",
"decamelize": "1.2.0",
"get-caller-file": "1.0.2",
"os-locale": "1.4.0",
"read-pkg-up": "1.0.1",
"require-directory": "2.1.1",
"require-main-filename": "1.0.1",
"set-blocking": "2.0.0",
"string-width": "1.0.2",
"which-module": "1.0.0",
"y18n": "3.2.1",
"yargs-parser": "4.2.1"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
},
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wrap-ansi": "2.1.0"
}
}
}
},
"yargs-parser": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
"integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=",
"requires": {
"camelcase": "3.0.0"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
}
}
} }
} }
}, },
@ -12483,22 +12706,6 @@
} }
} }
}, },
"require_optional": {
"version": "1.0.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/require_optional/-/require_optional-1.0.1.tgz",
"integrity": "sha1-TPNaQkf2TKPfjC7yCMxJSxyo/C4=",
"requires": {
"resolve-from": "2.0.0",
"semver": "5.4.1"
},
"dependencies": {
"resolve-from": {
"version": "2.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/resolve-from/-/resolve-from-2.0.0.tgz",
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
}
}
},
"require-directory": { "require-directory": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/require-directory/-/require-directory-2.1.1.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/require-directory/-/require-directory-2.1.1.tgz",
@ -12523,6 +12730,22 @@
"resolve-from": "1.0.1" "resolve-from": "1.0.1"
} }
}, },
"require_optional": {
"version": "1.0.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/require_optional/-/require_optional-1.0.1.tgz",
"integrity": "sha1-TPNaQkf2TKPfjC7yCMxJSxyo/C4=",
"requires": {
"resolve-from": "2.0.0",
"semver": "5.4.1"
},
"dependencies": {
"resolve-from": {
"version": "2.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/resolve-from/-/resolve-from-2.0.0.tgz",
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
}
}
},
"requires-port": { "requires-port": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/requires-port/-/requires-port-1.0.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/requires-port/-/requires-port-1.0.0.tgz",
@ -13256,14 +13479,6 @@
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-convert": { "string-convert": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/string-convert/-/string-convert-0.2.1.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/string-convert/-/string-convert-0.2.1.tgz",
@ -13350,6 +13565,14 @@
"strip-ansi": "3.0.1" "strip-ansi": "3.0.1"
} }
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.5",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/stringstream/-/stringstream-0.0.5.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/stringstream/-/stringstream-0.0.5.tgz",
@ -13398,8 +13621,7 @@
"strip-eof": { "strip-eof": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/strip-eof/-/strip-eof-1.0.0.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
"dev": true
}, },
"strip-indent": { "strip-indent": {
"version": "1.0.1", "version": "1.0.1",
@ -13909,6 +14131,63 @@
"integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
"optional": true "optional": true
}, },
"uglifyjs-webpack-plugin": {
"version": "0.4.6",
"resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz",
"integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=",
"requires": {
"source-map": "0.5.7",
"uglify-js": "2.8.29",
"webpack-sources": "1.0.1"
},
"dependencies": {
"cliui": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
"requires": {
"center-align": "0.1.3",
"right-align": "0.1.3",
"wordwrap": "0.0.2"
}
},
"uglify-js": {
"version": "2.8.29",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"requires": {
"source-map": "0.5.7",
"uglify-to-browserify": "1.0.2",
"yargs": "3.10.0"
}
},
"webpack-sources": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz",
"integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==",
"requires": {
"source-list-map": "2.0.0",
"source-map": "0.5.7"
}
},
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
},
"yargs": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"requires": {
"camelcase": "1.2.1",
"cliui": "2.1.0",
"decamelize": "1.2.0",
"window-size": "0.1.0"
}
}
}
},
"uid-safe": { "uid-safe": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/uid-safe/-/uid-safe-2.1.5.tgz", "resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/uid-safe/-/uid-safe-2.1.5.tgz",
@ -14372,204 +14651,208 @@
"integrity": "sha1-qFWYCx8LazWbodXZ+zmulB+qY60=" "integrity": "sha1-qFWYCx8LazWbodXZ+zmulB+qY60="
}, },
"webpack": { "webpack": {
"version": "2.6.1", "version": "3.5.5",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/webpack/-/webpack-2.6.1.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.5.5.tgz",
"integrity": "sha1-LgRX8KuxrF3zqxBsacZy8jZ4Xwc=", "integrity": "sha512-qeUx4nIbeLL53qqNTs3kObPBMkUVDrOjEfp/hTvMlx21qL2MsGNr8/tXCoX/lS12dLl9qtZaXv2qfBEctPScDg==",
"requires": { "requires": {
"acorn": "5.1.1", "acorn": "5.1.1",
"acorn-dynamic-import": "2.0.2", "acorn-dynamic-import": "2.0.2",
"ajv": "4.11.8", "ajv": "5.2.2",
"ajv-keywords": "1.5.1", "ajv-keywords": "2.1.0",
"async": "2.5.0", "async": "2.5.0",
"enhanced-resolve": "3.4.1", "enhanced-resolve": "3.4.1",
"escope": "3.6.0",
"interpret": "1.0.3", "interpret": "1.0.3",
"json-loader": "0.5.7", "json-loader": "0.5.7",
"json5": "0.5.1", "json5": "0.5.1",
"loader-runner": "2.3.0", "loader-runner": "2.3.0",
"loader-utils": "0.2.17", "loader-utils": "1.1.0",
"memory-fs": "0.4.1", "memory-fs": "0.4.1",
"mkdirp": "0.5.1", "mkdirp": "0.5.1",
"node-libs-browser": "2.0.0", "node-libs-browser": "2.0.0",
"source-map": "0.5.7", "source-map": "0.5.7",
"supports-color": "3.2.3", "supports-color": "4.4.0",
"tapable": "0.2.8", "tapable": "0.2.8",
"uglify-js": "2.8.29", "uglifyjs-webpack-plugin": "0.4.6",
"watchpack": "1.4.0", "watchpack": "1.4.0",
"webpack-sources": "0.2.3", "webpack-sources": "1.0.1",
"yargs": "6.6.0" "yargs": "8.0.2"
}, },
"dependencies": { "dependencies": {
"cliui": { "ajv": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz",
"integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=",
"requires": {
"co": "4.6.0",
"fast-deep-equal": "1.0.0",
"json-schema-traverse": "0.3.1",
"json-stable-stringify": "1.0.1"
}
},
"ajv-keywords": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/cliui/-/cliui-2.1.0.tgz", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA="
},
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"camelcase": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"requires": { "requires": {
"center-align": "0.1.3", "lru-cache": "4.1.1",
"right-align": "0.1.3", "shebang-command": "1.2.0",
"wordwrap": "0.0.2" "which": "1.3.0"
} }
}, },
"has-flag": { "execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"requires": {
"cross-spawn": "5.1.0",
"get-stream": "3.0.0",
"is-stream": "1.1.0",
"npm-run-path": "2.0.2",
"p-finally": "1.0.0",
"signal-exit": "3.0.2",
"strip-eof": "1.0.0"
}
},
"fast-deep-equal": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/has-flag/-/has-flag-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8="
}, },
"load-json-file": { "is-fullwidth-code-point": {
"version": "1.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "2.2.0",
"pify": "2.3.0",
"pinkie-promise": "2.0.1",
"strip-bom": "2.0.0"
}
},
"path-type": {
"version": "1.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"requires": {
"graceful-fs": "4.1.11",
"pify": "2.3.0",
"pinkie-promise": "2.0.1"
}
},
"read-pkg": {
"version": "1.1.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"requires": {
"load-json-file": "1.1.0",
"normalize-package-data": "2.4.0",
"path-type": "1.1.0"
}
},
"read-pkg-up": {
"version": "1.0.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"requires": {
"find-up": "1.1.2",
"read-pkg": "1.1.0"
}
},
"source-list-map": {
"version": "1.1.2",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/source-list-map/-/source-list-map-1.1.2.tgz",
"integrity": "sha1-mIkBnRAkzOVc3AaUmDN+9hhqEaE="
},
"strip-bom": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/strip-bom/-/strip-bom-2.0.0.tgz", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"loader-utils": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
"integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"requires": { "requires": {
"is-utf8": "0.2.1" "big.js": "3.1.3",
"emojis-list": "2.1.0",
"json5": "0.5.1"
}
},
"lru-cache": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
"integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
"requires": {
"pseudomap": "1.0.2",
"yallist": "2.1.2"
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"requires": {
"path-key": "2.0.1"
}
},
"os-locale": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
"requires": {
"execa": "0.7.0",
"lcid": "1.0.0",
"mem": "1.1.0"
}
},
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"requires": {
"is-fullwidth-code-point": "2.0.0",
"strip-ansi": "4.0.0"
}
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "3.0.0"
} }
}, },
"supports-color": { "supports-color": {
"version": "3.2.3", "version": "4.4.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/supports-color/-/supports-color-3.2.3.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
"requires": { "requires": {
"has-flag": "1.0.0" "has-flag": "2.0.0"
}
},
"uglify-js": {
"version": "2.8.29",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/uglify-js/-/uglify-js-2.8.29.tgz",
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"requires": {
"source-map": "0.5.7",
"uglify-to-browserify": "1.0.2",
"yargs": "3.10.0"
},
"dependencies": {
"yargs": {
"version": "3.10.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"requires": {
"camelcase": "1.2.1",
"cliui": "2.1.0",
"decamelize": "1.2.0",
"window-size": "0.1.0"
}
}
} }
}, },
"webpack-sources": { "webpack-sources": {
"version": "0.2.3", "version": "1.0.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/webpack-sources/-/webpack-sources-0.2.3.tgz", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz",
"integrity": "sha1-F8Yr+vE8cH+dAsR54Nzd6DgGl/s=", "integrity": "sha512-05tMxipUCwHqYaVS8xc7sYPTly8PzXayRCB4dTxLhWTqlKUiwH6ezmEe0OSreL1c30LAuA3Zqmc+uEBUGFJDjw==",
"requires": { "requires": {
"source-list-map": "1.1.2", "source-list-map": "2.0.0",
"source-map": "0.5.7" "source-map": "0.5.7"
} }
}, },
"wordwrap": { "which-module": {
"version": "0.0.2", "version": "2.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/wordwrap/-/wordwrap-0.0.2.tgz", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
}, },
"yargs": { "yargs": {
"version": "6.6.0", "version": "8.0.2",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/yargs/-/yargs-6.6.0.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz",
"integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
"requires": { "requires": {
"camelcase": "3.0.0", "camelcase": "4.1.0",
"cliui": "3.2.0", "cliui": "3.2.0",
"decamelize": "1.2.0", "decamelize": "1.2.0",
"get-caller-file": "1.0.2", "get-caller-file": "1.0.2",
"os-locale": "1.4.0", "os-locale": "2.1.0",
"read-pkg-up": "1.0.1", "read-pkg-up": "2.0.0",
"require-directory": "2.1.1", "require-directory": "2.1.1",
"require-main-filename": "1.0.1", "require-main-filename": "1.0.1",
"set-blocking": "2.0.0", "set-blocking": "2.0.0",
"string-width": "1.0.2", "string-width": "2.1.1",
"which-module": "1.0.0", "which-module": "2.0.0",
"y18n": "3.2.1", "y18n": "3.2.1",
"yargs-parser": "4.2.1" "yargs-parser": "7.0.0"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
},
"cliui": {
"version": "3.2.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wrap-ansi": "2.1.0"
}
}
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "4.2.1", "version": "7.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/yargs-parser/-/yargs-parser-4.2.1.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz",
"integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
"requires": { "requires": {
"camelcase": "3.0.0" "camelcase": "4.1.0"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
}
} }
} }
} }
}, },
"webpack-dev-middleware": { "webpack-dev-middleware": {
"version": "1.12.0", "version": "1.12.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz",
"integrity": "sha1-007++y7dp+HTtdvgcolRMhllFwk=", "integrity": "sha1-007++y7dp+HTtdvgcolRMhllFwk=",
"requires": { "requires": {
"memory-fs": "0.4.1", "memory-fs": "0.4.1",
@ -14581,7 +14864,7 @@
"dependencies": { "dependencies": {
"time-stamp": { "time-stamp": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/time-stamp/-/time-stamp-2.0.0.tgz", "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.0.0.tgz",
"integrity": "sha1-lcakRTDhW6jW9KPsuMOj+sRto1c=" "integrity": "sha1-lcakRTDhW6jW9KPsuMOj+sRto1c="
} }
} }
@ -15110,7 +15393,7 @@
}, },
"ykit-config-antd": { "ykit-config-antd": {
"version": "0.1.3", "version": "0.1.3",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/ykit-config-antd/-/ykit-config-antd-0.1.3.tgz", "resolved": "https://registry.npmjs.org/ykit-config-antd/-/ykit-config-antd-0.1.3.tgz",
"integrity": "sha1-qUWmV0EHgAd0OrPgz3eBbD9KPN4=", "integrity": "sha1-qUWmV0EHgAd0OrPgz3eBbD9KPN4=",
"requires": { "requires": {
"antd": "2.12.8", "antd": "2.12.8",
@ -15133,6 +15416,36 @@
"babel-preset-stage-0": "6.24.1", "babel-preset-stage-0": "6.24.1",
"extend": "3.0.1", "extend": "3.0.1",
"happypack": "3.1.0" "happypack": "3.1.0"
},
"dependencies": {
"async": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz",
"integrity": "sha1-J5ZkJyNXOFlWVjP8YnRES+4vjOM="
},
"happypack": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/happypack/-/happypack-3.1.0.tgz",
"integrity": "sha1-i8VeNwG6z/cY04icuItQIWQcrVk=",
"requires": {
"async": "1.5.0",
"json-stringify-safe": "5.0.1",
"loader-utils": "0.2.16",
"mkdirp": "0.5.1",
"serialize-error": "2.1.0"
}
},
"loader-utils": {
"version": "0.2.16",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.16.tgz",
"integrity": "sha1-8IYyBm7YKCg13/iN+1JwR2Wt7m0=",
"requires": {
"big.js": "3.1.3",
"emojis-list": "2.1.0",
"json5": "0.5.1",
"object-assign": "4.1.1"
}
}
} }
}, },
"ykit-config-react": { "ykit-config-react": {

View File

@ -4,11 +4,11 @@
"description": "YAPI", "description": "YAPI",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev-server": "nodemon server/app.js dev -L", "dev-server": " nodemon server/app.js dev -L",
"install-server": "node server/install.js", "install-server": " node server/install.js",
"dev-client": "ykit watch", "dev-client": "ykit watch",
"dev": "npm run dev-server & npm run dev-client", "dev": "npm run dev-server & npm run dev-client",
"server": "node server/app.js" "server": " node server/app.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -50,6 +50,7 @@
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-babel": "^6.1.2", "gulp-babel": "^6.1.2",
"gulp-watch": "^4.3.11", "gulp-watch": "^4.3.11",
"happypack": "^4.0.0-beta.5",
"json2html": "0.0.8", "json2html": "0.0.8",
"json5": "^0.5.1", "json5": "^0.5.1",
"jsoneditor": "^5.9.3", "jsoneditor": "^5.9.3",
@ -98,6 +99,8 @@
"universal-cookie": "^2.0.8", "universal-cookie": "^2.0.8",
"url": "^0.11.0", "url": "^0.11.0",
"validate-commit-msg": "^2.12.2", "validate-commit-msg": "^2.12.2",
"webpack": "^3.5.5",
"webpack-dev-middleware": "^1.12.0",
"yapi-plugin-qsso": "^1.0.2", "yapi-plugin-qsso": "^1.0.2",
"ykit-config-antd": "^0.1.3" "ykit-config-antd": "^0.1.3"
}, },
@ -109,7 +112,6 @@
"redux-devtools": "^3.4.0", "redux-devtools": "^3.4.0",
"redux-devtools-dock-monitor": "^1.1.2", "redux-devtools-dock-monitor": "^1.1.2",
"redux-devtools-log-monitor": "^1.3.0", "redux-devtools-log-monitor": "^1.3.0",
"webpack": "^2.0.0",
"webpack-node-externals": "^1.6.0" "webpack-node-externals": "^1.6.0"
}, },
"config": { "config": {

View File

@ -0,0 +1 @@
# yapi-plugin-qsso

View File

@ -0,0 +1,16 @@
import React from 'react';
const Qsso = require('./qsso-lib');
class QssoComponent extends React.Component{
componentDidMount(){
Qsso.attach('qsso-login', '/api/user/login_by_token');
}
render(){
return <button id="qsso-login" className="btn-home btn-home-normal" >QSSO 登录</button>;
}
}
module.exports = function(){
this.bindHook('third_login', QssoComponent);
};

View File

@ -0,0 +1,46 @@
{
"_from": "yapi-plugin-qsso@1.0.5",
"_id": "yapi-plugin-qsso@1.0.5",
"_inBundle": false,
"_integrity": "sha512-1Sy2zY4FUeMr4BoGAVLyaQeNizTiOl5enPOeJUlHPDTqawP9loBBdfUdHg89OLPJai/g0OD3kncTH2+sNPu5/g==",
"_location": "/yapi-plugin-qsso",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "yapi-plugin-qsso@1.0.5",
"name": "yapi-plugin-qsso",
"escapedName": "yapi-plugin-qsso",
"rawSpec": "1.0.5",
"saveSpec": null,
"fetchSpec": "1.0.5"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/yapi-plugin-qsso/-/yapi-plugin-qsso-1.0.5.tgz",
"_shasum": "c9da87bdd7a378e601d38fc8fcce965f4337d27e",
"_spec": "yapi-plugin-qsso@1.0.5",
"_where": "/Users/sean/qunar/yapi",
"author": "",
"bugs": {
"url": "https://github.com/YMFE/yapi-plugin-qsso/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "",
"homepage": "https://github.com/YMFE/yapi-plugin-qsso#readme",
"license": "ISC",
"main": "index.js",
"name": "yapi-plugin-qsso",
"repository": {
"type": "git",
"url": "git+https://github.com/YMFE/yapi-plugin-qsso.git"
},
"scripts": {
"start": "node server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.5"
}

View File

@ -0,0 +1,64 @@
// file_id:2D7ABF69-3BC0-4175-98C9-5C3D5CB00158 -- nerver change this !!
/*
* file: qsso-auth.js
* URL: https://qsso.corp.qunar.com/lib/qsso-auth.js
* written by zhibin.ning
* version: 0.1
*
*/
var AUTH_SERVER = 'https://qsso.corp.qunar.com',
LOGIN_PAGE = '/login.php',
SORRY_PAGE = '/sorry.html';
if (location.hostname.match(/qunar\.ctripgroup\.com$/i)) {
AUTH_SERVER = 'https://qunar.ctripgroup.com/sec/qsso/api';
}
var qualifyURL = function (url, encode) {
url = url || '';
var ret = location.protocol + '//' + location.host + (url.substr(0, 1) === '/' ? '' : location.pathname.match(/.*\//)) + url;
if (encode) {
ret = encodeURIComponent(ret);
}
return ret;
};
var URLStringify = function (o) {
var ret = [];
for (var i in o) {
// ret.push( encodeURIComponent(i) + '=' + encodeURIComponent(o[i]) );
ret.push(i + '=' + o[i]);
}
return ret.join('&');
};
var qsso;
module.exports = qsso = {
'auth': function (loginURI, opt_ext) {
if (!location.hostname.match(/\.qunar(man|ops)?\.com$|\.qunarman\.com$|qunar\.it$|\.928383\.com$|^928383\.com$|qunar\.ctripgroup\.c(om|n)$|\.ctrip(corp)?\.com$|^opsdata\.me$|\.mofun\.com$/i)) {
location.href = AUTH_SERVER + SORRY_PAGE + '?host=' + qualifyURL('', true);
return;
}
var ret = qualifyURL(loginURI, true);
var redirectURL = AUTH_SERVER + LOGIN_PAGE + '?ret=' + ret + (opt_ext ? '&ext=' + encodeURIComponent(URLStringify(opt_ext)) : '');
// console.log(redirectURL);
location.href = redirectURL;
},
'attach': function (eid, loginURI, opt_ext) {
var login = function () {
qsso.auth(loginURI, opt_ext);
};
document.getElementById(eid).onclick = login;
if (location.hash.match('qsso-auto-login')) {
login();
}
}
};

View File

@ -0,0 +1,27 @@
const request = require('request');
module.exports = function () {
this.bindHook('third_login', (ctx) => {
let token = ctx.request.body.token || ctx.request.query.token;
console.log(token)
return new Promise((resolve, reject) => {
request('http://qsso.corp.qunar.com/api/verifytoken.php?token=' + token, function (error, response, body) {
if (!error && response.statusCode == 200) {
let result = JSON.parse(body);
if (result && result.ret === true) {
let ret = {
email: result.userId + '@qunar.com',
username: result.data.userInfo.name
};
resolve(ret);
} else {
reject(result);
}
}
reject(error);
});
});
}
)
}

View File

@ -1,5 +1,5 @@
const yapi = require('./yapi.js'); const yapi = require('./yapi.js');
const plugin_path = yapi.path.join(yapi.WEBROOT, 'node_modules') const plugin_path = yapi.path.join(yapi.WEBROOT, 'plugins')
var hooks = { var hooks = {
'third_login': { 'third_login': {
type: 'single', type: 'single',
@ -50,7 +50,7 @@ module.exports = function(){
if(yapi.WEBCONFIG.plugins && Array.isArray(yapi.WEBCONFIG.plugins)){ if(yapi.WEBCONFIG.plugins && Array.isArray(yapi.WEBCONFIG.plugins)){
yapi.WEBCONFIG.plugins.forEach(plugin=>{ yapi.WEBCONFIG.plugins.forEach(plugin=>{
if(!yapi.commons.fileExist(yapi.path.join(plugin_path, 'yapi-plugin-' + plugin + '/server.js'))){ if(!yapi.commons.fileExist(yapi.path.join(plugin_path, 'yapi-plugin-' + plugin + '/server.js'))){
throw new Error(`请安装插件(${plugin}), npm install yapi-plugin-${plugin}`); throw new Error(`config.json配置了插件${plugin},但plugins目录没有找到此插件请安装此插件?`);
process.exit(); process.exit();
} }
let pluginModule = require(yapi.path.join(plugin_path, 'yapi-plugin-' + plugin + '/server.js')); let pluginModule = require(yapi.path.join(plugin_path, 'yapi-plugin-' + plugin + '/server.js'));

View File

@ -5,15 +5,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>YAPI-高效、易用、功能强大的api管理平台</title> <title>YAPI-高效、易用、功能强大的api管理平台</title>
<link rel="icon" type="image/png" sizes="192x192" href="/image/favicon.png"> <link rel="icon" type="image/png" sizes="192x192" href="/image/favicon.png">
<link rel="stylesheet" href="/prd/index.css"> <link rel="stylesheet" href="http://127.0.0.1:4000/prd/index@dev.css">
</head> </head>
<body> <body>
<div id="yapi" style="height: 100%;"></div> <div id="yapi" style="height: 100%;"></div>
<script src="/prd/manifest.js"></script> <script src="http://127.0.0.1:4000/prd/manifest@dev.js"></script>
<script src="/prd/lib2.js"></script> <script src="http://127.0.0.1:4000/prd/lib2@dev.js"></script>
<script src="/prd/lib.js"></script> <script src="http://127.0.0.1:4000/prd/lib@dev.js"></script>
<script src="/prd/index.js"></script> <script src="http://127.0.0.1:4000/prd/index@dev.js"></script>

1
static/prd/assets.js Normal file
View File

@ -0,0 +1 @@
window.WEBPACK_ASSETS = {"index.js":{"js":"index@eab742fd3c28ea24fc95.js","css":"index@eab742fd3c28ea24fc95.css"},"lib":{"js":"lib@3c3db91cbdc265b7c37f.js"},"lib2":{"js":"lib2@122f3773fc11dd227117.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}

18926
static/prd/index.css Normal file

File diff suppressed because it is too large Load Diff

5336
static/prd/index.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

3019
static/prd/lib.js Normal file

File diff suppressed because one or more lines are too long

48
static/prd/lib2.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

94
static/prd/manifest.js Normal file
View File

@ -0,0 +1,94 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ var parentJsonpFunction = window["webpackJsonp"];
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, callbacks = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(installedChunks[chunkId])
/******/ callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, __webpack_require__);
/******/ if(moreModules[0]) {
/******/ installedModules[0] = 0;
/******/ return __webpack_require__(0);
/******/ }
/******/ };
/******/ // The module cache
/******/ var installedModules = {};
/******/ // object to store loaded and loading chunks
/******/ // "0" means "already loaded"
/******/ // Array means "loading", array contains callbacks
/******/ var installedChunks = {
/******/ 3:0
/******/ };
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId, callback) {
/******/ // "0" is the signal for "already loaded"
/******/ if(installedChunks[chunkId] === 0)
/******/ return callback.call(null, __webpack_require__);
/******/ // an array means "currently loading".
/******/ if(installedChunks[chunkId] !== undefined) {
/******/ installedChunks[chunkId].push(callback);
/******/ } else {
/******/ // start chunk loading
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.async = true;
/******/ script.src = __webpack_require__.p + "" + chunkId + ".chunk.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ })
/************************************************************************/
/******/ ([]);

View File

@ -0,0 +1 @@
(function(e){function i(t){if(n[t])return n[t].exports;var r=n[t]={exports:{},id:t,loaded:false};e[t].call(r.exports,r,r.exports,i);r.loaded=true;return r.exports}var t=window["webpackJsonp"];window["webpackJsonp"]=function(o,u){var a,f,l=0,c=[];for(;l<o.length;l++){f=o[l];if(r[f])c.push.apply(c,r[f]);r[f]=0}for(a in u){e[a]=u[a]}if(t)t(o,u);while(c.length)c.shift().call(null,i);if(u[0]){n[0]=0;return i(0)}};var n={};var r={3:0};i.e=function(t,n){if(r[t]===0)return n.call(null,i);if(r[t]!==undefined){r[t].push(n)}else{r[t]=[n];var s=document.getElementsByTagName("head")[0];var o=document.createElement("script");o.type="text/javascript";o.charset="utf-8";o.async=true;o.src=i.p+""+t+".chunk.min.js";s.appendChild(o)}};i.m=e;i.c=n;i.p=""})([])

102
ykit.js
View File

@ -1,13 +1,20 @@
var path = require('path'); var path = require('path');
var fs = require('fs');
var AssetsPlugin = require('assets-webpack-plugin') var AssetsPlugin = require('assets-webpack-plugin')
var CompressionPlugin = require('compression-webpack-plugin') var CompressionPlugin = require('compression-webpack-plugin')
var config = require('../config.json');
var assetsPluginInstance = new AssetsPlugin({ var assetsPluginInstance = new AssetsPlugin({
filename: 'static/prd/assets.js', filename: 'static/prd/assets.js',
processOutput: function (assets) { processOutput: function (assets) {
return 'window.WEBPACK_ASSETS = ' + JSON.stringify(assets); return 'window.WEBPACK_ASSETS = ' + JSON.stringify(assets);
} }
})
var config = require('../config.json');
var compressPlugin = new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.(js|css)$/,
threshold: 10240,
minRatio: 0.8,
}); });
function fileExist (filePath){ function fileExist (filePath){
@ -28,14 +35,6 @@ function initPlugins(){
initPlugins(); initPlugins();
var compressPlugin = new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.(js|css)$/,
threshold: 10240,
minRatio: 0.8
});
function handleCommonsChunk(webpackConfig) { function handleCommonsChunk(webpackConfig) {
var commonsChunk = { var commonsChunk = {
@ -51,7 +50,7 @@ function handleCommonsChunk(webpackConfig) {
'moment' 'moment'
], ],
lib2: [ lib2: [
'brace', 'brace',
'mockjs', 'mockjs',
'json5' 'json5'
@ -101,29 +100,29 @@ function handleCommonsChunk(webpackConfig) {
module.exports = { module.exports = {
// plugins: [{ plugins: [{
// name: 'antd', name: 'antd',
// options: { options: {
// modifyQuery: function (defaultQuery) { // 可查看和编辑 defaultQuery modifyQuery: function (defaultQuery) { // 可查看和编辑 defaultQuery
// defaultQuery.plugins = []; defaultQuery.plugins = [];
// defaultQuery.plugins.push(["transform-runtime", { defaultQuery.plugins.push(["transform-runtime", {
// "polyfill": false, "polyfill": false,
// "regenerator": true "regenerator": true
// }]); }]);
// defaultQuery.plugins.push('transform-decorators-legacy'); defaultQuery.plugins.push('transform-decorators-legacy');
// defaultQuery.plugins.push(["import", { libraryName: "antd"}]) defaultQuery.plugins.push(["import", { libraryName: "antd"}])
// return defaultQuery; return defaultQuery;
// }, },
// exclude: /node_modules(?!\/yapi\-plugin\-)/ exclude: /node_modules/
// } }
// }], }],
// devtool: 'cheap-source-map', // devtool: 'cheap-source-map',
config: function (ykit) { config: function (ykit) {
return { return {
exports: [ exports: [
'./index.js' './index.js'
], ],
modifyWebpackConfig: function (baseConfig) { modifyWebpackConfig: function (baseConfig) {
var ENV_PARAMS = {}; var ENV_PARAMS = {};
switch (this.env) { switch (this.env) {
@ -148,17 +147,13 @@ module.exports = {
baseConfig.devtool = 'cheap-module-eval-source-map' baseConfig.devtool = 'cheap-module-eval-source-map'
baseConfig.context = path.resolve(__dirname, './client'); baseConfig.context = path.resolve(__dirname, './client');
baseConfig.resolve.alias.common = '/common'; baseConfig.resolve.alias.common = '/common';
baseConfig.resolve.alias.plugins = '/node_modules'; baseConfig.resolve.alias.plugins = '/plugins';
baseConfig.output.local.path = 'static/prd';
baseConfig.output.dev.path = 'static/prd';
baseConfig.output.prd.path = 'static/prd'; baseConfig.output.prd.path = 'static/prd';
baseConfig.output.prd.publicPath = ''; baseConfig.output.prd.publicPath = '';
baseConfig.output.prd.filename = '[name]@[chunkhash][ext]' baseConfig.output.prd.filename = '[name]@[chunkhash][ext]'
//commonsChunk //commonsChunk
handleCommonsChunk.call(this, baseConfig); handleCommonsChunk.call(this, baseConfig)
baseConfig.module.loaders.push({ baseConfig.module.loaders.push({
test: /\.less$/, test: /\.less$/,
loader: ykit.ExtractTextPlugin.extract( loader: ykit.ExtractTextPlugin.extract(
@ -178,39 +173,10 @@ module.exports = {
}) })
baseConfig.module.preLoaders.push({ baseConfig.module.preLoaders.push({
test: /\.(js|jsx)$/, test: /\.(js|jsx)$/,
exclude: /node_modules|plugins/, exclude: /node_modules/,
loader: require.resolve('eslint-loader') loader: "eslint-loader"
}); });
var testReg = /\.(js|jsx)$/,
exclude = /node_modules(?!\/yapi\-plugin\-)/,
query = {
cacheDirectory: true,
presets: [
["es2015", {"loose": true}],
'es2017',
'stage-0',
'stage-1',
'stage-2',
'react'
],
plugins: []
};
query.plugins.push(["transform-runtime", {
"polyfill": false,
"regenerator": true
}]);
query.plugins.push('transform-decorators-legacy');
query.plugins.push(["import", { libraryName: "antd"}])
baseConfig.module.loaders.push({
loader: require.resolve('babel-loader'),
test: testReg,
exclude: exclude,
query: query
})
if (this.env == 'prd') { if (this.env == 'prd') {
baseConfig.plugins.push(assetsPluginInstance) baseConfig.plugins.push(assetsPluginInstance)
baseConfig.plugins.push(compressPlugin) baseConfig.plugins.push(compressPlugin)
@ -222,10 +188,10 @@ module.exports = {
}, },
server: { server: {
// true/false默认 false效果相当于 ykit server --hot // true/false默认 false效果相当于 ykit server --hot
hot: true hot: true,
// true/false默认 false开启后可在当前打开的页面提示打包错误 // true/false默认 false开启后可在当前打开的页面提示打包错误
// overlay: true overlay: false
}, },
hooks: {}, hooks: {},
commands: [] commands: []
}; };