Compare commits

...

41 Commits

Author SHA1 Message Date
2d34397b9b 1.0.25 2021-04-29 16:59:59 +00:00
2744e1a92b fix(core): update 2021-04-29 16:59:58 +00:00
b8987b7913 1.0.24 2021-04-26 08:30:02 +00:00
95ffb06e77 fix(core): update 2021-04-26 08:30:02 +00:00
71abbbb5f1 1.0.23 2021-04-21 09:25:32 +00:00
9dfa1a789e fix(core): update 2021-04-21 09:25:31 +00:00
c68ea1c8fd 1.0.22 2021-04-19 14:34:27 +00:00
8e943512f8 1.0.21 2021-04-19 14:22:42 +00:00
c010319076 fix(core): update 2021-04-19 14:22:42 +00:00
cf03e58c6f 1.0.20 2021-04-19 12:55:12 +00:00
d59875f23f fix(core): update 2021-04-19 12:55:11 +00:00
6b13e46947 1.0.19 2020-10-02 14:39:47 +00:00
096c38de9e fix(core): update 2020-10-02 14:39:46 +00:00
7292b45d33 1.0.18 2020-10-02 13:28:40 +00:00
3ddad53d29 fix(core): update 2020-10-02 13:28:39 +00:00
617b49aaba 1.0.17 2020-06-25 20:04:31 +00:00
2dcd93b431 fix(core): update 2020-06-25 20:04:30 +00:00
0e2dc83409 1.0.16 2020-06-25 20:03:53 +00:00
2cb227632f fix(core): update 2020-06-25 20:03:52 +00:00
d0f6e88388 1.0.15 2020-03-17 00:38:59 +00:00
e72a5cb4af fix(core): update 2020-03-17 00:38:58 +00:00
0d3292dd1e 1.0.14 2020-03-08 19:34:37 +00:00
54db436174 fix(core): update 2020-03-08 19:34:36 +00:00
7075d7b36f 1.0.13 2019-09-06 16:29:46 +02:00
98aca88b49 fix(core): update 2019-09-06 16:29:45 +02:00
5f49845138 1.0.12 2019-09-06 13:22:54 +02:00
1d5e94244b fix(core): update 2019-09-06 13:22:54 +02:00
7cc7c54587 1.0.11 2019-09-06 11:12:23 +02:00
24af38ed8b fix(core): update 2019-09-06 11:12:23 +02:00
96b21b57ce 1.0.10 2018-11-07 23:42:28 +01:00
11eb44bac9 1.0.9 2018-11-07 22:45:30 +01:00
c71a248c7d update 2018-11-07 22:45:25 +01:00
413ef378b6 1.0.8 2018-09-01 16:40:42 +02:00
79a3420aa5 fix(CI): update CI build 2018-09-01 16:40:42 +02:00
fa0d5af74e 1.0.7 2018-09-01 16:13:38 +02:00
8ce9b08153 fix(dependencies): update to latest versions 2018-09-01 16:13:37 +02:00
6832327643 1.0.6 2018-02-14 23:51:50 +01:00
376cbcc2ab update ci 2018-02-14 23:51:46 +01:00
26c7b0c69a update to not fail in offline mode 2018-02-14 23:51:08 +01:00
21100dbb32 1.0.5 2017-09-13 17:33:16 +02:00
152300819d update to work correctly 2017-09-13 17:33:07 +02:00
32 changed files with 12325 additions and 893 deletions

17
.gitignore vendored
View File

@ -1,5 +1,20 @@
.nogit/
node_modules/
# artifacts
coverage/
public/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_*/
# custom

View File

@ -1,38 +1,76 @@
# gitzone standard
image: hosttoday/ht-docker-node:npmci
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .yarn/
key: "$CI_BUILD_STAGE"
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- test
- release
- trigger
- pages
- security
- test
- release
- metadata
testLEGACY:
stage: test
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci test legacy
coverage: /\d+.?\d+?\%\s*coverage/
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
tags:
- docker
allow_failure: true
testLTS:
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci test lts
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testSTABLE:
testBuild:
stage: test
script:
- npmci test stable
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -40,32 +78,60 @@ testSTABLE:
release:
stage: release
script:
- npmci publish
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
- priv
trigger:
stage: trigger
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
image: hosttoday/ht-docker-node:npmci
stage: pages
stage: metadata
script:
- npmci command yarn global add npmpage
- npmci command npmpage
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command tsdoc
tags:
- lossless
- docker
- notpriv
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
- public
allow_failure: true

29
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -1,4 +0,0 @@
module.name: smartmodule
module.description: a smart description
module.author: Lossless GmbH
module.license: MIT

2
dist/index.d.ts vendored
View File

@ -1,2 +0,0 @@
export * from './smartnpm.classes.npmregistry';
export * from './smartnpm.classes.npmpackage';

8
dist/index.js vendored
View File

@ -1,8 +0,0 @@
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./smartnpm.classes.npmregistry"));
__export(require("./smartnpm.classes.npmpackage"));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLG9EQUE4QztBQUM5QyxtREFBNkMifQ==

View File

@ -1,32 +0,0 @@
export declare class NpmPackage {
name: string;
scope: string;
version: string;
description: string;
keywords: string[];
date: '2017-08-02T11:22:49.144Z';
links: {
npm: string;
homepage: string;
repository: string;
bugs: string;
};
author: {
name: 'Lossless GmbH';
};
publisher: {
username: 'gitzone';
email: 'npm@git.zone';
};
maintainers: any;
score: {
final: number;
detail: {
quality: number;
popularity: number;
maintenance: number;
};
};
searchScore: number;
constructor(descriptionArg: any);
}

View File

@ -1,24 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class NpmPackage {
constructor(descriptionArg) {
this.name = null;
this.scope = null;
this.version = null;
this.description = null;
this.keywords = null;
this.links = null;
this.author = null;
this.publisher = null;
this.maintainers = null;
this.score = null;
this.searchScore = null;
for (let key in descriptionArg) {
if (this[key] === null) {
this[key] = descriptionArg[key];
}
}
}
}
exports.NpmPackage = NpmPackage;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0uY2xhc3Nlcy5ucG1wYWNrYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRucG0uY2xhc3Nlcy5ucG1wYWNrYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUE7SUE4QkUsWUFBYSxjQUFjO1FBN0IzQixTQUFJLEdBQVcsSUFBSSxDQUFBO1FBQ25CLFVBQUssR0FBVyxJQUFJLENBQUE7UUFDcEIsWUFBTyxHQUFXLElBQUksQ0FBQTtRQUN0QixnQkFBVyxHQUFXLElBQUksQ0FBQTtRQUMxQixhQUFRLEdBQWEsSUFBSSxDQUFBO1FBRXpCLFVBQUssR0FLRCxJQUFJLENBQUE7UUFDUixXQUFNLEdBRUYsSUFBSSxDQUFBO1FBQ1IsY0FBUyxHQUVMLElBQUksQ0FBQTtRQUNSLGdCQUFXLEdBQVEsSUFBSSxDQUFBO1FBQ3ZCLFVBQUssR0FPRCxJQUFJLENBQUE7UUFDUixnQkFBVyxHQUFXLElBQUksQ0FBQTtRQUd4QixHQUFHLENBQUMsQ0FBQyxJQUFJLEdBQUcsSUFBSSxjQUFjLENBQUMsQ0FBQyxDQUFDO1lBQy9CLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxJQUFJLENBQUMsQ0FBQyxDQUFDO2dCQUN2QixJQUFJLENBQUMsR0FBRyxDQUFDLEdBQUcsY0FBYyxDQUFDLEdBQUcsQ0FBQyxDQUFBO1lBQ2pDLENBQUM7UUFDSCxDQUFDO0lBQ0gsQ0FBQztDQUNGO0FBckNELGdDQXFDQyJ9

