diff --git a/package-lock.json b/package-lock.json index b558409..18626ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,17 @@ "nan": "^2.9.2" } }, + "@gitzone/tsrun": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.9.tgz", + "integrity": "sha512-MbCLj4hSK5nY6cMqT0OxY0BrXffmiC1Rjbzan8CmEpB8OttaAJT+zsJErJWhI+pk4s75Te73PyhHYaJAXUoJhw==", + "dev": true, + "requires": { + "@pushrocks/smartfile": "^6.0.3", + "ts-node": "^7.0.0", + "typescript": "^2.9.1" + } + }, "@pushrocks/smartcli": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@pushrocks/smartcli/-/smartcli-3.0.2.tgz", @@ -28,12 +39,74 @@ "yargs": "^11.0.0" } }, - "@pushrocks/smartpromise": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@pushrocks/smartpromise/-/smartpromise-2.0.2.tgz", - "integrity": "sha512-Rr4aLO2spAQ58TB9l3UwVs+keQu7gPXcYSO/5zLYNimEP7H237tFApX/qk80nwvHh2ATTBTgu0IcWKhHb5uVow==", + "@pushrocks/smartdelay": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@pushrocks/smartdelay/-/smartdelay-2.0.1.tgz", + "integrity": "sha512-olWwh2/JWfhmYdgqrR5RdSsgv1GlXBnbP+XKUrdKVk3dcCzkoqDx9lRE9NfpoCg1cUM2VMxbTVgTW9PWyexEuw==", "requires": { - "util.promisify": "^1.0.0" + "@pushrocks/smartpromise": "^2.0.5" + } + }, + "@pushrocks/smartfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@pushrocks/smartfile/-/smartfile-6.0.3.tgz", + "integrity": "sha512-oYnLQzY/R6kVNerbWY4WwnPvdxXldrzMPWcB9j0aAdSDSqGwBEO1/ZFTQuNzN5MmPopoYmJrc06ZmI6dm4OJmw==", + "requires": { + "@pushrocks/smartpromise": "^2.0.5", + "@pushrocks/smartrequest": "^1.0.15", + "@types/fs-extra": "^5.0.3", + "@types/vinyl": "^2.0.2", + "fs-extra": "^6.0.1", + "glob": "^7.1.2", + "js-yaml": "^3.10.0", + "smartpath": "^3.2.8", + "vinyl-file": "^3.0.0" + }, + "dependencies": { + "@types/fs-extra": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.4.tgz", + "integrity": "sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g==", + "requires": { + "@types/node": "*" + } + }, + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, + "@pushrocks/smartpromise": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@pushrocks/smartpromise/-/smartpromise-2.0.5.tgz", + "integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g==" + }, + "@pushrocks/smartrequest": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@pushrocks/smartrequest/-/smartrequest-1.0.15.tgz", + "integrity": "sha512-nM+ctwMOs3gPJvw3cGouBimKQxCM93bnmv2+Jk9cbT29/UVVI/UjIdAU3OnUYFpzq496/QUAQD0kNsmYNkqmhQ==", + "requires": { + "smartq": "^1.1.1" + } + }, + "@pushrocks/tapbundle": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@pushrocks/tapbundle/-/tapbundle-3.0.1.tgz", + "integrity": "sha512-QWVz5EwB3sjjqHTMa22xuw78TBgVTyqKTF5H6HT9d/rvxL5Ag4ZrTuoadMPcU9hRBx9gtPsKbWq4lEwOHdCmLA==", + "dev": true, + "requires": { + "@pushrocks/smartdelay": "^2.0.1", + "@pushrocks/smartpromise": "^2.0.5", + "early": "^2.1.1", + "leakage": "^0.4.0", + "smartchai": "^2.0.1" } }, "@types/chai": { @@ -94,9 +167,9 @@ "integrity": "sha512-4RKbhIDGC87s4EBy2Cp2/5S2O6kmCRcZnD5KRCq1q9z2GhBte1+BdsfVKCpG8yKpDGNyEE2G6IqFIh6W2YwWPA==" }, "@types/lodash": { - "version": "4.14.110", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.110.tgz", - "integrity": "sha512-iXYLa6olt4tnsCA+ZXeP6eEW3tk1SulWeYyP/yooWfAtXjozqXgtX4+XUtMuOCfYjKGz3F34++qUc3Q+TJuIIw==" + "version": "4.14.112", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.112.tgz", + "integrity": "sha512-jDD7sendv3V7iwyRXSlECOR8HCtMN2faVA9ngLdHHihSVIwY7nbfsKl2kA6fimUDU1i5l/zgpG3aevwWnN3zCQ==" }, "@types/minimatch": { "version": "3.0.3", @@ -162,9 +235,9 @@ "integrity": "sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ==" }, "@types/yargs": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-11.0.0.tgz", - "integrity": "sha512-vFql3tOxs6clgh+WVoLW3nOkNGCdeKsMU6mQZkOerJpV/CR9Xc1c1lZ+kYU+hNSobrQIOcNovWfPFDJIhcG5Pw==" + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-bhNrCSpRNPKlIejjo+WavCrqmL4rUjOWdqGhO57nVB9vEUX6Xw4Dj//Jge7jFSz2r2yzKt74Ce+Xx5W2Ul2xNA==" }, "accepts": { "version": "1.3.5", @@ -222,6 +295,12 @@ "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, "asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", @@ -339,6 +418,12 @@ "concat-map": "0.0.1" } }, + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, "callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -589,6 +674,12 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, "early": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/early/-/early-2.1.1.tgz", @@ -786,9 +877,9 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-func-name": { "version": "2.0.0", @@ -1140,6 +1231,12 @@ "yallist": "^2.1.2" } }, + "make-error": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz", + "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", + "dev": true + }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -1180,6 +1277,23 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, "moment": { "version": "2.22.2", "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", @@ -1557,9 +1671,9 @@ } }, "rxjs": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.1.tgz", - "integrity": "sha512-OwMxHxmnmHTUpgO+V7dZChf3Tixf4ih95cmXjzzadULziVl/FKhHScGLj4goEw9weePVOH2Q0+GcCBUhKCZc/g==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", + "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", "requires": { "tslib": "^1.9.0" } @@ -1950,6 +2064,22 @@ } } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -2054,19 +2184,6 @@ "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-0.20.19.tgz", "integrity": "sha512-H/rKwNEEyej/+IhkmFNmKFyJul8tbH/muiPq5TyNoVTwsGhUjRsN3NlFnFQUvFXA3+GQmsXkCNXU6QKPl779aw==" }, - "tapbundle": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/tapbundle/-/tapbundle-2.0.2.tgz", - "integrity": "sha512-y3ulfK4GKoVkuqF2QsrwVMWLXHqXeoDEzsw/Q9ZTJumNINbx4bcWPAdg2IcTHYgJHeSdF03HiB9EbHoUTRjD9Q==", - "dev": true, - "requires": { - "early": "^2.1.1", - "leakage": "^0.4.0", - "smartchai": "^2.0.1", - "smartdelay": "^1.0.4", - "smartq": "^1.1.8" - } - }, "taskbuffer": { "version": "1.0.22", "resolved": "https://registry.npmjs.org/taskbuffer/-/taskbuffer-1.0.22.tgz", @@ -2130,6 +2247,22 @@ "punycode": "^1.4.1" } }, + "ts-node": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.0.tgz", + "integrity": "sha512-klJsfswHP0FuOLsvBZ/zzCfUvakOSSxds78mVeK7I+qP76YWtxf16hEZsp3U+b0kIo82R5UatGFeblYMqabb2Q==", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, "tsclass": { "version": "1.0.20", "resolved": "https://registry.npmjs.org/tsclass/-/tsclass-1.0.20.tgz", @@ -2160,6 +2293,12 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + }, "typings-global": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/typings-global/-/typings-global-1.0.28.tgz", @@ -2350,6 +2489,12 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" + }, + "yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", + "dev": true } } } diff --git a/package.json b/package.json index 9267584..cb26541 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "npmci": "dist/cli.js" }, "scripts": { - "test": "(rm -f config.json) && (npmts) && (npm run testVersion)", + "test": "(rm -f config.json) && tsrun test/test.ts", "build": "(rm -f config.json) && (npmts) && (npm run testVersion)", "testVersion": "(cd test/assets/ && node ../../dist/cli.js -v)" }, @@ -23,12 +23,15 @@ }, "homepage": "https://gitlab.com/gitzone/npmci#README", "devDependencies": { - "tapbundle": "^2.0.2" + "@gitzone/tsrun": "^1.1.9", + "@pushrocks/tapbundle": "^3.0.1" }, "dependencies": { "@pushrocks/smartcli": "^3.0.2", - "@pushrocks/smartpromise": "^2.0.2", - "@types/lodash": "^4.14.110", + "@pushrocks/smartdelay": "^2.0.1", + "@pushrocks/smartfile": "^6.0.3", + "@pushrocks/smartpromise": "^2.0.5", + "@types/lodash": "^4.14.112", "@types/shelljs": "^0.8.0", "@types/through2": "^2.0.33", "beautylog": "^6.1.10", @@ -40,8 +43,6 @@ "request": "^2.87.0", "shelljs": "^0.8.2", "smartanalytics": "^2.0.9", - "smartdelay": "^1.0.4", - "smartfile": "^4.2.20", "smartparam": "^1.0.2", "smartshell": "^1.0.19", "smartsocket": "^1.1.19", diff --git a/test/test.ts b/test/test.ts index 4dcf15b..12571aa 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,4 +1,4 @@ -import { tap, expect } from 'tapbundle'; +import { tap, expect } from '@pushrocks/tapbundle'; import * as path from 'path'; // Setup test diff --git a/ts/mod_docker/mod.helpers.ts b/ts/mod_docker/mod.helpers.ts index 1772ef7..f58c3ea 100644 --- a/ts/mod_docker/mod.helpers.ts +++ b/ts/mod_docker/mod.helpers.ts @@ -34,7 +34,7 @@ export let readDockerfiles = async (): Promise => { * @returns Promise */ export let sortDockerfiles = (sortableArrayArg: Dockerfile[]): Promise => { - let done = plugins.q.defer(); + let done = plugins.smartpromise.defer(); plugins.beautylog.info('sorting Dockerfiles:'); let sortedArray: Dockerfile[] = []; let cleanTagsOriginal = cleanTagsArrayFunction(sortableArrayArg, sortedArray); diff --git a/ts/npmci.plugins.ts b/ts/npmci.plugins.ts index 4b6eafa..76a6dbc 100644 --- a/ts/npmci.plugins.ts +++ b/ts/npmci.plugins.ts @@ -3,11 +3,10 @@ export import lodash = require('lodash'); export import npmextra = require('npmextra'); export import path = require('path'); export import projectinfo = require('projectinfo'); -export import q = require('smartq'); export let request = require('request'); export import smartcli = require('@pushrocks/smartcli'); -export import smartdelay = require('smartdelay'); -export import smartfile = require('smartfile'); +export import smartdelay = require('@pushrocks/smartdelay'); +export import smartfile = require('@pushrocks/smartfile'); export import shelljs = require('shelljs'); export import smartparam = require('smartparam'); export import smartpromise = require('@pushrocks/smartpromise');