Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
e0611f3f64 | |||
928f3212a3 | |||
7c7e45ad54 | |||
797d9e2bcd | |||
578cd2d097 | |||
5a7dd901f0 | |||
2104fc01e6 | |||
4eacef56d5 | |||
5722deb7a0 | |||
50d71dde67 | |||
13123e180d | |||
b13db4184b | |||
19f6097ab9 | |||
34066d8a13 | |||
df87337f4d | |||
105e5c2ff0 | |||
7115b699ba | |||
8c7ac4c1d0 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ pages/
|
||||
public/
|
||||
npm-debug/
|
||||
.DS_Store
|
||||
.yarn/
|
@ -19,6 +19,7 @@ mirror:
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
stage: security
|
||||
@ -28,6 +29,26 @@ snyk:
|
||||
- npmci command snyk test
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
codequality:
|
||||
stage: security
|
||||
image: docker:stable
|
||||
allow_failure: true
|
||||
services:
|
||||
- docker:stable-dind
|
||||
script:
|
||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
||||
- docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--volume "$PWD":/code
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
||||
artifacts:
|
||||
paths: [codeclimate.json]
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
@ -38,6 +59,7 @@ testLEGACY:
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
allow_failure: true
|
||||
|
||||
testLTS:
|
||||
@ -49,6 +71,7 @@ testLTS:
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
testSTABLE:
|
||||
stage: test
|
||||
@ -59,16 +82,19 @@ testSTABLE:
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm prepare
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
@ -78,6 +104,7 @@ trigger:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
@ -87,6 +114,7 @@ pages:
|
||||
- npmci command npmpage
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
|
@ -1,6 +0,0 @@
|
||||
compile/
|
||||
coverage/
|
||||
test/
|
||||
docs/
|
||||
examples
|
||||
.gitignore
|
111
.snyk
Normal file
111
.snyk
Normal file
@ -0,0 +1,111 @@
|
||||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.12.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
'npm:debug:20170905':
|
||||
- node-pre-gyp > tar-pack > debug:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > tar-pack > debug:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:12:05.487Z'
|
||||
'npm:tough-cookie:20170905':
|
||||
- node-pre-gyp > request > tough-cookie:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > request > tough-cookie:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:12:05.487Z'
|
||||
'npm:hoek:20180212':
|
||||
- boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- cryptiles > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- hawk > cryptiles > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > hawk > cryptiles > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > hawk > cryptiles > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > request > hawk > cryptiles > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > request > hawk > cryptiles > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- hawk > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > hawk > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > hawk > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > request > hawk > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > request > hawk > boom > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- hawk > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > hawk > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > hawk > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > request > hawk > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > request > hawk > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- hawk > sntp > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > hawk > sntp > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > hawk > sntp > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- node-pre-gyp > request > hawk > sntp > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > request > hawk > sntp > hoek:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
'npm:shelljs:20140723':
|
||||
- tapbuffer > smartshell > shelljs:
|
||||
reason: None given
|
||||
expires: '2018-05-08T23:10:17.169Z'
|
||||
'npm:atob:20180429':
|
||||
- gulp-sourcemaps > css > source-map-resolve > atob:
|
||||
reason: None given
|
||||
expires: '2018-06-02T10:44:49.656Z'
|
||||
- gulp-sourcemaps > @gulp-sourcemaps/identity-map > css > source-map-resolve > atob:
|
||||
reason: None given
|
||||
expires: '2018-06-02T10:44:49.656Z'
|
||||
'npm:deep-extend:20180409':
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > rc > deep-extend:
|
||||
reason: None given
|
||||
expires: '2018-06-02T10:44:49.656Z'
|
||||
- deep-extend:
|
||||
reason: None given
|
||||
expires: '2018-06-02T10:44:49.656Z'
|
||||
- node-pre-gyp > rc > deep-extend:
|
||||
reason: None given
|
||||
expires: '2018-06-02T10:44:49.656Z'
|
||||
'npm:sshpk:20180409':
|
||||
- smartchok > chokidar > fsevents > node-pre-gyp > request > http-signature > sshpk:
|
||||
reason: None given
|
||||
expires: '2018-06-02T10:44:49.656Z'
|
||||
patch: {}
|
4
dist/mod_test/index.d.ts
vendored
4
dist/mod_test/index.d.ts
vendored
@ -1,2 +1,6 @@
|
||||
import { INpmtsConfig } from '../npmts.config';
|
||||
/**
|
||||
* run this module
|
||||
* @param configArg some config for how to run this module
|
||||
*/
|
||||
export declare let run: (configArg: INpmtsConfig) => Promise<INpmtsConfig>;
|
||||
|
4
dist/mod_test/index.js
vendored
4
dist/mod_test/index.js
vendored
@ -93,6 +93,10 @@ let handleCoverageData = (configArg) => __awaiter(this, void 0, void 0, function
|
||||
}
|
||||
return configArg;
|
||||
});
|
||||
/**
|
||||
* run this module
|
||||
* @param configArg some config for how to run this module
|
||||
*/
|
||||
exports.run = function (configArg) {
|
||||
let done = q.defer();
|
||||
let config = configArg;
|
||||
|
20
dist/npmts.cli.js
vendored
20
dist/npmts.cli.js
vendored
@ -52,14 +52,13 @@ exports.run = () => __awaiter(this, void 0, void 0, function* () {
|
||||
yield plugins.smartupdate.standardHandler.check('npmts', npmtsProjectInfo.version, 'http://gitzone.gitlab.io/npmts/changelog.html');
|
||||
plugins.beautylog.log('---------------------------------------------');
|
||||
let npmtsCli = new plugins.smartcli.Smartcli();
|
||||
// build
|
||||
npmtsCli
|
||||
.standardTask()
|
||||
.then(argvArg => {
|
||||
plugins.beautylog.info('npmts version: ' + npmtsProjectInfo.version);
|
||||
return NpmtsConfig.run(argvArg);
|
||||
})
|
||||
.then((configArg) => {
|
||||
.addCommand('build')
|
||||
.subscribe((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
||||
let done = q.defer();
|
||||
plugins.beautylog.info('npmts version: ' + npmtsProjectInfo.version);
|
||||
const configArg = yield NpmtsConfig.run(argvArg);
|
||||
plugins.beautylog.ora.start('loading additional modules...');
|
||||
NpmtsMods.modCompile
|
||||
.load()
|
||||
@ -93,13 +92,18 @@ exports.run = () => __awaiter(this, void 0, void 0, function* () {
|
||||
.then(NpmtsWatch.run)
|
||||
.then(NpmtsShip.run);
|
||||
return done.promise;
|
||||
})
|
||||
.catch(err => {
|
||||
}), err => {
|
||||
if (err instanceof Error) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
// standard task
|
||||
npmtsCli.standardTask().subscribe((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
||||
yield npmtsCli.trigger('build');
|
||||
}));
|
||||
// cli metadata
|
||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||
// start parsing
|
||||
npmtsCli.startParse();
|
||||
return yield done.promise;
|
||||
});
|
||||
|
2
dist/npmts.config.d.ts
vendored
2
dist/npmts.config.d.ts
vendored
@ -22,5 +22,5 @@ export interface INpmtsConfig {
|
||||
coverageResult?: number;
|
||||
};
|
||||
}
|
||||
export declare let run: (argvArg: any) => Promise<{}>;
|
||||
export declare let run: (argvArg: any) => Promise<INpmtsConfig>;
|
||||
export declare let configPromise: Promise<INpmtsConfig>;
|
||||
|
2
dist/npmts.plugins.d.ts
vendored
2
dist/npmts.plugins.d.ts
vendored
@ -5,7 +5,7 @@ import * as npmextra from 'npmextra';
|
||||
import * as projectinfo from 'projectinfo';
|
||||
import * as path from 'path';
|
||||
import * as smartanalytics from 'smartanalytics';
|
||||
import * as smartcli from 'smartcli';
|
||||
import * as smartcli from '@pushrocks/smartcli';
|
||||
import * as smarterror from 'smarterror';
|
||||
import * as smartfile from 'smartfile';
|
||||
import * as smartpath from 'smartpath';
|
||||
|
2
dist/npmts.plugins.js
vendored
2
dist/npmts.plugins.js
vendored
@ -14,7 +14,7 @@ const path = require("path");
|
||||
exports.path = path;
|
||||
const smartanalytics = require("smartanalytics");
|
||||
exports.smartanalytics = smartanalytics;
|
||||
const smartcli = require("smartcli");
|
||||
const smartcli = require("@pushrocks/smartcli");
|
||||
exports.smartcli = smartcli;
|
||||
const smarterror = require("smarterror");
|
||||
exports.smarterror = smarterror;
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmAccessLevell": "public"
|
||||
"npmAccessLevel": "public"
|
||||
}
|
||||
}
|
19
package.json
19
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/npmts",
|
||||
"version": "8.0.28",
|
||||
"version": "8.0.37",
|
||||
"description": "best practice npm TypeScript modules",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@ -8,6 +8,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "(npm run compile && npm run prepareTest && npm run setupCheck && npm run check && npm run checkVersion && npm run checkNoTest && npm run checkNoDocs)",
|
||||
"build": "npm test",
|
||||
"testShort": "(npm run compile && npm run check)",
|
||||
"prepareTest": "(rm -rf test/)",
|
||||
"compile": "(rm -rf dist/ && tsc)",
|
||||
@ -34,27 +35,27 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/gitzone/npmts#readme",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartcli": "^3.0.1",
|
||||
"@types/gulp-sourcemaps": "0.0.32",
|
||||
"@types/minimatch": "^3.0.1",
|
||||
"@types/through2": "^2.0.33",
|
||||
"beautylog": "^6.1.10",
|
||||
"depcheck": "^0.6.8",
|
||||
"depcheck": "^0.6.9",
|
||||
"early": "^2.1.1",
|
||||
"gulp-function": "^2.2.9",
|
||||
"gulp-sourcemaps": "^2.6.1",
|
||||
"gulp-typescript": "^4.0.1",
|
||||
"lodash": "^4.17.4",
|
||||
"gulp-typescript": "^4.0.2",
|
||||
"lodash": "^4.17.10",
|
||||
"npmextra": "^2.0.9",
|
||||
"projectinfo": "^3.0.4",
|
||||
"smartanalytics": "^2.0.9",
|
||||
"smartchok": "^1.0.11",
|
||||
"smartcli": "^2.0.9",
|
||||
"smartchok": "1.0.14",
|
||||
"smartcov": "^1.0.2",
|
||||
"smarterror": "^1.0.3",
|
||||
"smartfile": "^4.2.26",
|
||||
"smartgulp": "^1.0.6",
|
||||
"smartpath": "^3.2.8",
|
||||
"smartq": "^1.1.6",
|
||||
"smartq": "^1.1.8",
|
||||
"smartstream": "^1.0.10",
|
||||
"smartstring": "^2.0.28",
|
||||
"smartsystem": "^2.0.2",
|
||||
@ -62,9 +63,9 @@
|
||||
"tapbuffer": "^1.0.31",
|
||||
"through2": "^2.0.3",
|
||||
"tsn": "^2.0.15",
|
||||
"typescript": "^2.6.2"
|
||||
"typescript": "^2.8.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^9.4.6"
|
||||
"@types/node": "^10.0.3"
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +108,10 @@ let handleCoverageData = async (configArg: INpmtsConfig) => {
|
||||
return configArg;
|
||||
};
|
||||
|
||||
/**
|
||||
* run this module
|
||||
* @param configArg some config for how to run this module
|
||||
*/
|
||||
export let run = function(configArg: INpmtsConfig) {
|
||||
let done = q.defer<INpmtsConfig>();
|
||||
let config = configArg;
|
||||
|
@ -51,14 +51,14 @@ export let run = async () => {
|
||||
);
|
||||
plugins.beautylog.log('---------------------------------------------');
|
||||
let npmtsCli = new plugins.smartcli.Smartcli();
|
||||
npmtsCli
|
||||
.standardTask()
|
||||
.then(argvArg => {
|
||||
plugins.beautylog.info('npmts version: ' + npmtsProjectInfo.version);
|
||||
return NpmtsConfig.run(argvArg);
|
||||
})
|
||||
.then((configArg: NpmtsConfig.INpmtsConfig) => {
|
||||
|
||||
// build
|
||||
npmtsCli.addCommand('build').subscribe(
|
||||
async argvArg => {
|
||||
let done = q.defer();
|
||||
plugins.beautylog.info('npmts version: ' + npmtsProjectInfo.version);
|
||||
const configArg: NpmtsConfig.INpmtsConfig = await NpmtsConfig.run(argvArg);
|
||||
|
||||
plugins.beautylog.ora.start('loading additional modules...');
|
||||
NpmtsMods.modCompile
|
||||
.load()
|
||||
@ -93,13 +93,23 @@ export let run = async () => {
|
||||
.then(NpmtsShip.run);
|
||||
|
||||
return done.promise;
|
||||
})
|
||||
.catch(err => {
|
||||
},
|
||||
err => {
|
||||
if (err instanceof Error) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
// standard task
|
||||
npmtsCli.standardTask().subscribe(async argvArg => {
|
||||
await npmtsCli.trigger('build');
|
||||
});
|
||||
|
||||
// cli metadata
|
||||
npmtsCli.addVersion(npmtsProjectInfo.version);
|
||||
|
||||
// start parsing
|
||||
npmtsCli.startParse();
|
||||
return await done.promise;
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ export interface INpmtsConfig {
|
||||
}
|
||||
|
||||
export let run = function(argvArg) {
|
||||
let done = smartq.defer();
|
||||
let done = smartq.defer<INpmtsConfig>();
|
||||
let defaultConfig: INpmtsConfig = {
|
||||
argv: undefined,
|
||||
coverageTreshold: 70,
|
||||
|
@ -6,7 +6,7 @@ import * as npmextra from 'npmextra';
|
||||
import * as projectinfo from 'projectinfo';
|
||||
import * as path from 'path';
|
||||
import * as smartanalytics from 'smartanalytics';
|
||||
import * as smartcli from 'smartcli';
|
||||
import * as smartcli from '@pushrocks/smartcli';
|
||||
import * as smarterror from 'smarterror';
|
||||
import * as smartfile from 'smartfile';
|
||||
import * as smartpath from 'smartpath';
|
||||
|
4026
yarn-error.log
Normal file
4026
yarn-error.log
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user