View File

@ -1,6 +0,0 @@
import { ISearchObject } from './smartnpm.interfaces';
import { NpmPackage } from './smartnpm.classes.npmpackage';
export declare class NpmRegistry {
private searchDomain;
search(searchObjectArg: ISearchObject): Promise<NpmPackage[]>;
}

View File

@ -1,94 +0,0 @@
"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 plugins = require("./smartnpm.plugins");
// classes
const smartnpm_classes_npmpackage_1 = require("./smartnpm.classes.npmpackage");
class NpmRegistry {
constructor() {
this.searchDomain = 'https://api.npms.io/v2/search?q=';
}
search(searchObjectArg) {
return __awaiter(this, void 0, void 0, function* () {
let searchString = '';
let addToSearchString = (addStringArg) => {
searchString = `${searchString}+${addStringArg}`;
};
// name
if (searchObjectArg.name) {
searchString = `${searchObjectArg.name}`;
}
// metadata
if (searchObjectArg.author) {
addToSearchString(`author:${searchObjectArg.author}`);
}
if (searchObjectArg.maintainer) {
addToSearchString(`maintainer:${searchObjectArg.maintainer}`);
}
if (searchObjectArg.scope) {
addToSearchString(`scope:${searchObjectArg.scope}`);
}
// status
if (searchObjectArg.deprecated) {
if (searchObjectArg.deprecated === true) {
addToSearchString(`is:deprecated`);
}
else {
addToSearchString(`not:deprecated`);
}
}
if (searchObjectArg.unstable) {
if (searchObjectArg.unstable === true) {
addToSearchString(`is:unstable`);
}
else {
addToSearchString(`not:unstable`);
}
}
if (searchObjectArg.insecure) {
if (searchObjectArg.insecure === true) {
addToSearchString(`is:insecure`);
}
else {
addToSearchString(`not:insecure`);
}
}
// search behaviour
if (searchObjectArg.boostExact) {
addToSearchString(`boost-exact:${searchObjectArg.boostExact}`);
}
if (searchObjectArg.scoreEffect) {
addToSearchString(`score-effect:${searchObjectArg.scoreEffect}`);
}
// analytics
if (searchObjectArg.qualityWeight) {
addToSearchString(`author:${searchObjectArg.qualityWeight}`);
}
if (searchObjectArg.popularityWeight) {
addToSearchString(`author:${searchObjectArg.popularityWeight}`);
}
if (searchObjectArg.maintenanceWeight) {
addToSearchString(`author:${searchObjectArg.maintenanceWeight}`);
}
plugins.beautylog.log(`Search on npm for ${plugins.beautycolor.coloredString(searchString, 'pink')}`);
let response = (yield plugins.smartrequest.get(this.searchDomain + searchString, {}));
let body = response.body;
// lets create the response
let packageArray = [];
for (let packageArg of body.results) {
let localPackage = new smartnpm_classes_npmpackage_1.NpmPackage(packageArg.package);
packageArray.push(localPackage);
}
return packageArray;
});
}
}
exports.NpmRegistry = NpmRegistry;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0uY2xhc3Nlcy5ucG1yZWdpc3RyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bnBtLmNsYXNzZXMubnBtcmVnaXN0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDhDQUE2QztBQUs3QyxVQUFVO0FBQ1YsK0VBQTBEO0FBRTFEO0lBQUE7UUFDVSxpQkFBWSxHQUFHLGtDQUFrQyxDQUFBO0lBOEQzRCxDQUFDO0lBN0RPLE1BQU0sQ0FBRSxlQUE4Qjs7WUFDMUMsSUFBSSxZQUFZLEdBQUcsRUFBRSxDQUFBO1lBQ3JCLElBQUksaUJBQWlCLEdBQUcsQ0FBQyxZQUFvQjtnQkFDM0MsWUFBWSxHQUFHLEdBQUcsWUFBWSxJQUFJLFlBQVksRUFBRSxDQUFBO1lBQ2xELENBQUMsQ0FBQTtZQUVELE9BQU87WUFDUCxFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztnQkFBQyxZQUFZLEdBQUcsR0FBRyxlQUFlLENBQUMsSUFBSSxFQUFFLENBQUE7WUFBQyxDQUFDO1lBRXRFLFdBQVc7WUFDWCxFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztnQkFBQyxpQkFBaUIsQ0FBQyxVQUFVLGVBQWUsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFBO1lBQUMsQ0FBQztZQUNyRixFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztnQkFBQyxpQkFBaUIsQ0FBQyxjQUFjLGVBQWUsQ0FBQyxVQUFVLEVBQUUsQ0FBQyxDQUFBO1lBQUMsQ0FBQztZQUNqRyxFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztnQkFBQyxpQkFBaUIsQ0FBQyxTQUFTLGVBQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFBO1lBQUMsQ0FBQztZQUVsRixTQUFTO1lBQ1QsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7Z0JBQy9CLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxVQUFVLEtBQUssSUFBSSxDQUFDLENBQUMsQ0FBQztvQkFDeEMsaUJBQWlCLENBQUMsZUFBZSxDQUFDLENBQUE7Z0JBQ3BDLENBQUM7Z0JBQUMsSUFBSSxDQUFDLENBQUM7b0JBQ04saUJBQWlCLENBQUMsZ0JBQWdCLENBQUMsQ0FBQTtnQkFDckMsQ0FBQztZQUNILENBQUM7WUFDRCxFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQztnQkFDN0IsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFFBQVEsS0FBSyxJQUFJLENBQUMsQ0FBQyxDQUFDO29CQUN0QyxpQkFBaUIsQ0FBQyxhQUFhLENBQUMsQ0FBQTtnQkFDbEMsQ0FBQztnQkFBQyxJQUFJLENBQUMsQ0FBQztvQkFDTixpQkFBaUIsQ0FBQyxjQUFjLENBQUMsQ0FBQTtnQkFDbkMsQ0FBQztZQUNILENBQUM7WUFDRCxFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQztnQkFDN0IsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFFBQVEsS0FBSyxJQUFJLENBQUMsQ0FBQyxDQUFDO29CQUN0QyxpQkFBaUIsQ0FBQyxhQUFhLENBQUMsQ0FBQTtnQkFDbEMsQ0FBQztnQkFBQyxJQUFJLENBQUMsQ0FBQztvQkFDTixpQkFBaUIsQ0FBQyxjQUFjLENBQUMsQ0FBQTtnQkFDbkMsQ0FBQztZQUNILENBQUM7WUFFRCxtQkFBbUI7WUFDbkIsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsZUFBZSxlQUFlLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFDbEcsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsZ0JBQWdCLGVBQWUsQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFBO1lBQUMsQ0FBQztZQUVyRyxZQUFZO1lBQ1osRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsVUFBVSxlQUFlLENBQUMsYUFBYSxFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFDbkcsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztnQkFBQyxpQkFBaUIsQ0FBQyxVQUFVLGVBQWUsQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDLENBQUE7WUFBQyxDQUFDO1lBQ3pHLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsVUFBVSxlQUFlLENBQUMsaUJBQWlCLEVBQUUsQ0FBQyxDQUFBO1lBQUMsQ0FBQztZQUUzRyxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxxQkFBcUIsT0FBTyxDQUFDLFdBQVcsQ0FBQyxhQUFhLENBQUMsWUFBWSxFQUFFLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQTtZQUVyRyxJQUFJLFFBQVEsR0FBRyxDQUFDLE1BQU0sT0FBTyxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLFlBQVksR0FBRyxZQUFZLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQTtZQUNyRixJQUFJLElBQUksR0FBUSxRQUFRLENBQUMsSUFBSSxDQUFBO1lBRTdCLDJCQUEyQjtZQUMzQixJQUFJLFlBQVksR0FBaUIsRUFBRSxDQUFBO1lBRW5DLEdBQUcsQ0FBQyxDQUFDLElBQUksVUFBVSxJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO2dCQUNwQyxJQUFJLFlBQVksR0FBRyxJQUFJLHdDQUFVLENBQUMsVUFBVSxDQUFDLE9BQU8sQ0FBQyxDQUFBO2dCQUNyRCxZQUFZLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFBO1lBQ2pDLENBQUM7WUFFRCxNQUFNLENBQUMsWUFBWSxDQUFBO1FBQ3JCLENBQUM7S0FBQTtDQUNGO0FBL0RELGtDQStEQyJ9

