Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
71abbbb5f1 | |||
9dfa1a789e | |||
c68ea1c8fd | |||
8e943512f8 | |||
c010319076 | |||
cf03e58c6f | |||
d59875f23f | |||
6b13e46947 | |||
096c38de9e | |||
7292b45d33 | |||
3ddad53d29 | |||
617b49aaba | |||
2dcd93b431 | |||
0e2dc83409 | |||
2cb227632f | |||
d0f6e88388 | |||
e72a5cb4af | |||
0d3292dd1e | |||
54db436174 | |||
7075d7b36f | |||
98aca88b49 | |||
5f49845138 | |||
1d5e94244b | |||
7cc7c54587 | |||
24af38ed8b | |||
96b21b57ce | |||
11eb44bac9 | |||
c71a248c7d | |||
413ef378b6 | |||
79a3420aa5 | |||
fa0d5af74e | |||
8ce9b08153 |
17
.gitignore
vendored
17
.gitignore
vendored
@ -1,5 +1,20 @@
|
||||
.nogit/
|
||||
node_modules/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
145
.gitlab-ci.yml
145
.gitlab-ci.yml
@ -1,96 +1,137 @@
|
||||
# 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:
|
||||
- mirror
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- pages
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- metadata
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: mirror
|
||||
script:
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- docker
|
||||
|
||||
security:
|
||||
stage: security
|
||||
script:
|
||||
- npmci command yarn global add snyk
|
||||
- npmci command yarn install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci node install legacy
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
- 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
|
||||
- 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 node install lts
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testSTABLE:
|
||||
- docker
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- docker
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci npm publish
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- 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
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- 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
29
.vscode/launch.json
vendored
Normal 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
26
.vscode/settings.json
vendored
Normal 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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
export * from './smartnpm.classes.npmregistry';
|
||||
export * from './smartnpm.classes.npmpackage';
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -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==
|
32
dist/smartnpm.classes.npmpackage.d.ts
vendored
32
dist/smartnpm.classes.npmpackage.d.ts
vendored
@ -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);
|
||||
}
|
24
dist/smartnpm.classes.npmpackage.js
vendored
24
dist/smartnpm.classes.npmpackage.js
vendored
@ -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
|
6
dist/smartnpm.classes.npmregistry.d.ts
vendored
6
dist/smartnpm.classes.npmregistry.d.ts
vendored
@ -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[]>;
|
||||
}
|
104
dist/smartnpm.classes.npmregistry.js
vendored
104
dist/smartnpm.classes.npmregistry.js
vendored
@ -1,104 +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 body;
|
||||
try {
|
||||
let response = (yield plugins.smartrequest.get(this.searchDomain + searchString, {}));
|
||||
body = response.body;
|
||||
}
|
||||
catch (_a) {
|
||||
// we do nothing
|
||||
}
|
||||
// lets create the packageArray
|
||||
let packageArray = [];
|
||||
// if request failed just return it empty
|
||||
if (!body || typeof body === 'string') {
|
||||
return 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0uY2xhc3Nlcy5ucG1yZWdpc3RyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bnBtLmNsYXNzZXMubnBtcmVnaXN0cnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDhDQUE2QztBQUs3QyxVQUFVO0FBQ1YsK0VBQTBEO0FBRTFEO0lBQUE7UUFDVSxpQkFBWSxHQUFHLGtDQUFrQyxDQUFBO0lBeUUzRCxDQUFDO0lBeEVPLE1BQU0sQ0FBRSxlQUE4Qjs7WUFDMUMsSUFBSSxZQUFZLEdBQUcsRUFBRSxDQUFBO1lBQ3JCLElBQUksaUJBQWlCLEdBQUcsQ0FBQyxZQUFvQixFQUFFLEVBQUU7Z0JBQy9DLFlBQVksR0FBRyxHQUFHLFlBQVksSUFBSSxZQUFZLEVBQUUsQ0FBQTtZQUNsRCxDQUFDLENBQUE7WUFFRCxPQUFPO1lBQ1AsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7Z0JBQUMsWUFBWSxHQUFHLEdBQUcsZUFBZSxDQUFDLElBQUksRUFBRSxDQUFBO1lBQUMsQ0FBQztZQUV0RSxXQUFXO1lBQ1gsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsVUFBVSxlQUFlLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFDckYsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsY0FBYyxlQUFlLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFDakcsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsU0FBUyxlQUFlLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFFbEYsU0FBUztZQUNULEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO2dCQUMvQixFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsVUFBVSxLQUFLLElBQUksQ0FBQyxDQUFDLENBQUM7b0JBQ3hDLGlCQUFpQixDQUFDLGVBQWUsQ0FBQyxDQUFBO2dCQUNwQyxDQUFDO2dCQUFDLElBQUksQ0FBQyxDQUFDO29CQUNOLGlCQUFpQixDQUFDLGdCQUFnQixDQUFDLENBQUE7Z0JBQ3JDLENBQUM7WUFDSCxDQUFDO1lBQ0QsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7Z0JBQzdCLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxRQUFRLEtBQUssSUFBSSxDQUFDLENBQUMsQ0FBQztvQkFDdEMsaUJBQWlCLENBQUMsYUFBYSxDQUFDLENBQUE7Z0JBQ2xDLENBQUM7Z0JBQUMsSUFBSSxDQUFDLENBQUM7b0JBQ04saUJBQWlCLENBQUMsY0FBYyxDQUFDLENBQUE7Z0JBQ25DLENBQUM7WUFDSCxDQUFDO1lBQ0QsRUFBRSxDQUFDLENBQUMsZUFBZSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7Z0JBQzdCLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxRQUFRLEtBQUssSUFBSSxDQUFDLENBQUMsQ0FBQztvQkFDdEMsaUJBQWlCLENBQUMsYUFBYSxDQUFDLENBQUE7Z0JBQ2xDLENBQUM7Z0JBQUMsSUFBSSxDQUFDLENBQUM7b0JBQ04saUJBQWlCLENBQUMsY0FBYyxDQUFDLENBQUE7Z0JBQ25DLENBQUM7WUFDSCxDQUFDO1lBRUQsbUJBQW1CO1lBQ25CLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO2dCQUFDLGlCQUFpQixDQUFDLGVBQWUsZUFBZSxDQUFDLFVBQVUsRUFBRSxDQUFDLENBQUE7WUFBQyxDQUFDO1lBQ2xHLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDO2dCQUFDLGlCQUFpQixDQUFDLGdCQUFnQixlQUFlLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFFckcsWUFBWTtZQUNaLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO2dCQUFDLGlCQUFpQixDQUFDLFVBQVUsZUFBZSxDQUFDLGFBQWEsRUFBRSxDQUFDLENBQUE7WUFBQyxDQUFDO1lBQ25HLEVBQUUsQ0FBQyxDQUFDLGVBQWUsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLENBQUM7Z0JBQUMsaUJBQWlCLENBQUMsVUFBVSxlQUFlLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQyxDQUFBO1lBQUMsQ0FBQztZQUN6RyxFQUFFLENBQUMsQ0FBQyxlQUFlLENBQUMsaUJBQWlCLENBQUMsQ0FBQyxDQUFDO2dCQUFDLGlCQUFpQixDQUFDLFVBQVUsZUFBZSxDQUFDLGlCQUFpQixFQUFFLENBQUMsQ0FBQTtZQUFDLENBQUM7WUFFM0csT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMscUJBQXFCLE9BQU8sQ0FBQyxXQUFXLENBQUMsYUFBYSxDQUFDLFlBQVksRUFBRSxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUE7WUFFckcsSUFBSSxJQUFTLENBQUM7WUFDZCxJQUFJLENBQUM7Z0JBQ0gsSUFBSSxRQUFRLEdBQUcsQ0FBQyxNQUFNLE9BQU8sQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxZQUFZLEdBQUcsWUFBWSxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUE7Z0JBQ3JGLElBQUksR0FBRyxRQUFRLENBQUMsSUFBSSxDQUFBO1lBQ3RCLENBQUM7WUFBQyxLQUFLLENBQUMsQ0FBQyxJQUFELENBQUM7Z0JBQ1AsZ0JBQWdCO1lBQ2xCLENBQUM7WUFHRCwrQkFBK0I7WUFDL0IsSUFBSSxZQUFZLEdBQWlCLEVBQUUsQ0FBQTtZQUVuQyx5Q0FBeUM7WUFDekMsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksT0FBTyxJQUFJLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQztnQkFDdEMsTUFBTSxDQUFDLFlBQVksQ0FBQTtZQUNyQixDQUFDO1lBRUQsR0FBRyxDQUFDLENBQUMsSUFBSSxVQUFVLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7Z0JBQ3BDLElBQUksWUFBWSxHQUFHLElBQUksd0NBQVUsQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLENBQUE7Z0JBQ3JELFlBQVksQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUE7WUFDakMsQ0FBQztZQUVELE1BQU0sQ0FBQyxZQUFZLENBQUE7UUFDckIsQ0FBQztLQUFBO0NBQ0Y7QUExRUQsa0NBMEVDIn0=
|
15
dist/smartnpm.interfaces.d.ts
vendored
15
dist/smartnpm.interfaces.d.ts
vendored
@ -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;
|
||||
}
|
3
dist/smartnpm.interfaces.js
vendored
3
dist/smartnpm.interfaces.js
vendored
@ -1,3 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0uaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bnBtLmludGVyZmFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
4
dist/smartnpm.plugins.d.ts
vendored
4
dist/smartnpm.plugins.d.ts
vendored
@ -1,4 +0,0 @@
|
||||
import * as beautycolor from 'beautycolor';
|
||||
import * as beautylog from 'beautylog';
|
||||
import * as smartrequest from 'smartrequest';
|
||||
export { beautycolor, beautylog, smartrequest };
|
9
dist/smartnpm.plugins.js
vendored
9
dist/smartnpm.plugins.js
vendored
@ -1,9 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRucG0ucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bnBtLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwyQ0FBMEM7QUFLeEMsa0NBQVc7QUFKYix1Q0FBc0M7QUFLcEMsOEJBQVM7QUFKWCw2Q0FBNEM7QUFLMUMsb0NBQVkifQ==
|
@ -1,7 +1,17 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
11214
package-lock.json
generated
Normal file
11214
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
47
package.json
47
package.json
@ -1,21 +1,46 @@
|
||||
{
|
||||
"name": "smartnpm",
|
||||
"version": "1.0.6",
|
||||
"name": "@pushrocks/smartnpm",
|
||||
"version": "1.0.23",
|
||||
"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": {
|
||||
"@types/node": "^9.4.6",
|
||||
"tapbundle": "^1.1.8"
|
||||
"@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.11",
|
||||
"beautylog": "^6.1.10",
|
||||
"smartrequest": "^1.0.8"
|
||||
}
|
||||
"@pushrocks/consolecolor": "^2.0.1",
|
||||
"@pushrocks/smartarchive": "^2.0.4",
|
||||
"@pushrocks/smartfile": "^8.0.9",
|
||||
"@pushrocks/smartpromise": "^3.1.3",
|
||||
"@pushrocks/smartrequest": "^1.1.51",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
|
46
readme.md
46
readme.md
@ -1,29 +1,39 @@
|
||||
# smartnpm
|
||||
# @pushrocks/smartnpm
|
||||
interface with npm to retrieve package information
|
||||
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/smartnpm)
|
||||
[](https://GitLab.com/pushrocks/smartnpm)
|
||||
[](https://github.com/pushrocks/smartnpm)
|
||||
[](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
|
||||
[](https://GitLab.com/pushrocks/smartnpm/commits/master)
|
||||
[](https://GitLab.com/pushrocks/smartnpm/commits/master)
|
||||
[](https://www.npmjs.com/package/smartnpm)
|
||||
[](https://david-dm.org/pushrocks/smartnpm)
|
||||
[](https://www.bithound.io/github/pushrocks/smartnpm/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/pushrocks/smartnpm)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||
npm | [](https://lossless.cloud)
|
||||
Snyk | [](https://lossless.cloud)
|
||||
TypeScript Support | [](https://lossless.cloud)
|
||||
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||
Platform support | [](https://lossless.cloud) [](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 | **©** [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)
|
||||
|
||||
[](https://push.rocks)
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
55
test/test.ts
55
test/test.ts
@ -1,22 +1,47 @@
|
||||
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 and this return npmts', async () => {
|
||||
let packages = await testRegistry.search({
|
||||
name: 'npmts'
|
||||
})
|
||||
expect(packages[0].name).to.equal('npmts')
|
||||
})
|
||||
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();
|
||||
|
@ -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';
|
||||
|
@ -1,40 +1,95 @@
|
||||
import * as plugins from './smartnpm.plugins'
|
||||
import * as plugins from './smartnpm.plugins';
|
||||
import { NpmRegistry } from './smartnpm.classes.npmregistry';
|
||||
|
||||
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
|
||||
}
|
||||
} = null
|
||||
searchScore: number = null
|
||||
public static async createFromFullMetadata(
|
||||
npmRegistryArg: NpmRegistry,
|
||||
fullMetadata: plugins.packageJson.FullMetadata
|
||||
) {
|
||||
const npmPackage = new NpmPackage(npmRegistryArg);
|
||||
Object.assign(npmPackage, fullMetadata);
|
||||
return npmPackage;
|
||||
}
|
||||
|
||||
constructor (descriptionArg) {
|
||||
for (let key in descriptionArg) {
|
||||
if (this[key] === null) {
|
||||
this[key] = descriptionArg[key]
|
||||
// INSTANCE
|
||||
public name: string = null;
|
||||
public scope: string = null;
|
||||
public version: string = null;
|
||||
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 package to memory
|
||||
*/
|
||||
public async saveToMemory() {}
|
||||
|
||||
/**
|
||||
* get file from package
|
||||
*/
|
||||
public async getFileFromPackage(filePath: string): Promise<plugins.smartfile.Smartfile> {
|
||||
const done = plugins.smartpromise.defer<plugins.smartfile.Smartfile>();
|
||||
const smartarchiveInstance = new plugins.smartarchive.SmartArchive();
|
||||
const fileObservable = await smartarchiveInstance.extractArchiveFromUrlToObservable(
|
||||
this.dist.tarball
|
||||
);
|
||||
const wantedFilePath = plugins.path.join('package', filePath);
|
||||
const subscription = fileObservable.subscribe(
|
||||
(fileArg) => {
|
||||
if (fileArg.path === wantedFilePath) {
|
||||
done.resolve(fileArg);
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
console.log(err);
|
||||
},
|
||||
() => {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
);
|
||||
return done.promise;
|
||||
}
|
||||
}
|
||||
|
@ -1,83 +1,167 @@
|
||||
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';
|
||||
|
||||
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;
|
||||
private searchDomain = 'https://api.npms.io/v2/search?q=';
|
||||
|
||||
constructor(optionsArg: INpmRegistryConstructorOptions = {}) {
|
||||
const defaultOptions: INpmRegistryConstructorOptions = {
|
||||
npmRegistryUrl: 'https://registry.npmjs.org',
|
||||
};
|
||||
this.options = {
|
||||
...defaultOptions,
|
||||
...optionsArg,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 npmPackage = await NpmPackage.createFromFullMetadata(this, fullMetadata);
|
||||
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): Promise<plugins.smartfile.Smartfile> {
|
||||
const npmPackage = await this.getPackageInfo(packageNameArg);
|
||||
return npmPackage.getFileFromPackage(filePath);
|
||||
}
|
||||
|
||||
public async getPackageAsSmartfileVirtualDir(packageNameArg: string): Promise<plugins.smartfile.VirtualDirectory> {
|
||||
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}`) }
|
||||
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}`) }
|
||||
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')}`)
|
||||
console.log(
|
||||
`info: Search on npm for ${plugins.consolecolor.coloredString(searchString, 'pink')}`
|
||||
);
|
||||
|
||||
let body: any;
|
||||
try {
|
||||
let response = (await plugins.smartrequest.get(this.searchDomain + searchString, {}))
|
||||
body = response.body
|
||||
const response = await plugins.smartrequest.getJson(this.searchDomain + searchString, {});
|
||||
body = response.body;
|
||||
} catch {
|
||||
// we do nothing
|
||||
}
|
||||
|
||||
|
||||
// lets create the packageArray
|
||||
let packageArray: NpmPackage[] = []
|
||||
const packageArray: NpmPackage[] = [];
|
||||
|
||||
// if request failed just return it empty
|
||||
if (!body || typeof body === 'string') {
|
||||
return packageArray
|
||||
return packageArray;
|
||||
}
|
||||
|
||||
for (let packageArg of body.results) {
|
||||
let localPackage = new NpmPackage(packageArg.package)
|
||||
packageArray.push(localPackage)
|
||||
for (const packageSearchInfoArg of body.results) {
|
||||
const npmPackage = await this.getPackageInfo(packageSearchInfoArg.package.name);
|
||||
packageArray.push(npmPackage);
|
||||
}
|
||||
|
||||
return packageArray
|
||||
return packageArray;
|
||||
}
|
||||
}
|
||||
|
@ -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
4
ts/smartnpm.paths.ts
Normal 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/');
|
@ -1,9 +1,18 @@
|
||||
import * as beautycolor from 'beautycolor'
|
||||
import * as beautylog from 'beautylog'
|
||||
import * as smartrequest from 'smartrequest'
|
||||
// node native modules
|
||||
import * as path from 'path';
|
||||
|
||||
export {
|
||||
beautycolor,
|
||||
beautylog,
|
||||
smartrequest
|
||||
}
|
||||
export { path };
|
||||
|
||||
// @pushrocks scope
|
||||
import * as consolecolor from '@pushrocks/consolecolor';
|
||||
import * as smartarchive from '@pushrocks/smartarchive';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
|
||||
export { consolecolor, smartarchive, smartfile, smartpromise, smartrequest };
|
||||
|
||||
// third party scope
|
||||
import packageJson from 'package-json';
|
||||
|
||||
export { packageJson };
|
||||
|
16
tslint.json
16
tslint.json
@ -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"
|
||||
}
|
||||
|
321
yarn.lock
321
yarn.lock
@ -1,321 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/code@^4.0.3":
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/code/-/code-4.0.4.tgz#527fbdbb487dabc4346b8a2ccca3496d8198bae7"
|
||||
|
||||
"@types/lodash@^4.14.55":
|
||||
version "4.14.102"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.102.tgz#586a3e22385fc79b07cef9c5a1c8a5387986fbc8"
|
||||
|
||||
"@types/node@^8.0.33":
|
||||
version "8.9.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48"
|
||||
|
||||
"@types/node@^9.4.6":
|
||||
version "9.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e"
|
||||
|
||||
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-styles@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88"
|
||||
dependencies:
|
||||
color-convert "^1.9.0"
|
||||
|
||||
beautycolor@^1.0.11, beautycolor@^1.0.7:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.11.tgz#71c5568d5a7ed5c144d3a54f753ad1b08862aea5"
|
||||
dependencies:
|
||||
ansi-256-colors "^1.1.0"
|
||||
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"
|
||||
|
||||
chalk@^2.0.1, chalk@^2.1.0:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796"
|
||||
dependencies:
|
||||
ansi-styles "^3.2.0"
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.2.0"
|
||||
|
||||
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.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.1.0.tgz#f1847b168844d917a671eb9d147e3df497c90d06"
|
||||
|
||||
code@^5.1.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/code/-/code-5.2.0.tgz#fb3a5e247afc17e3d65c49e7ce0f69ebe51a75b5"
|
||||
dependencies:
|
||||
hoek "5.x.x"
|
||||
|
||||
color-convert@^1.9.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
|
||||
dependencies:
|
||||
color-name "^1.1.1"
|
||||
|
||||
color-name@^1.1.1:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||
|
||||
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.10.0"
|
||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
|
||||
dependencies:
|
||||
es-to-primitive "^1.1.1"
|
||||
function-bind "^1.1.1"
|
||||
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.1.1"
|
||||
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||
|
||||
escape-string-regexp@^1.0.5:
|
||||
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"
|
||||
|
||||
function-bind@^1.0.2, function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
|
||||
has-flag@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||
|
||||
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"
|
||||
|
||||
hoek@5.x.x:
|
||||
version "5.0.3"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-5.0.3.tgz#b71d40d943d0a95da01956b547f83c4a5b4a34ac"
|
||||
|
||||
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"
|
||||
|
||||
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.2.0"
|
||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
|
||||
|
||||
lodash@^4.17.4:
|
||||
version "4.17.5"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
|
||||
|
||||
log-symbols@^2.1.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
|
||||
memwatch-next@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||
dependencies:
|
||||
bindings "^1.2.1"
|
||||
nan "^2.3.2"
|
||||
|
||||
mimic-fn@^1.0.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
|
||||
|
||||
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.8.0"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a"
|
||||
|
||||
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"
|
||||
|
||||
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.4.0"
|
||||
resolved "https://registry.yarnpkg.com/ora/-/ora-1.4.0.tgz#884458215b3a5d4097592285f93321bb7a79e2e5"
|
||||
dependencies:
|
||||
chalk "^2.1.0"
|
||||
cli-cursor "^2.1.0"
|
||||
cli-spinners "^1.0.1"
|
||||
log-symbols "^2.1.0"
|
||||
|
||||
pretty-bytes@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||
|
||||
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"
|
||||
|
||||
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.8"
|
||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.8.tgz#a074836f4ddd4b98c50f1e7ae9e8e8ad9f6f1902"
|
||||
dependencies:
|
||||
"@types/code" "^4.0.3"
|
||||
code "^5.1.0"
|
||||
typings-global "^1.0.20"
|
||||
|
||||
smartdelay@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82"
|
||||
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:
|
||||
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.8:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.8.tgz#9af18dde34efa7d43b4ecfc92ccb157a98eda3b1"
|
||||
dependencies:
|
||||
smartq "^1.1.1"
|
||||
|
||||
supports-color@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a"
|
||||
dependencies:
|
||||
has-flag "^3.0.0"
|
||||
|
||||
tapbundle@^1.1.8:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.8.tgz#e08aee0e100a830d8a26a583a85d37ce53312e02"
|
||||
dependencies:
|
||||
"@types/node" "^8.0.33"
|
||||
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"
|
||||
|
||||
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20:
|
||||
version "1.0.28"
|
||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.28.tgz#e28cc965476564cbc00e438739e0aa0735d323d4"
|
||||
|
||||
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"
|
Reference in New Issue
Block a user