Merge branch 'master' of gitlab.com:gitzone/npmts

This commit is contained in:
Philipp Kunz 2017-06-23 16:39:27 +02:00
commit cf6f636d3e
6 changed files with 2965 additions and 82 deletions

View File

@ -1,3 +1,4 @@
import { ProjectinfoNpm } from 'projectinfo';
import { INpmtsConfig } from '../npmts.config';
export declare let projectInfo: ProjectinfoNpm;
export declare let run: (configArg: any) => Promise<{}>;
export declare let run: (configArg: INpmtsConfig) => Promise<INpmtsConfig>;

View File

@ -1,4 +1,12 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const q = require("smartq");
const projectinfo_1 = require("projectinfo");
@ -107,23 +115,17 @@ let checkNodeVersion = (configArg) => {
done.resolve(configArg);
return done.promise;
};
exports.run = (configArg) => {
let done = q.defer();
exports.run = (configArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ora.text('Check Module: ...');
// check cli
if (configArg.argv.nocheck) {
configArg.checkDependencies = false;
}
if (configArg.checkDependencies) {
checkProjectTypings(configArg)
.then(checkDependencies)
.then(checkDevDependencies)
.then(checkNodeVersion)
.then(done.resolve)
.catch((err) => { console.log(err); });
configArg = yield checkProjectTypings(configArg);
configArg = yield checkDependencies(configArg);
configArg = yield checkDevDependencies(configArg);
configArg = yield checkNodeVersion(configArg);
return configArg;
}
else {
done.resolve(configArg);
configArg = yield checkProjectTypings(configArg);
return configArg;
}
return done.promise;
};
});

2826
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -34,10 +34,11 @@
},
"homepage": "https://gitlab.com/gitzone/npmts#readme",
"dependencies": {
"@types/gulp-sourcemaps": "0.0.30",
"@types/gulp-sourcemaps": "0.0.31",
"@types/minimatch": "^2.0.29",
"@types/node": "^8.0.1",
"@types/through2": "^2.0.33",
"beautylog": "6.1.10",
"beautylog": "^6.1.10",
"depcheck": "^0.6.7",
"early": "^2.1.1",
"gulp-function": "^2.2.9",
@ -61,7 +62,7 @@
"tapbuffer": "^1.0.15",
"through2": "^2.0.3",
"tsn": "^2.0.15",
"typescript": "^2.3.4",
"typescript": "^2.4.0",
"typings-global": "^1.0.17"
},
"devDependencies": {}

View File