View File

@ -1,15 +0,0 @@
export interface ISearchObject {
name?: string;
author?: string;
maintainer?: string;
scope?: string;
keywords?: string[];
deprecated?: boolean;
unstable?: boolean;
insecure?: boolean;
boostExact?: boolean;
scoreEffect?: number;
qualityWeight?: number;
popularityWeight?: number;
maintenanceWeight?: number;
}

View File

@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0uaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bnBtLmludGVyZmFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

View File

@ -1,5 +0,0 @@
import 'typings-global';
import * as beautycolor from 'beautycolor';
import * as beautylog from 'beautylog';
import * as smartrequest from 'smartrequest';
export { beautycolor, beautylog, smartrequest };

View File

@ -1,10 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global");
const beautycolor = require("beautycolor");
exports.beautycolor = beautycolor;
const beautylog = require("beautylog");
exports.beautylog = beautylog;
const smartrequest = require("smartrequest");
exports.smartrequest = smartrequest;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0ucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bnBtLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFFdkIsMkNBQTBDO0FBS3hDLGtDQUFXO0FBSmIsdUNBQXNDO0FBS3BDLDhCQUFTO0FBSlgsNkNBQTRDO0FBSzFDLG9DQUFZIn0=

View File

@ -1,7 +1,17 @@
{
"npmci": {
"globalNpmTools": [
"npmts"
]
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartnpm",
"shortDescription": "interface with npm to retrieve package information",
"npmPackagename": "@pushrocks/smartnpm",
"license": "MIT"
}
}
}

11464
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,48 @@
{
"name": "smartnpm",
"version": "1.0.4",
"name": "@pushrocks/smartnpm",
"version": "1.0.25",
"private": false,
"description": "interface with npm to retrieve package information",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(npmts)"
"test": "(tstest test/)",
"build": "(tsbuild --web)"
},
"devDependencies": {
"tapbundle": "^1.0.13"
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^14.14.41",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"beautycolor": "^1.0.9",
"beautylog": "^6.1.10",
"smartrequest": "^1.0.6",
"typings-global": "^1.0.16"
}
"@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/levelcache": "^1.0.9",
"@pushrocks/smartarchive": "^2.0.4",
"@pushrocks/smartfile": "^8.0.10",
"@pushrocks/smartpromise": "^3.1.5",
"@pushrocks/smartrequest": "^1.1.51",
"@pushrocks/smartversion": "^2.0.7",
"package-json": "^6.5.0"
},
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}

0
qenv.yml Normal file
View File

View File

