提交 702735a7 作者: 潘亚楠

合并分支 'dev-feat/#5' 到 'dev'

从 dev-feat/#5 合并到 dev

查看合并请求 Platform/UPA/UPA_QJCLI/UPA_QJCLI!7
......@@ -18,12 +18,30 @@
"commander": "*"
}
},
"@types/cross-spawn": {
"version": "6.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/@types/cross-spawn/-/cross-spawn-6.0.1.tgz",
"integrity": "sha1-YPoMhwRjR8F9lzXlKJ5yuATKm2M=",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/empower": {
"version": "1.2.30",
"resolved": "http://39.106.145.141:9000/repository/node-public/@types/empower/-/empower-1.2.30.tgz",
"integrity": "sha1-x8/BSzph5Ux0xnTB+8kbot8NE5I=",
"dev": true
},
"@types/fs-extra": {
"version": "8.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/@types/fs-extra/-/fs-extra-8.0.1.tgz",
"integrity": "sha1-ojeNbn6K/qFWTkSq+i4gfa33doY=",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/mocha": {
"version": "5.2.7",
"resolved": "http://39.106.145.141:9000/repository/node-public/@types/mocha/-/mocha-5.2.7.tgz",
......@@ -95,7 +113,6 @@
"version": "3.2.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
......@@ -294,6 +311,19 @@
"integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=",
"dev": true
},
"cli-cursor": {
"version": "3.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/cli-cursor/-/cli-cursor-3.1.0.tgz",
"integrity": "sha1-JkMFp65JDR0Dvwybp8kl0XU68wc=",
"requires": {
"restore-cursor": "^3.1.0"
}
},
"cli-spinners": {
"version": "2.2.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/cli-spinners/-/cli-spinners-2.2.0.tgz",
"integrity": "sha1-6LmI2SBsaSMC2O6DTnqFwBRNj3c="
},
"cliui": {
"version": "5.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/cliui/-/cliui-5.0.0.tgz",
......@@ -333,11 +363,15 @@
}
}
},
"clone": {
"version": "1.0.4",
"resolved": "http://39.106.145.141:9000/repository/node-public/clone/-/clone-1.0.4.tgz",
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
},
"color-convert": {
"version": "1.9.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
......@@ -345,8 +379,7 @@
"color-name": {
"version": "1.1.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"commander": {
"version": "4.0.1",
......@@ -439,14 +472,23 @@
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"version": "7.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/cross-spawn/-/cross-spawn-7.0.1.tgz",
"integrity": "sha1-CrVihuD3wk4VPQTMKqAn5DqaXRQ=",
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"dependencies": {
"which": {
"version": "2.0.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/which/-/which-2.0.2.tgz",
"integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=",
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"crypto-random-string": {
......@@ -482,6 +524,14 @@
"integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=",
"dev": true
},
"defaults": {
"version": "1.0.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/defaults/-/defaults-1.0.3.tgz",
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
"requires": {
"clone": "^1.0.2"
}
},
"define-properties": {
"version": "1.1.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/define-properties/-/define-properties-1.1.3.tgz",
......@@ -550,6 +600,14 @@
"core-js": "^2.0.0"
}
},
"end-of-stream": {
"version": "1.4.4",
"resolved": "http://39.106.145.141:9000/repository/node-public/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=",
"requires": {
"once": "^1.4.0"
}
},
"error-ex": {
"version": "1.3.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/error-ex/-/error-ex-1.3.2.tgz",
......@@ -592,8 +650,7 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "http://39.106.145.141:9000/repository/node-public/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"esprima": {
"version": "4.0.1",
......@@ -617,18 +674,35 @@
"dev": true
},
"execa": {
"version": "0.7.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"dev": true,
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
"version": "3.4.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/execa/-/execa-3.4.0.tgz",
"integrity": "sha1-wI7UVQ72XYWPrCaf/IVyRG8364k=",
"requires": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"p-finally": "^2.0.0",
"signal-exit": "^3.0.2",
"strip-final-newline": "^2.0.0"
},
"dependencies": {
"get-stream": {
"version": "5.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/get-stream/-/get-stream-5.1.0.tgz",
"integrity": "sha1-ASA83JJZf5uQkGfD5lbMH008Tck=",
"requires": {
"pump": "^3.0.0"
}
},
"is-stream": {
"version": "2.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/is-stream/-/is-stream-2.0.0.tgz",
"integrity": "sha1-venDJoDW+uBBKdasnZIc54FfeOM="
}
}
},
"fill-range": {
......@@ -658,6 +732,16 @@
"is-buffer": "~2.0.3"
}
},
"fs-extra": {
"version": "8.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha1-SdQ8RaiM2Wd2aMt74bRu/bjS4cA=",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/fs.realpath/-/fs.realpath-1.0.0.tgz",
......@@ -743,8 +827,7 @@
"graceful-fs": {
"version": "4.2.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM=",
"dev": true
"integrity": "sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM="
},
"growl": {
"version": "1.10.5",
......@@ -764,8 +847,7 @@
"has-flag": {
"version": "3.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"has-symbols": {
"version": "1.0.1",
......@@ -785,6 +867,11 @@
"integrity": "sha1-dZz88sTRVq3lmwst+r3cQqa5xww=",
"dev": true
},
"human-signals": {
"version": "1.1.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha1-xbHNFPUK6uCatsWf5jujOV/k36M="
},
"ignore-by-default": {
"version": "1.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
......@@ -904,6 +991,11 @@
"is-path-inside": "^1.0.0"
}
},
"is-interactive": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/is-interactive/-/is-interactive-1.0.0.tgz",
"integrity": "sha1-zqbmrlyHCnsKAAQHC3tYfgJSkS4="
},
"is-npm": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/is-npm/-/is-npm-1.0.0.tgz",
......@@ -970,8 +1062,7 @@
"isexe": {
"version": "2.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"js-yaml": {
"version": "3.13.1",
......@@ -989,6 +1080,14 @@
"integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=",
"dev": true
},
"jsonfile": {
"version": "4.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "^4.1.6"
}
},
"latest-version": {
"version": "3.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/latest-version/-/latest-version-3.1.0.tgz",
......@@ -1067,6 +1166,16 @@
"integrity": "sha1-7+ToH22yjK3WBccPKcgxtY73dsg=",
"dev": true
},
"merge-stream": {
"version": "2.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/merge-stream/-/merge-stream-2.0.0.tgz",
"integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A="
},
"mimic-fn": {
"version": "2.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs="
},
"minimatch": {
"version": "3.0.4",
"resolved": "http://39.106.145.141:9000/repository/node-public/minimatch/-/minimatch-3.0.4.tgz",
......@@ -1153,6 +1262,11 @@
"integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=",
"dev": true
},
"mute-stream": {
"version": "0.0.8",
"resolved": "http://39.106.145.141:9000/repository/node-public/mute-stream/-/mute-stream-0.0.8.tgz",
"integrity": "sha1-FjDEKyJR/4HiooPelqVJfqkuXg0="
},
"node-environment-flags": {
"version": "1.0.5",
"resolved": "http://39.106.145.141:9000/repository/node-public/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
......@@ -1209,12 +1323,11 @@
"dev": true
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"dev": true,
"version": "4.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/npm-run-path/-/npm-run-path-4.0.0.tgz",
"integrity": "sha1-1kTsG9BWkYfSpSkJlxAjoKWOhDg=",
"requires": {
"path-key": "^2.0.0"
"path-key": "^3.0.0"
}
},
"object-inspect": {
......@@ -1255,16 +1368,72 @@
"version": "1.4.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
},
"onetime": {
"version": "5.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/onetime/-/onetime-5.1.0.tgz",
"integrity": "sha1-//DzyRYX/mK7UBiWNumayKbfe+U=",
"requires": {
"mimic-fn": "^2.1.0"
}
},
"ora": {
"version": "4.0.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/ora/-/ora-4.0.3.tgz",
"integrity": "sha1-dSobe0vkglVGp6PVklb6UjtrbQU=",
"requires": {
"chalk": "^3.0.0",
"cli-cursor": "^3.1.0",
"cli-spinners": "^2.2.0",
"is-interactive": "^1.0.0",
"log-symbols": "^3.0.0",
"mute-stream": "0.0.8",
"strip-ansi": "^6.0.0",
"wcwidth": "^1.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U="
},
"log-symbols": {
"version": "3.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/log-symbols/-/log-symbols-3.0.0.tgz",
"integrity": "sha1-86CFFqXeqJMzan3uFNGKHP2rd8Q=",
"requires": {
"chalk": "^2.4.2"
},
"dependencies": {
"chalk": {
"version": "2.4.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
}
}
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha1-CxVx3XZpzNTz4G4U7x7tJiJa5TI=",
"requires": {
"ansi-regex": "^5.0.0"
}
}
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
"dev": true
"version": "2.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/p-finally/-/p-finally-2.0.1.tgz",
"integrity": "sha1-vW/KqcVZoJa2gIBvTWV7Pw8kBWE="
},
"p-limit": {
"version": "2.2.1",
......@@ -1331,10 +1500,9 @@
"dev": true
},
"path-key": {
"version": "2.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
"version": "3.1.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U="
},
"path-parse": {
"version": "1.0.6",
......@@ -1492,6 +1660,15 @@
"integrity": "sha1-x2ljooBH7WFULcNhqibuVaf6FfM=",
"dev": true
},
"pump": {
"version": "3.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/pump/-/pump-3.0.0.tgz",
"integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=",
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"rc": {
"version": "1.2.8",
"resolved": "http://39.106.145.141:9000/repository/node-public/rc/-/rc-1.2.8.tgz",
......@@ -1564,6 +1741,15 @@
"path-parse": "^1.0.6"
}
},
"restore-cursor": {
"version": "3.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/restore-cursor/-/restore-cursor-3.1.0.tgz",
"integrity": "sha1-OfZ8VLOnpYzqUjbZXPADQjljH34=",
"requires": {
"onetime": "^5.1.0",
"signal-exit": "^3.0.2"
}
},
"rxjs": {
"version": "6.5.3",
"resolved": "http://39.106.145.141:9000/repository/node-public/rxjs/-/rxjs-6.5.3.tgz",
......@@ -1601,25 +1787,22 @@
"dev": true
},
"shebang-command": {
"version": "1.2.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"dev": true,
"version": "2.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=",
"requires": {
"shebang-regex": "^1.0.0"
"shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
"version": "3.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI="
},
"signal-exit": {
"version": "3.0.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"dev": true
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"source-map": {
"version": "0.6.1",
......@@ -1737,6 +1920,11 @@
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
"dev": true
},
"strip-final-newline": {
"version": "2.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
"integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0="
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
......@@ -1747,7 +1935,6 @@
"version": "5.5.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
......@@ -1759,6 +1946,70 @@
"dev": true,
"requires": {
"execa": "^0.7.0"
},
"dependencies": {
"cross-spawn": {
"version": "5.1.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"requires": {
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"execa": {
"version": "0.7.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"dev": true,
"requires": {
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"dev": true,
"requires": {
"path-key": "^2.0.0"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
"dev": true
},
"path-key": {
"version": "2.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
},
"shebang-command": {
"version": "1.2.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "http://39.106.145.141:9000/repository/node-public/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
}
}
},
"timed-out": {
......@@ -1882,6 +2133,11 @@
"object-keys": "^1.0.0"
}
},
"universalify": {
"version": "0.1.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY="
},
"unzip-response": {
"version": "2.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/unzip-response/-/unzip-response-2.0.1.tgz",
......@@ -1938,6 +2194,14 @@
"spdx-expression-parse": "^3.0.0"
}
},
"wcwidth": {
"version": "1.0.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/wcwidth/-/wcwidth-1.0.1.tgz",
"integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
"requires": {
"defaults": "^1.0.3"
}
},
"which": {
"version": "1.3.1",
"resolved": "http://39.106.145.141:9000/repository/node-public/which/-/which-1.3.1.tgz",
......@@ -2013,8 +2277,7 @@
"wrappy": {
"version": "1.0.2",
"resolved": "http://39.106.145.141:9000/repository/node-public/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write-file-atomic": {
"version": "2.4.3",
......
......@@ -27,6 +27,8 @@
"license": "ISC",
"devDependencies": {
"@types/commander": "^2.12.2",
"@types/cross-spawn": "^6.0.1",
"@types/fs-extra": "^8.0.1",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.17",
"@types/power-assert": "^1.5.2",
......@@ -39,6 +41,10 @@
},
"dependencies": {
"chalk": "^3.0.0",
"commander": "^4.0.1"
"commander": "^4.0.1",
"cross-spawn": "^7.0.1",
"execa": "^3.4.0",
"fs-extra": "^8.1.0",
"ora": "^4.0.3"
}
}
import * as chalk from 'chalk';
/**
* @date 2019.12.16
* @author panyanan
......
import Git from '../../util/Git'
import * as assert from 'power-assert'
import * as path from 'path'
import * as spawn from 'cross-spawn'
describe('#util/Git', function () {
it('#hasGit', function () {
console.log(Git.hasGit)
})
it('#localGitUserInfo', function () {
let res = Git.localGitUserInfo();
console.log(res);
})
it('#pull', async function () {
this.skip()
let url = 'git@git.allhome.com.cn:panyanan/my-vue-template.git';
const dir = path.join(__dirname, 'abc');
const git = new Git(url, dir);
await git.pull();
})
it('#push', function () {
this.skip();
let url = 'git@git.allhome.com.cn:Platform/UPA/UPA_QJCLI/UPA_test.git';
const dir = path.join(__dirname, 'abc');
const git = new Git(url, dir);
let res = git.push();
assert.ok(res);
})
})
\ No newline at end of file
/**
* @date 2019.12.17
* @author panyanan
* @information git工具类 提供git拉取,推送等
*/
import * as execa from 'execa'
import * as assert from 'power-assert'
import * as fs from 'fs-extra'
import * as chalk from 'chalk'
import * as spawn from 'cross-spawn'
class Git {
private gitURL: string; // 仓库地址
private dir: string; // 拉取或推送的目录
constructor(gitURL: string, dir: string) {
assert.ok(Git.hasGit, '请先安装Git');
this.gitURL = gitURL;
this.dir = dir;
}
/**
* @date 2019.12.17
* @author panyanan
* @information 拉取
*/
async pull(): Promise<boolean> {
let res = false;
try {
// 检测目录是否存在
const dirExits = await fs.pathExists(this.dir);
// 目录存在需要删除,才能clone
if (dirExits) {
console.log(chalk.red(`delete ${this.dir}`));
await fs.remove(this.dir);
}
await execa('git', ['clone', this.gitURL, this.dir]);
res = true;
} catch (error) {
assert.ok(false, `拉取 ${this.gitURL} 失败: ${ error.message }`);
}
return res;
}
/**
* @date 2019.12.17
* @author panyanan
* @information 推送
*/
push(): boolean {
let res = false;
const options = {
cwd: this.dir,
}
// remove origin
spawn.sync('git', ['remote', 'remove', 'origin',], options);
// set origin 为当前url
spawn.sync('git', ['remote', 'add', 'origin', this.gitURL], options);
// 推送
const { status, stderr } = spawn.sync('git', ['push', '-u', 'origin', '--all'], options);
// status 为0时命令执行成功, 为1是命令执行失败
if (status === 0) {
res = true;
} else {
// 抛异常
throw new Error(stderr.toString())
}
return res;
}
/**
* @date 2019.12.17
* @author panyanan
* @information 获取git配置中的用户名及邮箱
*/
static localGitUserInfo():{ name: string, email: string} {
// 检测git是否安装
assert.ok(Git.hasGit, '请安装Git');
// 获取用户名
const { stdout: name } = execa.sync('git', ['config', 'user.name']);
// 获取邮箱
const { stdout: email } = execa.sync('git', ['config', 'user.email']);
return { name, email };
}
/**
* @date 2019.12.17
* @author panyanan
* @information 是否安装了git
*/
static get hasGit(): boolean {
let res = false;
try {
// 执行git --help 是否抛异常
execa.sync('git', ['--help']);
res = true;
} catch (error) {}
return res;
}
}
export default Git;
\ No newline at end of file
{
"compilerOptions": {
"module": "commonjs",
"module": "CommonJS",
"outDir": "dist",
"declaration": true,
"listFiles": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"target": "es5",
"baseUrl": "src",
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论