@ -1,14 +1,17 @@
import * as q from 'smartq'
import { ProjectinfoNpm } from 'projectinfo'
// interfaces
import { INpmtsConfig } from '../npmts.config'
import * as paths from '../npmts.paths'
import * as plugins from './mod00.plugins'
export let projectInfo: ProjectinfoNpm
let checkProjectTypings = (configArg) => {
let done = q.defer()
let checkProjectTypings = (configArg: INpmtsConfig) => {
let done = q.defer<INpmtsConfig>()
plugins.beautylog.ora.text('Check Module: Check Project Typings...')
projectInfo = new ProjectinfoNpm(paths.cwd)
if (typeof projectInfo.packageJson.typings === 'undefined') {
@ -34,8 +37,8 @@ const depcheckOptions = {
]
}
let checkDependencies = (configArg) => {
let done = q.defer()
let checkDependencies = (configArg: INpmtsConfig) => {
let done = q.defer<INpmtsConfig>()
plugins.beautylog.ora.text('Check Module: Check Dependencies...')
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
ignoreDirs: [ // folder with these names will be ignored
@ -70,8 +73,8 @@ let checkDependencies = (configArg) => {
return done.promise
}
let checkDevDependencies = (configArg) => {
let done = q.defer()
let checkDevDependencies = (configArg: INpmtsConfig) => {
let done = q.defer<INpmtsConfig>()
plugins.beautylog.ora.text('Check Module: Check devDependencies...')
let depcheckOptionsMerged = plugins.lodash.merge(depcheckOptions, {
ignoreDirs: [ // folder with these names will be ignored
@ -106,31 +109,24 @@ let checkDevDependencies = (configArg) => {
return done.promise
}
let checkNodeVersion = (configArg) => {
let done = q.defer()
let checkNodeVersion = (configArg: INpmtsConfig) => {
let done = q.defer<INpmtsConfig>()
plugins.beautylog.ora.text('checking node version')
done.resolve(configArg)
return done.promise
}
export let run = (configArg) => {
let done = q.defer()
export let run = async (configArg: INpmtsConfig) => {
plugins.beautylog.ora.text('Check Module: ...')
// check cli
if (configArg.argv.nocheck) {
configArg.checkDependencies = false
}
if (configArg.checkDependencies) {
checkProjectTypings(configArg)
.then(checkDependencies)
.then(checkDevDependencies)
.then(checkNodeVersion)
.then(done.resolve)
.catch((err) => { console.log(err) })
configArg = await checkProjectTypings(configArg)
configArg = await checkDependencies(configArg)
configArg = await checkDevDependencies(configArg)
configArg = await checkNodeVersion(configArg)
return configArg
} else {
done.resolve(configArg)
configArg = await checkProjectTypings(configArg)
return configArg
}
return done.promise
}

137
yarn.lock
View File

@ -54,9 +54,9 @@
dependencies:
"@types/node" "*"
"@types/gulp-sourcemaps@0.0.30":
version "0.0.30"
resolved "https://registry.yarnpkg.com/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.30.tgz#f867d3d44b5f3faeb8955af7260176ed92ac51a6"
"@types/gulp-sourcemaps@0.0.31":
version "0.0.31"
resolved "https://registry.yarnpkg.com/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.31.tgz#08347f899f4862f63f7586c997aacd41af21c72a"
dependencies:
"@types/node" "*"
@ -76,15 +76,19 @@
version "2.2.41"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.41.tgz#e27cf0817153eb9f2713b2d3f6c68f1e1c3ca608"
"@types/node@*", "@types/node@^7.0.29":
version "7.0.31"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.31.tgz#80ea4d175599b2a00149c29a10a4eb2dff592e86"
"@types/node@*", "@types/node@^8.0.1":
version "8.0.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.1.tgz#89c271e0c3b9ebb6a3756dd601336970b6228b77"
"@types/node@^7.0.29":
version "7.0.32"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.32.tgz#6afe6c66520a4c316623a14aef123908d01b4bba"
"@types/promises-a-plus@*":
version "0.0.27"
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
"@types/q@0.0.32", "@types/q@0.x.x", "@types/q@x.x.x":
"@types/q@0.0.32", "@types/q@0.x.x":
version "0.0.32"
resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5"
@ -92,7 +96,7 @@
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.0.tgz#57e5465d665b370d4217e69b344b20faa6b724f5"
"@types/q@1.x.x", "@types/q@^1.x.x":
"@types/q@1.x.x", "@types/q@^1.x.x", "@types/q@x.x.x":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.1.tgz#dbccb01bd8f0f801a12a4604c7d7af59bb02ae2f"
@ -306,8 +310,8 @@ babel-types@^6.25.0:
to-fast-properties "^1.0.1"
babylon@^6.1.21, babylon@^6.17.2:
version "6.17.3"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.3.tgz#1327d709950b558f204e5352587fd0290f8d8e48"
version "6.17.4"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a"
balanced-match@^1.0.0:
version "1.0.0"
@ -340,19 +344,6 @@ beautylog@5.0.12:
smartenv "^1.2.5"
typings-global "^1.0.3"
beautylog@6.1.10, beautylog@^6.0.0, beautylog@^6.0.1, beautylog@^6.1.1, beautylog@^6.1.10, beautylog@^6.1.5:
version "6.1.10"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.10.tgz#9c27e566937684cb689f9372d98cfa5415d50b72"
dependencies:
"@types/lodash" "^4.14.55"
beautycolor "^1.0.7"
figlet "^1.2.0"
lodash "^4.17.4"
ora "^1.1.0"
smartenv "^2.0.0"
smartq "^1.1.1"
typings-global "^1.0.14"
beautylog@^4.1.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-4.2.2.tgz#6cebdff8665099693d488151deee02890b92ce69"
@ -366,6 +357,19 @@ beautylog@^4.1.2:
q "^1.4.1"
smartenv "^1.2.2"
beautylog@^6.0.0, beautylog@^6.0.1, beautylog@^6.1.1, beautylog@^6.1.10, beautylog@^6.1.5:
version "6.1.10"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.10.tgz#9c27e566937684cb689f9372d98cfa5415d50b72"
dependencies:
"@types/lodash" "^4.14.55"
beautycolor "^1.0.7"
figlet "^1.2.0"
lodash "^4.17.4"
ora "^1.1.0"
smartenv "^2.0.0"
smartq "^1.1.1"
typings-global "^1.0.14"
beeper@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
@ -374,6 +378,10 @@ binary-extensions@^1.0.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774"
bindings@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
block-stream@*:
version "0.0.9"
resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a"
@ -766,6 +774,10 @@ es5-ext@^0.10.12, es5-ext@^0.10.13, es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~
es6-iterator "2"
es6-symbol "~3.1"
es6-error@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
es6-iterator@2, es6-iterator@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512"
@ -1263,7 +1275,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1:
inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
@ -1520,6 +1532,20 @@ lcov-parse@0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
leakage@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
dependencies:
es6-error "^4.0.2"
left-pad "^1.1.3"
memwatch-next "^0.3.0"
minimist "^1.2.0"
pretty-bytes "^4.0.2"
left-pad@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
@ -1528,8 +1554,8 @@ levn@~0.3.0:
type-check "~0.3.2"
lik@^1.0.30:
version "1.0.30"
resolved "https://registry.yarnpkg.com/lik/-/lik-1.0.30.tgz#488485088fc0dca9d08ba9744796d1dbf6b1eca4"
version "1.0.32"
resolved "https://registry.yarnpkg.com/lik/-/lik-1.0.32.tgz#41ee6c8edd483eaa11bd089775263955f5555060"
dependencies:
"@types/lodash" "^4.14.62"
"@types/minimatch" "2.x.x"
@ -1538,6 +1564,8 @@ lik@^1.0.30:
minimatch "^3.0.3"
q "^1.5.0"
rxjs "^5.3.0"
smartq "^1.1.1"
tapbundle "^1.0.14"
typings-global "^1.0.14"
load-json-file@^1.0.0:
@ -1720,6 +1748,13 @@ memoizee@^0.4.3:
next-tick "1"
timers-ext "0.1"
memwatch-next@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
dependencies:
bindings "^1.2.1"
nan "^2.3.2"
merge-stream@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
@ -1788,7 +1823,7 @@ multipipe@^0.1.2:
dependencies:
duplexer2 "0.0.2"
nan@^2.3.0:
nan@^2.3.0, nan@^2.3.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
@ -1877,7 +1912,7 @@ oauth-sign@~0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
object-assign@4.1.0:
object-assign@4.1.0, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
@ -1885,10 +1920,6 @@ object-assign@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
object.omit@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
@ -2081,6 +2112,10 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
process-nextick-args@^1.0.6, process-nextick-args@~1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
@ -2168,14 +2203,14 @@ read-pkg@^2.0.0:
string_decoder "~0.10.x"
readable-stream@^2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5:
version "2.2.11"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.11.tgz#0796b31f8d7688007ff0b93a8088d34aa17c0f72"
version "2.3.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.0.tgz#640f5dcda88c91a8dc60787145629170813a1ed2"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
inherits "~2.0.3"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
safe-buffer "~5.0.1"
safe-buffer "~5.1.0"
string_decoder "~1.0.0"
util-deprecate "~1.0.1"
@ -2317,7 +2352,11 @@ rxjs@^5.3.0, rxjs@^5.3.1:
dependencies:
symbol-observable "^1.0.1"
safe-buffer@^5.0.1, safe-buffer@~5.0.1:
safe-buffer@^5.0.1, safe-buffer@~5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223"
safe-buffer@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7"
@ -2405,6 +2444,13 @@ smartcov@^1.0.2:
smartq "^1.1.1"
typings-global "^1.0.14"
smartdelay@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
dependencies:
smartq "^1.1.1"
typings-global "^1.0.16"
smartenv@^1.2.2, smartenv@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/smartenv/-/smartenv-1.2.5.tgz#5e50343ec4653953ef24929fc548cd74ea53205c"
@ -2769,8 +2815,8 @@ systemjs@^0.20.12:
resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-0.20.14.tgz#b29812f01b2c7ee867c3fc153b01fca4ea20c4d7"
tap-mocha-reporter@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/tap-mocha-reporter/-/tap-mocha-reporter-3.0.3.tgz#e5917fad3d9a70957f9b7c736e793beb87d7daf1"
version "3.0.5"
resolved "https://registry.yarnpkg.com/tap-mocha-reporter/-/tap-mocha-reporter-3.0.5.tgz#f299ab9011e11a261592783c0aa1af6d1511ab83"
dependencies:
color-support "^1.1.0"
debug "^2.1.3"
@ -2808,6 +2854,17 @@ tapbuffer@^1.0.15:
tap-mocha-reporter "^3.0.3"
typings-global "^1.0.14"
tapbundle@^1.0.14:
version "1.0.14"
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.14.tgz#75827e335fcb02216f0267a26a26d702ddc02e3c"
dependencies:
early "^2.1.1"
leakage "^0.3.0"
smartchai "^1.0.3"
smartdelay "^1.0.3"
smartq "^1.1.1"
typings-global "^1.0.16"
tar-pack@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984"
@ -2933,7 +2990,7 @@ typed-promisify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
typescript@^2.1.5, typescript@^2.3.4:
typescript@^2.1.5, typescript@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.0.tgz#aef5a8d404beba36ad339abf079ddddfffba86dd"