@ -1,29 +1,39 @@
# smartnpm
# @pushrocks/smartnpm
interface with npm to retrieve package information
## Availabililty
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartnpm)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartnpm)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartnpm)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartnpm/)
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartnpm)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartnpm)
* [github.com (source mirror)](https://github.com/pushrocks/smartnpm)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartnpm/)
## Status for master
[![build status](https://GitLab.com/pushrocks/smartnpm/badges/master/build.svg)](https://GitLab.com/pushrocks/smartnpm/commits/master)
[![coverage report](https://GitLab.com/pushrocks/smartnpm/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartnpm/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/smartnpm.svg)](https://www.npmjs.com/package/smartnpm)
[![Dependency Status](https://david-dm.org/pushrocks/smartnpm.svg)](https://david-dm.org/pushrocks/smartnpm)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/smartnpm/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/smartnpm/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/smartnpm/badges/code.svg)](https://www.bithound.io/github/pushrocks/smartnpm)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartnpm/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartnpm/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartnpm)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartnpm)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartnpm)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartnpm)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartnpm)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage
Use TypeScript for best in class instellisense.
For further information read the linked docs at the top of this README.
## Contribution
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
For further information read the linked docs at the top of this readme.
> MIT licensed | **&copy;** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,22 +1,195 @@
import { expect, tap } from 'tapbundle'
import * as smartnpm from '../ts/index'
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartnpm from '../ts/index';
import { NpmRegistry } from '../ts/index';
let testRegistry: smartnpm.NpmRegistry
let testPackage: smartnpm.NpmPackage
let npmRegistry: smartnpm.NpmRegistry;
let verdaccioRegistry: smartnpm.NpmRegistry;
let testPackage: smartnpm.NpmPackage;
// lets test things with the standard npm registry
tap.test('should create valid instances', async () => {
testRegistry = new smartnpm.NpmRegistry()
expect(testRegistry).to.be.instanceof(smartnpm.NpmRegistry)
npmRegistry = new smartnpm.NpmRegistry();
expect(npmRegistry).to.be.instanceof(smartnpm.NpmRegistry);
testPackage = new smartnpm.NpmPackage({})
expect(testPackage).to.be.instanceof(smartnpm.NpmPackage)
})
testPackage = new smartnpm.NpmPackage(npmRegistry);
expect(testPackage).to.be.instanceof(smartnpm.NpmPackage);
});
tap.test('should produce a valid search string', async () => {
let packages = await testRegistry.search({
name: 'npmts'
})
expect(packages[0].name).to.equal('npmts')
})
tap.test('should produce a valid search string and this return npmts', async () => {
const packages = await npmRegistry.searchOnNpm({
name: '@pushrocks/smartupdate',
});
expect(packages[0].name).to.equal('@pushrocks/smartupdate');
});
tap.start()
// lets test things with the verdaccio registry
tap.test('should create a verdaccio registry', async () => {
verdaccioRegistry = new NpmRegistry({
npmRegistryUrl: 'https://verdaccio.lossless.one',
});
expect(verdaccioRegistry).to.be.instanceOf(smartnpm.NpmRegistry);
});
tap.test('should get package from verdaccio', async () => {
const npmPackage = await verdaccioRegistry.getPackageInfo('@pushrocks/smartupdate');
console.log(npmPackage);
expect(npmPackage.license).to.equal('MIT');
});
tap.test('should get a specific file from a package', async () => {
const bundleFile = await verdaccioRegistry.getFileFromPackage(
'@pushrocks/websetup',
'ts/index.ts'
);
console.log(bundleFile.contentBuffer.toString());
});
tap.start();
const hi = {
_id: '@pushrocks/smartversion',
_rev: '2-93b6e6391f7209fcbd1db76c92164777',
name: '@pushrocks/smartversion',
'dist-tags': { latest: '2.0.4' },
versions: {
'2.0.0': {
name: '@pushrocks/smartversion',
version: '2.0.0',
private: false,
description: 'handle semver with easy',
main: 'dist/index.js',
typings: 'dist/index.d.ts',
author: { name: 'Lossless GmbH' },
license: 'MIT',
scripts: { test: '(tstest test/)', build: '(tsbuild)' },
devDependencies: {
'@gitzone/tsbuild': '^2.0.22',
'@gitzone/tsrun': '^1.1.12',
'@gitzone/tstest': '^1.0.15',
'@pushrocks/tapbundle': '^3.0.5',
'@types/node': '^10.9.4',
},
dependencies: { '@types/semver': '^5.5.0', semver: '^5.5.1' },
gitHead: 'df6b1a9730551884aa4c4fae5577b2b11058f508',
_id: '@pushrocks/smartversion@2.0.0',
_npmVersion: '6.2.0',
_nodeVersion: '10.9.0',
_npmUser: { name: 'lossless', email: 'npm@lossless.com' },
dist: {
integrity:
'sha512-+loQHivWzEO39X/PEzi+UOptDveez0n8Eu/bDIht55wkjhav33HkNjab8MeK/g76gOia3ZHoPyqLTvD4yvXDiA==',
shasum: 'd663a39d77950de1a743adb0c2eb00e325d230df',
tarball: 'https://registry.npmjs.org/@pushrocks/smartversion/-/smartversion-2.0.0.tgz',
fileCount: 12,
unpackedSize: 12011,
'npm-signature':
'-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbi7zUCRA9TVsSAnZWagAAigcP/0gRmizQkzjE9Gw8gCeK\n56m41mJQmtl6tRvYVyVGuqfiCaiLvB/B0fkKt2r/MNsJVjC372ayWKya4nev\nTOLSg+g4e9gnkyn8i1OFVE5kr8C4MvLc6P771v2UDXJF5c3pYq6i5fSyGz/s\ngpOuy/KxyVo5wH16yasGWDq9Gl58yp+7vZKR6cc+7Rlq0UhyezhDBRBiKkB0\nk6Y/4J4KWK7CmO+3Y/QUPGBxGmoUHNSiS5cz8vWbycRP7pT11asksgxNPGdv\nyeW/VNVLZkemwrXhSuYKM0DK6aZpjJxk3A8OAyDuHGfZDzAmyaRsfUL84Mgl\nlN1S92CCfuAOyA1os8rsrJU133TV8zVTck3IdmO4AqJ8aB3WNkmNYE5IHxWf\nnmhUUo1Rv/M5fJniTHOBGaeOahFqEp+8URNW1zylC3NoFwiUon1lvnMp1Dd1\nczGPWvQ12ZAeMOR/qpO4RRzTdD45iuvvj2NRhZZN1pthnhUi8XpgMIDuCODT\n2Srew7JBkdfX3F1q/LGgk9e+RYCWTlLPgmzOBUH39ljpfa70liAH5sU+yyfk\nFLfVQlLwWAEwRnkm4j/l/xBWJcwqVG2nDOOzScfYVG3BXSBHo4PfywhFdbnc\nQ3MMrJsrJPhppfMJEEQWlQSkNSCCEV7DDPeH4oK9tKRUdmDaKJpnb6tVZqzM\nBWac\r\n=0NZU\r\n-----END PGP SIGNATURE-----\r\n',
},
maintainers: [{ name: 'lossless', email: 'npm@lossless.com' }],
directories: {},
_npmOperationalInternal: {
host: 's3://npm-registry-packages',
tmp: 'tmp/smartversion_2.0.0_1535884499821_0.9273118882229912',
},
_hasShrinkwrap: false,
},
'2.0.3': {
name: '@pushrocks/smartversion',
version: '2.0.3',
private: false,
description: 'handle semver with easy',
main: 'dist/index.js',
typings: 'dist/index.d.ts',
author: { name: 'Lossless GmbH' },
license: 'MIT',
scripts: { test: '(tstest test/)', build: '(tsbuild)' },
devDependencies: {
'@gitzone/tsbuild': '^2.1.17',
'@gitzone/tsrun': '^1.2.8',
'@gitzone/tstest': '^1.0.24',
'@pushrocks/tapbundle': '^3.0.13',
'@types/node': '^12.7.5',
},
dependencies: { '@types/semver': '^6.0.2', semver: '^6.3.0' },
gitHead: 'e364545d0ef6ef7fa1b8467fb48d2b67f09f2d07',
_id: '@pushrocks/smartversion@2.0.3',
_nodeVersion: '12.10.0',
_npmVersion: '6.11.3',
dist: {
integrity:
'sha512-nhauxBGMxjJtXj+k1Z7H2yB184ZhWhU0NKN5ATwlgfEM4zbbZNjCFRLVg/7sOXvbS2b0QU1aStRQ+6QGC2hW4A==',
shasum: '9272da89412556946c5a3d5ba3b6a253154de6ae',
tarball: 'https://registry.npmjs.org/@pushrocks/smartversion/-/smartversion-2.0.3.tgz',
fileCount: 9,
unpackedSize: 9127,
'npm-signature':
'-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeRYfCRA9TVsSAnZWagAApCkP/RrWk6+hxpoTpflJ65x/\nm05egDhfyTs2BZKArkSnvtc+q6Fo3iDlumqiv3HRyHwDBFLgK5gAOgU0jyqW\nmhwumGMfKT4bzG65iU2z6FgS+RhEh3JaKzjgPohr1oEaLOaaKL0S9+Ybxt6u\nkwv4CgnmzQ/6zVZYJ+qFbV0v+n6iiuIbOTS8j7+X0nA/DkvvZ1Nwhng++vH8\nLm8lT78F/vcxHkSf2RfC6kabhVF+vVRBazq/cI4OQ+xjBQC2y+6YxEq/4Hsz\nKZBF9u2ZcyeI7NEuo1FaojvqvLX3lPxi9Xfw2PSO2iri+DS8KIOVgzwJ+9ih\nb1h/vpoFv8dbhZzkqSs/4rab3rvQYqy7AgvslI8mEeOQk/BhrjxQIvG0re3H\nzc0iWlNp6W3Lsf3/gmKGZbhl39ZgQxInfWLNW60ghqzUq85gyAwPDRb2yxez\nP7bMT0qb/bQSmAa63/q3qE+JAjZFQFDB6Pj6sO1p3csv0T+7mRj9T/4pSc8B\nv5rD9t0mVlAZXwmz3zDhpomct3bhUlAidw7tcax8sr9SowA2hqY3TB1uJ52y\nKPDVMQZ4Voi7kft+icYoVm1XkQMwmmedAoTbS49s52wW6dm4CWmnlBOZzzqN\neT4Q1INrTUXaMxRv/zxguk7TV8xi6gRf+EBDtnEKukITWTvvPsGq4SS9toRa\n9L6F\r\n=yVBx\r\n-----END PGP SIGNATURE-----\r\n',
},
maintainers: [{ name: 'lossless', email: 'npm@lossless.com' }],
_npmUser: { name: 'lossless', email: 'npm@lossless.com' },
directories: {},
_npmOperationalInternal: {
host: 's3://npm-registry-packages',
tmp: 'tmp/smartversion_2.0.3_1568216607132_0.9216415895294796',
},
_hasShrinkwrap: false,
},
'2.0.4': {
name: '@pushrocks/smartversion',
version: '2.0.4',
private: false,
description: 'handle semver with easy',
main: 'dist/index.js',
typings: 'dist/index.d.ts',
author: { name: 'Lossless GmbH' },
license: 'MIT',
scripts: { test: '(tstest test/)', build: '(tsbuild)' },
devDependencies: {
'@gitzone/tsbuild': '^2.1.17',
'@gitzone/tsrun': '^1.2.8',
'@gitzone/tstest': '^1.0.24',
'@pushrocks/tapbundle': '^3.0.13',
'@types/node': '^12.7.5',
tslint: '^5.20.0',
'tslint-config-prettier': '^1.18.0',
},
dependencies: { '@types/semver': '^6.0.2', semver: '^6.3.0' },
gitHead: 'bb8e7cb608f3a116e7bfb0b52dd5ce9a7c4eaec1',
_id: '@pushrocks/smartversion@2.0.4',
_nodeVersion: '12.10.0',
_npmVersion: '6.11.3',
dist: {
integrity:
'sha512-LrtaWRn1DD2zIUr8nVAsKwZ+Y55TFIVZ0z3xjwAQ46SoiTrFWooeQ2Xw18DqsEo1cEqMZyGAskaJkOaRkXHtUA==',
shasum: '7c6297f9c596e729001c2b6e2a8fa72c40ed42a9',
tarball: 'https://registry.npmjs.org/@pushrocks/smartversion/-/smartversion-2.0.4.tgz',
fileCount: 9,
unpackedSize: 9263,
'npm-signature':
'-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeRazCRA9TVsSAnZWagAAxX0P/j12DYB5zjZQh3/IpY1t\n+vzvLmTgn2b0lhheLxUX9EYMW+cethYbd8Q8p/SOsytfB2IHCKBdkpE5ZAIK\nsv7d/myZaihZ9RHCd/UQOj99b/KfdbN/7ndtEL7V4hmcNyWUmebeRsxMhxZ5\nLRvWMZiNsgdXbKxs6JpId3iuSFuTxRgL41smiklcW0nGRp9uMieN8TC3xmOW\nsia6JcvGNQT1/LD9XN6l9U/ZWfzOMaEtjv4Hd9XzOVv0SMYT5Nyv3JQV2Jd5\nc5G5aGZe0QXSB9LwnNUcXC3mrZ9+SvmqpECcV2BTJ+JJlzp4Pny51r2nPyC6\nypdsfTfDzAL6BIq433OScEyjRMcufLC+caGXPCjUhtPW6wlf9kTFiRd2L3uk\nWhg2LmFhL4bHz67ty2wAy8XlLYOS/QFOZLEZr7bZDhINkkqR5RQd5RfkMJ6Q\n0skcsspq69tWKrgY3Uh6aK30Z+g7C4V/KGfquz6EsET9xP+7MRTVcd+FLfC1\ndfCcfe3/l49oXbCPwApH9X8ETc3HDJuSRdfVV7PVsEzbOwN4sqTIS9vAHXDN\ncjAmrhbZkhA7VD4PNjhEov1veo/UOoNB7xlN4JLuRZ40SqCSr4akVnNImUDc\nCg+b16mZhlVpLNgjVjG9rgDD7zCn+zn9EZTsq3/qL4jEcf4JY+T2YKmf7AMb\nhmej\r\n=eqby\r\n-----END PGP SIGNATURE-----\r\n',
},
maintainers: [{ name: 'lossless', email: 'npm@lossless.com' }],
_npmUser: { name: 'lossless', email: 'npm@lossless.com' },
directories: {},
_npmOperationalInternal: {
host: 's3://npm-registry-packages',
tmp: 'tmp/smartversion_2.0.4_1568216754658_0.06886864906713819',
},
_hasShrinkwrap: false,
},
},
time: {
created: '2018-09-02T10:34:59.735Z',
'2.0.0': '2018-09-02T10:34:59.913Z',
modified: '2019-09-11T15:45:58.404Z',
'2.0.3': '2019-09-11T15:43:27.294Z',
'2.0.4': '2019-09-11T15:45:54.786Z',
},
maintainers: [{ name: 'lossless', email: 'npm@lossless.com' }],
description: 'handle semver with easy',
author: { name: 'Lossless GmbH' },
license: 'MIT',
readme:
'# @pushrocks/smartversion\nhandle semver with easy\n\n## Availabililty and Links\n* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartversion)\n* [gitlab.com (source)](https://gitlab.com/pushrocks/smartversion)\n* [github.com (source mirror)](https://github.com/pushrocks/smartversion)\n* [docs (typedoc)](https://pushrocks.gitlab.io/smartversion/)\n\n## Status for master\n[![build status](https://gitlab.com/pushrocks/smartversion/badges/master/build.svg)](https://gitlab.com/pushrocks/smartversion/commits/master)\n[![coverage report](https://gitlab.com/pushrocks/smartversion/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartversion/commits/master)\n[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartversion.svg)](https://www.npmjs.com/package/@pushrocks/smartversion)\n[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartversion/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartversion)\n[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)\n[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)\n\n## Usage\n\nUse TypeScript for best in class instellisense.\n\nFor further information read the linked docs at the top of this readme.\n\n> MIT licensed | **&copy;** [Lossless GmbH](https://lossless.gmbh)\n| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)\n\n[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)\n',
readmeFilename: 'readme.md',
};

View File

@ -1,4 +1,4 @@
import * as plugins from './smartnpm.plugins'
import * as plugins from './smartnpm.plugins';
export * from './smartnpm.classes.npmregistry'
export * from './smartnpm.classes.npmpackage'
export * from './smartnpm.classes.npmregistry';
export * from './smartnpm.classes.npmpackage';

View File

@ -1,40 +1,159 @@
import * as plugins from './smartnpm.plugins'
import * as plugins from './smartnpm.plugins';
import { NpmRegistry } from './smartnpm.classes.npmregistry';
import { PackageDisttag } from './smartnpm.classes.packagedisttag';
import { PackageVersion, IVersionData } from './smartnpm.classes.packageversion';
export class NpmPackage {
name: string = null
scope: string = null
version: string = null
description: string = null
keywords: string[] = null
date: '2017-08-02T11:22:49.144Z'
links: {
npm: string
homepage: string
repository: string
bugs: string
} = null
author: {
name: 'Lossless GmbH'
} = null
publisher: {
username: 'gitzone', email: 'npm@git.zone'
} = null
maintainers: any = null
score: {
final: number,
detail: {
quality: number,
popularity: number,
maintenance: number
public static async createFromFullMetadataAndVersionData(
npmRegistryArg: NpmRegistry,
fullMetadataArg: plugins.packageJson.FullMetadata,
versionsDataArg: {
name: string;
'dist-tags': { [key: string]: string };
versions: { [key: string]: IVersionData };
}
} = null
searchScore: number = null
constructor (descriptionArg) {
for (let key in descriptionArg) {
if (this[key] === null) {
this[key] = descriptionArg[key]
}
) {
const npmPackage = new NpmPackage(npmRegistryArg);
Object.assign(npmPackage, fullMetadataArg);
npmPackage.allVersions = [];
npmPackage.allDistTags = [];
for (const versionArg of Object.keys(versionsDataArg.versions)) {
const packageVersion = PackageVersion.createFromVersionData(
versionsDataArg.versions[versionArg]
);
npmPackage.allVersions.push(packageVersion);
}
for (const distTagArg of Object.keys(versionsDataArg['dist-tags'])) {
const packageDistTag = new PackageDisttag(
distTagArg,
versionsDataArg['dist-tags'][distTagArg]
);
npmPackage.allDistTags.push(packageDistTag);
}
return npmPackage;
}
// INSTANCE
public name: string = null;
public scope: string = null;
public version: string = null;
public allVersions: PackageVersion[];
public allDistTags: PackageDisttag[];
public description: string = null;
public keywords: string[] = null;
public date: string;
public license: string;
public links: {
npm: string;
homepage: string;
repository: string;
bugs: string;
};
public author: {
name: 'Lossless GmbH';
};
public publisher: {
username: 'gitzone';
email: 'npm@git.zone';
};
public maintainers: any = null;
public dist: {
integrity: string;
shasum: string;
tarball: string;
};
public score: {
final: number;
detail: {
quality: number;
popularity: number;
maintenance: number;
};
} = null;
public searchScore: number = null;
public npmRegistryRef: NpmRegistry;
constructor(npmRegistryArg: NpmRegistry) {
this.npmRegistryRef = npmRegistryArg;
}
/**
* saves the package to disk
*/
public async saveToDisk(targetDir: string) {
const smartarchiveInstance = new plugins.smartarchive.SmartArchive();
await smartarchiveInstance.extractArchiveFromUrlToFs(this.dist.tarball, targetDir);
}
/**
* saves the complete package to cache
*/
public async saveToCache() {}
/**
* get file from package
*/
public async getFileFromPackage(
filePath: string,
optionsArg?: {
distTag?: string;
version?: string;
}
): Promise<plugins.smartfile.Smartfile> {
const done = plugins.smartpromise.defer<plugins.smartfile.Smartfile>();
const smartarchiveInstance = new plugins.smartarchive.SmartArchive();
let tarballUrl = this.dist.tarball;
if (optionsArg && (optionsArg.version || optionsArg.distTag)) {
if (optionsArg.distTag && optionsArg.version) {
throw new Error('Please either sepcify version OR disttag, not both.');
}
let targetVersion: plugins.smartversion.SmartVersion;
if (optionsArg.distTag) {
const targetDistTag = this.allDistTags.find((distTag) => {
return distTag.name === optionsArg.distTag;
});
if (targetDistTag) {
targetVersion = new plugins.smartversion.SmartVersion(targetDistTag.targetVersion);
}
} else {
const smartversion = plugins.smartversion.SmartVersion.fromFuzzyString(optionsArg.version);
}
// lets find the best matching release
const versionStrings = this.allVersions.map((packageVersion) => packageVersion.version);
const bestMatchingVersion = targetVersion.getBestMatch(versionStrings);
if (!bestMatchingVersion) {
return null;
}
tarballUrl = this.allVersions.find(
(packageVersion) => packageVersion.version === bestMatchingVersion
).dist.tarball;
}
const fileObservable = await smartarchiveInstance.extractArchiveFromUrlToObservable(tarballUrl);
const wantedFilePath = plugins.path.join('package', filePath);
const subscription = fileObservable.subscribe(
(fileArg) => {
if (fileArg.path === wantedFilePath) {
// lets care about caching
// lets resolve with the wanted file
done.resolve(fileArg);
subscription.unsubscribe();
}
},
(err) => {
console.log(err);
},
() => {
done.resolve(null);
subscription.unsubscribe();
}
);
return done.promise;
}
/**
* updates the package with information from the registry
*/
update() {}
}

View File

@ -1,72 +1,188 @@
import * as plugins from './smartnpm.plugins'
import * as plugins from './smartnpm.plugins';
import * as paths from './smartnpm.paths';
// interfaces
import { ISearchObject } from './smartnpm.interfaces'
import { ISearchObject } from './smartnpm.interfaces';
// classes
import { NpmPackage } from './smartnpm.classes.npmpackage'
import { NpmPackage } from './smartnpm.classes.npmpackage';
import { RegistryCache } from './smartnpm.classes.registrycache';
export interface INpmRegistryConstructorOptions {
npmRegistryUrl?: string;
}
export class NpmRegistry {
private searchDomain = 'https://api.npms.io/v2/search?q='
async search (searchObjectArg: ISearchObject) {
let searchString = ''
let addToSearchString = (addStringArg: string) => {
searchString = `${searchString}+${addStringArg}`
public options: INpmRegistryConstructorOptions;
public registryCache: RegistryCache;
private searchDomain = 'https://api.npms.io/v2/search?q=';
constructor(optionsArg: INpmRegistryConstructorOptions = {}) {
const defaultOptions: INpmRegistryConstructorOptions = {
npmRegistryUrl: 'https://registry.npmjs.org',
};
this.options = {
...defaultOptions,
...optionsArg,
};
this.registryCache = new RegistryCache(this);
}
/**
* gets info about a package
* @param packageName
*/
public async getPackageInfo(packageName: string): Promise<NpmPackage> {
const fullMetadata = await plugins.packageJson(packageName, {
registryUrl: this.options.npmRegistryUrl,
fullMetadata: true,
});
const versionData = await plugins.packageJson(packageName, {
registryUrl: this.options.npmRegistryUrl,
allVersions: true
});
const npmPackage = await NpmPackage.createFromFullMetadataAndVersionData(this, fullMetadata, versionData as any);
return npmPackage;
}
/**
* saves a package to disk
* @param packageName
* @param targetDir
*/
public async savePackageToDisk(packageName: string, targetDir: string): Promise<void> {
plugins.smartfile.fs.ensureDirSync(paths.nogitDir);
const npmPackage = await this.getPackageInfo(packageName);
await npmPackage.saveToDisk(targetDir);
}
/**
* gets a file from a package as Smartfile
*/
public async getFileFromPackage(packageNameArg: string, filePath: string, optionsArg?: {
distTag?: string;
version?: string;
}): Promise<plugins.smartfile.Smartfile> {
const fileId = `${this.options.npmRegistryUrl}//+//${packageNameArg}//+//${filePath}//+//${optionsArg?.distTag || optionsArg?.version}`;
const cachedFile: plugins.smartfile.Smartfile = await this.registryCache.getCachedFile(fileId);
if (!cachedFile) {
const npmPackage = await this.getPackageInfo(packageNameArg);
const fileResult = await npmPackage.getFileFromPackage(filePath, optionsArg);
this.registryCache.cacheSmartFile(fileId, fileResult);
return fileResult;
} else {
return cachedFile;
}
}
public async getPackageAsSmartfileVirtualDir(packageNameArg: string): Promise<plugins.smartfile.VirtualDirectory> {
/**
* TODO: rewrite as memory only
*/
const baseDir = plugins.path.join(paths.nogitDir, packageNameArg.replace('/', '__'));
await plugins.smartfile.fs.ensureDir(baseDir);
await this.savePackageToDisk(packageNameArg, baseDir);
const virtualDir = await plugins.smartfile.VirtualDirectory.fromFsDirPath(baseDir);
await plugins.smartfile.fs.remove(baseDir);
return virtualDir;
}
/**
* searches for a package on npm
* @param searchObjectArg
*/
public async searchOnNpm(searchObjectArg: ISearchObject) {
if (this.options.npmRegistryUrl !== 'https://registry.npmjs.org') {
throw Error(`cannot search registries other than registry.gitlab.com`);
}
let searchString = '';
const addToSearchString = (addStringArg: string) => {
searchString = `${searchString}+${addStringArg}`;
};
// name
if (searchObjectArg.name) { searchString = `${searchObjectArg.name}` }
if (searchObjectArg.name) {
searchString = `${searchObjectArg.name}`;
}
// metadata
if (searchObjectArg.author) { addToSearchString(`author:${searchObjectArg.author}`) }
if (searchObjectArg.maintainer) { addToSearchString(`maintainer:${searchObjectArg.maintainer}`) }
if (searchObjectArg.scope) { addToSearchString(`scope:${searchObjectArg.scope}`) }
if (searchObjectArg.author) {
addToSearchString(`author:${searchObjectArg.author}`);
}
if (searchObjectArg.maintainer) {
addToSearchString(`maintainer:${searchObjectArg.maintainer}`);
}
if (searchObjectArg.scope) {
addToSearchString(`scope:${searchObjectArg.scope}`);
}
// status
if (searchObjectArg.deprecated) {
if (searchObjectArg.deprecated === true) {
addToSearchString(`is:deprecated`)
addToSearchString(`is:deprecated`);
} else {
addToSearchString(`not:deprecated`)
addToSearchString(`not:deprecated`);
}
}
if (searchObjectArg.unstable) {
if (searchObjectArg.unstable === true) {
addToSearchString(`is:unstable`)
addToSearchString(`is:unstable`);
} else {
addToSearchString(`not:unstable`)
addToSearchString(`not:unstable`);
}
}
if (searchObjectArg.insecure) {
if (searchObjectArg.insecure === true) {
addToSearchString(`is:insecure`)
addToSearchString(`is:insecure`);
} else {
addToSearchString(`not:insecure`)
addToSearchString(`not:insecure`);
}
}
// search behaviour
if (searchObjectArg.boostExact) { addToSearchString(`boost-exact:${searchObjectArg.boostExact}`) }
if (searchObjectArg.scoreEffect) { addToSearchString(`score-effect:${searchObjectArg.scoreEffect}`) }
// analytics
if (searchObjectArg.qualityWeight) { addToSearchString(`author:${searchObjectArg.qualityWeight}`) }
if (searchObjectArg.popularityWeight) { addToSearchString(`author:${searchObjectArg.popularityWeight}`) }
if (searchObjectArg.maintenanceWeight) { addToSearchString(`author:${searchObjectArg.maintenanceWeight}`) }
plugins.beautylog.log(`Search on npm for ${plugins.beautycolor.coloredString(searchString, 'pink')}`)
let response = (await plugins.smartrequest.get(this.searchDomain + searchString, {}))
let body: any = response.body
// lets create the response
let packageArray: NpmPackage[] = []
for (let packageArg of body.results) {
let localPackage = new NpmPackage(packageArg.package)
packageArray.push(localPackage)
if (searchObjectArg.boostExact) {
addToSearchString(`boost-exact:${searchObjectArg.boostExact}`);
}
if (searchObjectArg.scoreEffect) {
addToSearchString(`score-effect:${searchObjectArg.scoreEffect}`);
}
return packageArray
// analytics
if (searchObjectArg.qualityWeight) {
addToSearchString(`author:${searchObjectArg.qualityWeight}`);
}
if (searchObjectArg.popularityWeight) {
addToSearchString(`author:${searchObjectArg.popularityWeight}`);
}
if (searchObjectArg.maintenanceWeight) {
addToSearchString(`author:${searchObjectArg.maintenanceWeight}`);
}
console.log(
`info: Search on npm for ${plugins.consolecolor.coloredString(searchString, 'pink')}`
);
let body: any;
try {
const response = await plugins.smartrequest.getJson(this.searchDomain + searchString, {});
body = response.body;
} catch {
// we do nothing
}
// lets create the packageArray
const packageArray: NpmPackage[] = [];
// if request failed just return it empty
if (!body || typeof body === 'string') {
return packageArray;
}
for (const packageSearchInfoArg of body.results) {
const npmPackage = await this.getPackageInfo(packageSearchInfoArg.package.name);
packageArray.push(npmPackage);
}
return packageArray;
}
}

View File

@ -0,0 +1,11 @@
import * as plugins from './smartnpm.plugins';
export class PackageDisttag {
name: string;
targetVersion: string;
constructor(nameArg: string, targetVersionArg: string) {
this.name = nameArg;
this.targetVersion = targetVersionArg;
}
}

View File

@ -0,0 +1,31 @@
import * as plugins from './smartnpm.plugins';
export interface IVersionData {
name: string;
version: string;
dependencies: { [key: string]: string };
devDependencies: { [key: string]: string };
dist: {
integrity: string;
shasum: string;
tarball: string;
};
}
export class PackageVersion implements IVersionData {
public static createFromVersionData(versionDataArg: IVersionData) {
const packageVersion = new PackageVersion();
Object.assign(packageVersion, versionDataArg);
return packageVersion;
}
name: string;
version: string;
dependencies: { [key: string]: string };
devDependencies: { [key: string]: string };
dist: {
integrity: string;
shasum: string;
tarball: string;
};
}

View File

@ -0,0 +1,30 @@
import { NpmRegistry } from './smartnpm.classes.npmregistry';
import * as plugins from './smartnpm.plugins';
export class RegistryCache {
npmregistryRef: NpmRegistry;
public levelCache: plugins.levelcache.LevelCache;
constructor(npmRegistryRefArg: NpmRegistry) {
this.npmregistryRef = npmRegistryRefArg;
this.levelCache = new plugins.levelcache.LevelCache({
cacheId: encodeURIComponent(this.npmregistryRef.options.npmRegistryUrl),
});
}
public async getCachedFile (fileId: string): Promise<plugins.smartfile.Smartfile> {
const cacheEntry = await this.levelCache.retrieveCacheEntryByKey(fileId);
if (cacheEntry) {
return plugins.smartfile.Smartfile.fromFoldedJson(cacheEntry.contents.toString());
}
return null;
}
public async cacheSmartFile (fileIdArg: string, smartfileArg: plugins.smartfile.Smartfile) {
await this.levelCache.storeCacheEntryByKey(fileIdArg, new plugins.levelcache.CacheEntry({
contents: Buffer.from(smartfileArg.foldToJson()),
ttl: 60000
}));
}
}

View File

@ -1,25 +1,24 @@
export interface ISearchObject {
// name
name?: string
name?: string;
// metadata
author?: string
maintainer?: string
scope?: string
keywords?: string[]
author?: string;
maintainer?: string;
scope?: string;
keywords?: string[];
// status
deprecated?: boolean
unstable?: boolean
insecure?: boolean
deprecated?: boolean;
unstable?: boolean;
insecure?: boolean;
// search behaviour
boostExact?: boolean
scoreEffect?: number
boostExact?: boolean;
scoreEffect?: number;
// Analytics
qualityWeight?: number
popularityWeight?: number
maintenanceWeight?: number
qualityWeight?: number;
popularityWeight?: number;
maintenanceWeight?: number;
}

4
ts/smartnpm.paths.ts Normal file
View File

@ -0,0 +1,4 @@
import * as plugins from './smartnpm.plugins';
export const packageDir = plugins.path.join(__dirname, '../');
export const nogitDir = plugins.path.join(packageDir, '.nogit/');

View File

@ -1,11 +1,20 @@
import 'typings-global'
// node native modules
import * as path from 'path';
import * as beautycolor from 'beautycolor'
import * as beautylog from 'beautylog'
import * as smartrequest from 'smartrequest'
export { path };
export {
beautycolor,
beautylog,
smartrequest
}
// @pushrocks scope
import * as consolecolor from '@pushrocks/consolecolor';
import * as levelcache from '@pushrocks/levelcache';
import * as smartarchive from '@pushrocks/smartarchive';
import * as smartfile from '@pushrocks/smartfile';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrequest from '@pushrocks/smartrequest';
import * as smartversion from '@pushrocks/smartversion';
export { consolecolor, levelcache, smartarchive, smartfile, smartpromise, smartrequest, smartversion };
// third party scope
import packageJson from 'package-json';
export { packageJson };

View File

@ -1,3 +1,17 @@
{
"extends": "tslint-config-standard"
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}

518
yarn.lock
View File

@ -1,518 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/chai-as-promised@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
dependencies:
"@types/chai" "*"
"@types/promises-a-plus" "*"
"@types/chai-string@^1.1.30":
version "1.1.30"
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
dependencies:
"@types/chai" "*"
"@types/chai@*":
version "4.0.3"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.3.tgz#6c2264b195cd2bb4c95c108487e13df0c8567c3e"
"@types/chai@^3.4.35":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
"@types/glob@*":
version "5.0.30"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.30.tgz#1026409c5625a8689074602808d082b2867b8a51"
dependencies:
"@types/minimatch" "*"
"@types/node" "*"
"@types/lodash@^4.14.55":
version "4.14.72"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.72.tgz#f090cf6eb1fee1647a0efa1ebe18b0b78ed551c6"
"@types/minimatch@*":
version "2.0.29"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
"@types/node@*":
version "8.0.20"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.20.tgz#65c7375255c24b184c215a5d0b63247c32f01c91"
"@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/shelljs@^0.7.2":
version "0.7.4"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc"
dependencies:
"@types/glob" "*"
"@types/node" "*"
"@types/which@^1.0.28":
version "1.0.28"
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
ansi-256-colors@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
assertion-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
beautycolor@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
dependencies:
ansi-256-colors "^1.1.0"
typings-global "^1.0.14"
beautycolor@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.9.tgz#639eaa83b6b9ca8419f164e42df33e162f839a3b"
dependencies:
ansi-256-colors "^1.1.0"
tapbundle "^1.1.1"
typings-global "^1.0.14"
beautylog@^6.1.10:
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"
bindings@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
brace-expansion@^1.1.7:
version "1.1.8"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
chai-as-promised@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
dependencies:
check-error "^1.0.2"
chai-string@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
chai@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
dependencies:
assertion-error "^1.0.1"
deep-eql "^0.1.3"
type-detect "^1.0.0"
chalk@^1.0.0, chalk@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
dependencies:
restore-cursor "^2.0.0"
cli-spinners@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.0.0.tgz#ef987ed3d48391ac3dab9180b406a742180d6e6a"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
deep-eql@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
dependencies:
type-detect "0.1.1"
define-properties@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
dependencies:
foreach "^2.0.5"
object-keys "^1.0.8"
early@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
dependencies:
beautycolor "^1.0.7"
smartq "^1.1.1"
typings-global "^1.0.16"
es-abstract@^1.5.1:
version "1.8.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914"
dependencies:
es-to-primitive "^1.1.1"
function-bind "^1.1.0"
has "^1.0.1"
is-callable "^1.1.3"
is-regex "^1.0.4"
es-to-primitive@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
dependencies:
is-callable "^1.1.1"
is-date-object "^1.0.1"
is-symbol "^1.0.1"
es6-error@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
figlet@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.2.0.tgz#6c46537378fab649146b5a6143dda019b430b410"
foreach@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
function-bind@^1.0.2, function-bind@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
glob@^7.0.0:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"
has@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
dependencies:
function-bind "^1.0.2"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
interpret@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
is-callable@^1.1.1, is-callable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
is-date-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
is-regex@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
dependencies:
has "^1.0.1"
is-symbol@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
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"
lodash@^4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
log-symbols@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
dependencies:
chalk "^1.0.0"
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"
mimic-fn@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"
minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
nan@^2.3.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
object-keys@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
object.getownpropertydescriptors@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
dependencies:
define-properties "^1.1.2"
es-abstract "^1.5.1"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
onetime@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
dependencies:
mimic-fn "^1.0.0"
ora@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-1.3.0.tgz#80078dd2b92a934af66a3ad72a5b910694ede51a"
dependencies:
chalk "^1.1.1"
cli-cursor "^2.1.0"
cli-spinners "^1.0.0"
log-symbols "^1.0.2"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
dependencies:
resolve "^1.1.6"
resolve@^1.1.6:
version "1.4.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
dependencies:
path-parse "^1.0.5"
restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
dependencies:
onetime "^2.0.0"
signal-exit "^3.0.2"
semver@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
shelljs@^0.7.8:
version "0.7.8"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
smartchai@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
dependencies:
"@types/chai" "^3.4.35"
"@types/chai-as-promised" "0.0.29"
"@types/chai-string" "^1.1.30"
chai "^3.5.0"
chai-as-promised "^6.0.0"
chai-string "^1.3.0"
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@^2.0.0:
version "2.0.6"
resolved "https://registry.yarnpkg.com/smartenv/-/smartenv-2.0.6.tgz#b38c679b0c151b9af548f68c3a072c29d1417e8d"
dependencies:
lodash "^4.17.4"
smartq "^1.1.1"
typings-global "^1.0.14"
smartq@^1.1.1, smartq@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
dependencies:
typings-global "^1.0.19"
util.promisify "^1.0.0"
smartrequest@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.6.tgz#a006454332453b0a70d38a003a29963d039a7783"
dependencies:
smartq "^1.1.1"
typings-global "^1.0.17"
smartshell@^1.0.6:
version "1.0.13"
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.13.tgz#277b34e6624df70003e0e3a6c900cd5ebab7eb92"
dependencies:
"@types/shelljs" "^0.7.2"
"@types/which" "^1.0.28"
shelljs "^0.7.8"
smartq "^1.1.6"
typings-global "^1.0.19"
which "^1.2.14"
strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
tapbundle@^1.0.13, tapbundle@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
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.19"
type-detect@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
type-detect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.17, typings-global@^1.0.19:
version "1.0.20"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
dependencies:
semver "^5.3.0"
smartshell "^1.0.6"
util.promisify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
dependencies:
define-properties "^1.1.2"
object.getownpropertydescriptors "^2.0.3"
which@^1.2.14:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
dependencies:
isexe "^2.0.0"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"