Compare commits
86 Commits
Author | SHA1 | Date | |
---|---|---|---|
80e50b7391 | |||
14967d6705 | |||
2344867da9 | |||
4d2349bae1 | |||
b29dc35c20 | |||
37d69e201e | |||
afa511550d | |||
e0a9e9702a | |||
85f5985249 | |||
e337241dd6 | |||
a7a1343e3c | |||
f54402aa1e | |||
b7ecd5a6b7 | |||
ba57be2fe5 | |||
2b308e8824 | |||
0b1b6deb98 | |||
d5636aaf9a | |||
0276faa949 | |||
c0d64926a0 | |||
7737014464 | |||
349360cdc6 | |||
983a860e2f | |||
c375d9ba10 | |||
e874c935bb | |||
001a79252c | |||
634d1c3570 | |||
cd8c9bcdaa | |||
f6d3d0987b | |||
60a1de38ce | |||
0ef6d0ccb2 | |||
8e538fd84d | |||
6745115db7 | |||
5ebce389d3 | |||
b4100688ac | |||
77d515d915 | |||
aa71105b2d | |||
e0ccb6c076 | |||
af0d95f327 | |||
d0ac8f1418 | |||
62f8106fc6 | |||
e87b8c994b | |||
694ba7be25 | |||
952399c26e | |||
ab1e83b8bf | |||
67980f9f41 | |||
2d34397b9b | |||
2744e1a92b | |||
b8987b7913 | |||
95ffb06e77 | |||
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 | |||
6832327643 | |||
376cbcc2ab | |||
26c7b0c69a | |||
21100dbb32 | |||
152300819d |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: Default (not tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm and npmci
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
- name: Run npm prepare
|
||||||
|
run: npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
name: Default (tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm publish
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Code quality
|
||||||
|
run: |
|
||||||
|
npmci command npm install -g typescript
|
||||||
|
npmci npm install
|
||||||
|
|
||||||
|
- name: Trigger
|
||||||
|
run: npmci trigger
|
||||||
|
|
||||||
|
- name: Build docs and upload artifacts
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
pnpm install -g @gitzone/tsdoc
|
||||||
|
npmci command tsdoc
|
||||||
|
continue-on-error: true
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -1,5 +1,20 @@
|
|||||||
.nogit/
|
.nogit/
|
||||||
node_modules/
|
|
||||||
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
public/
|
public/
|
||||||
pages/
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
|
dist/
|
||||||
|
dist_*/
|
||||||
|
|
||||||
|
# custom
|
@ -1,71 +0,0 @@
|
|||||||
# gitzone standard
|
|
||||||
image: hosttoday/ht-docker-node:npmci
|
|
||||||
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- .yarn/
|
|
||||||
key: "$CI_BUILD_STAGE"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
- release
|
|
||||||
- trigger
|
|
||||||
- pages
|
|
||||||
|
|
||||||
testLEGACY:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci test legacy
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
testLTS:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci test lts
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
testSTABLE:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci test stable
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
release:
|
|
||||||
stage: release
|
|
||||||
script:
|
|
||||||
- npmci publish
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
stage: trigger
|
|
||||||
script:
|
|
||||||
- npmci trigger
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
pages:
|
|
||||||
image: hosttoday/ht-docker-node:npmci
|
|
||||||
stage: pages
|
|
||||||
script:
|
|
||||||
- npmci command yarn global add npmpage
|
|
||||||
- npmci command npmpage
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
artifacts:
|
|
||||||
expire_in: 1 week
|
|
||||||
paths:
|
|
||||||
- public
|
|
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"command": "npm test",
|
||||||
|
"name": "Run npm test",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node-terminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
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"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -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
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[]>;
|
|
||||||
}
|
|
94
dist/smartnpm.classes.npmregistry.js
vendored
94
dist/smartnpm.classes.npmregistry.js
vendored
@ -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
|
|
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
|
|
5
dist/smartnpm.plugins.d.ts
vendored
5
dist/smartnpm.plugins.d.ts
vendored
@ -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 };
|
|
10
dist/smartnpm.plugins.js
vendored
10
dist/smartnpm.plugins.js
vendored
@ -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=
|
|
@ -1,7 +1,30 @@
|
|||||||
{
|
{
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": [
|
"npmGlobalTools": [],
|
||||||
"npmts"
|
"npmAccessLevel": "public"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "code.foss.global",
|
||||||
|
"gitscope": "push.rocks",
|
||||||
|
"gitrepo": "smartnpm",
|
||||||
|
"description": "A library to interface with npm for retrieving package information and manipulation.",
|
||||||
|
"npmPackagename": "@push.rocks/smartnpm",
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"npm",
|
||||||
|
"package",
|
||||||
|
"information",
|
||||||
|
"registry",
|
||||||
|
"search",
|
||||||
|
"metadata",
|
||||||
|
"version",
|
||||||
|
"dependencies"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"tsdoc": {
|
||||||
|
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||||
|
}
|
||||||
}
|
}
|
66
package.json
66
package.json
@ -1,21 +1,65 @@
|
|||||||
{
|
{
|
||||||
"name": "smartnpm",
|
"name": "@push.rocks/smartnpm",
|
||||||
"version": "1.0.4",
|
"version": "2.0.4",
|
||||||
"description": "interface with npm to retrieve package information",
|
"private": false,
|
||||||
"main": "dist/index.js",
|
"description": "A library to interface with npm for retrieving package information and manipulation.",
|
||||||
"typings": "dist/index.d.ts",
|
"main": "dist_ts/index.js",
|
||||||
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"type": "module",
|
||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npmts)"
|
"test": "(tstest test/)",
|
||||||
|
"build": "(tsbuild --web --allowimplicitany)",
|
||||||
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tapbundle": "^1.0.13"
|
"@gitzone/tsbuild": "^2.1.66",
|
||||||
|
"@gitzone/tsrun": "^1.2.44",
|
||||||
|
"@gitzone/tstest": "^1.0.77",
|
||||||
|
"@push.rocks/tapbundle": "^5.0.12",
|
||||||
|
"@types/node": "^20.4.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"beautycolor": "^1.0.9",
|
"@push.rocks/consolecolor": "^2.0.1",
|
||||||
"beautylog": "^6.1.10",
|
"@push.rocks/levelcache": "^3.0.6",
|
||||||
"smartrequest": "^1.0.6",
|
"@push.rocks/smartarchive": "^3.0.6",
|
||||||
"typings-global": "^1.0.16"
|
"@push.rocks/smartfile": "^10.0.28",
|
||||||
|
"@push.rocks/smartpath": "^5.0.11",
|
||||||
|
"@push.rocks/smartpromise": "^4.0.3",
|
||||||
|
"@push.rocks/smartrequest": "^2.0.18",
|
||||||
|
"@push.rocks/smarttime": "^4.0.4",
|
||||||
|
"@push.rocks/smartversion": "^3.0.2",
|
||||||
|
"package-json": "^8.1.1"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_*/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
],
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"npm",
|
||||||
|
"package",
|
||||||
|
"information",
|
||||||
|
"registry",
|
||||||
|
"search",
|
||||||
|
"metadata",
|
||||||
|
"version",
|
||||||
|
"dependencies"
|
||||||
|
],
|
||||||
|
"homepage": "https://code.foss.global/push.rocks/smartnpm",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.foss.global/push.rocks/smartnpm.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
5228
pnpm-lock.yaml
generated
Normal file
5228
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
124
readme.md
124
readme.md
@ -1,29 +1,109 @@
|
|||||||
# smartnpm
|
# @push.rocks/smartnpm
|
||||||
interface with npm to retrieve package information
|
interface with npm to retrieve package information
|
||||||
|
|
||||||
## Availabililty
|
## Install
|
||||||
[](https://www.npmjs.com/package/smartnpm)
|
To install `@push.rocks/smartnpm`, open your terminal and run the following command:
|
||||||
[](https://GitLab.com/pushrocks/smartnpm)
|
```sh
|
||||||
[](https://github.com/pushrocks/smartnpm)
|
npm install @push.rocks/smartnpm --save
|
||||||
[](https://pushrocks.gitlab.io/smartnpm/)
|
```
|
||||||
|
This will add `@push.rocks/smartnpm` as a dependency to your project and you're ready to start using it.
|
||||||
## 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/)
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Use TypeScript for best in class instellisense.
|
To use `@push.rocks/smartnpm` in your project, you first need to import it in your TypeScript files. `@push.rocks/smartnpm` provides a powerful interface to interact with npm to retrieve package information, handle package downloads, and more. Below are examples showcasing how to leverage some of its features in real-world scenarios.
|
||||||
|
|
||||||
For further information read the linked docs at the top of this README.
|
### Initialize the NpmRegistry
|
||||||
|
Before you can retrieve any package information or perform actions such as downloading packages, you need to create an instance of `NpmRegistry`. This acts as your starting point.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
```typescript
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
import { NpmRegistry } from '@push.rocks/smartnpm';
|
||||||
|
|
||||||
[](https://push.rocks)
|
const npmRegistry = new NpmRegistry();
|
||||||
|
```
|
||||||
|
|
||||||
|
Optionally, you can provide a custom npm registry URL if you're not using the default npm registry:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
const customRegistry = new NpmRegistry({
|
||||||
|
npmRegistryUrl: 'https://custom.registry.url'
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### Retrieve Package Information
|
||||||
|
`@push.rocks/smartnpm` allows you to easily get detailed information about a package, including its versions, dist tags, and metadata. Here's how you can get information about a specific package:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
async function getPackageInfo() {
|
||||||
|
const packageName = 'your-package-name';
|
||||||
|
const packageInfo = await npmRegistry.getPackageInfo(packageName);
|
||||||
|
console.log(packageInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
getPackageInfo();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Search for Packages
|
||||||
|
You can search for packages using a variety of filters such as keywords, author, maintainer, etc. Here's an example of searching for packages with specific criteria:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
async function searchPackages() {
|
||||||
|
const searchResults = await npmRegistry.searchOnNpm({
|
||||||
|
keywords: ['webpack-plugin'],
|
||||||
|
author: 'webpack'
|
||||||
|
});
|
||||||
|
console.log(searchResults);
|
||||||
|
}
|
||||||
|
|
||||||
|
searchPackages();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Downloading Packages
|
||||||
|
`@push.rocks/smartnpm` provides an easy way to download npm packages and extract them to a specific directory. This could be useful for creating tools that need to programmatically handle packages.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
async function downloadPackage() {
|
||||||
|
const packageName = 'some-package';
|
||||||
|
const targetDirectory = './path/to/targetDir';
|
||||||
|
|
||||||
|
await npmRegistry.savePackageToDisk(packageName, targetDirectory);
|
||||||
|
console.log(`${packageName} has been downloaded to ${targetDirectory}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadPackage();
|
||||||
|
```
|
||||||
|
|
||||||
|
### Working with Package Versions and Dist Tags
|
||||||
|
You can easily retrieve detailed information about specific package versions or distribution tags. This is particularly useful for automation scripts that need to work with specific versions of a package.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
async function getPackageVersionDetails() {
|
||||||
|
const packageName = 'some-package';
|
||||||
|
const version = '1.0.0'; // You can also use dist tags like 'latest'
|
||||||
|
|
||||||
|
const packageInfo = await npmRegistry.getPackageInfo(packageName);
|
||||||
|
const versionInfo = packageInfo.allVersions.find(v => v.version === version);
|
||||||
|
console.log(versionInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
getPackageVersionDetails();
|
||||||
|
```
|
||||||
|
|
||||||
|
These examples only scratch the surface of what you can achieve with `@push.rocks/smartnpm`. By integrating this library, you have a powerful tool at your disposal for interacting with npm in a programmatic way, enabling a wide range of possibilities for automation, CI/CD, and tooling around npm packages.
|
||||||
|
|
||||||
|
## License and Legal Information
|
||||||
|
|
||||||
|
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
|
||||||
|
|
||||||
|
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
### Trademarks
|
||||||
|
|
||||||
|
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
|
||||||
|
|
||||||
|
### Company Information
|
||||||
|
|
||||||
|
Task Venture Capital GmbH
|
||||||
|
Registered at District court Bremen HRB 35230 HB, Germany
|
||||||
|
|
||||||
|
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||||
|
|
||||||
|
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||||
|
71
test/test.ts
71
test/test.ts
@ -1,22 +1,61 @@
|
|||||||
import { expect, tap } from 'tapbundle'
|
import { expect, tap } from '@push.rocks/tapbundle';
|
||||||
import * as smartnpm from '../ts/index'
|
import * as smartnpm from '../ts/index.js';
|
||||||
|
import { NpmRegistry } from '../ts/index.js';
|
||||||
|
|
||||||
let testRegistry: smartnpm.NpmRegistry
|
let npmRegistry: smartnpm.NpmRegistry;
|
||||||
let testPackage: smartnpm.NpmPackage
|
let verdaccioRegistry: smartnpm.NpmRegistry;
|
||||||
|
let testPackage: smartnpm.NpmPackage;
|
||||||
|
|
||||||
|
// lets test things with the standard npm registry
|
||||||
tap.test('should create valid instances', async () => {
|
tap.test('should create valid instances', async () => {
|
||||||
testRegistry = new smartnpm.NpmRegistry()
|
npmRegistry = new smartnpm.NpmRegistry();
|
||||||
expect(testRegistry).to.be.instanceof(smartnpm.NpmRegistry)
|
expect(npmRegistry).toBeInstanceOf(smartnpm.NpmRegistry);
|
||||||
|
|
||||||
testPackage = new smartnpm.NpmPackage({})
|
testPackage = new smartnpm.NpmPackage(npmRegistry);
|
||||||
expect(testPackage).to.be.instanceof(smartnpm.NpmPackage)
|
expect(testPackage).toBeInstanceOf(smartnpm.NpmPackage);
|
||||||
})
|
});
|
||||||
|
|
||||||
tap.test('should produce a valid search string', async () => {
|
tap.test('should produce a valid search string and this return npmts', async () => {
|
||||||
let packages = await testRegistry.search({
|
const packages = await npmRegistry.searchOnNpm({
|
||||||
name: 'npmts'
|
name: '@pushrocks/smartupdate',
|
||||||
})
|
});
|
||||||
expect(packages[0].name).to.equal('npmts')
|
expect(packages[0].name).toEqual('@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.digital',
|
||||||
|
});
|
||||||
|
expect(verdaccioRegistry).toBeInstanceOf(smartnpm.NpmRegistry);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should get package from verdaccio', async () => {
|
||||||
|
const npmPackage = await verdaccioRegistry.getPackageInfo('@pushrocks/smartupdate');
|
||||||
|
expect(npmPackage.license).toEqual('MIT');
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should get a specific file from a package', async () => {
|
||||||
|
const wantedFile = await verdaccioRegistry.getFileFromPackage(
|
||||||
|
'@pushrocks/websetup',
|
||||||
|
'./ts/index.ts'
|
||||||
|
);
|
||||||
|
console.log(wantedFile.contentBuffer.toString());
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should get a specific file from a package', async () => {
|
||||||
|
const wantedFiles = await verdaccioRegistry.getFilesFromPackage('@pushrocks/websetup', 'ts/');
|
||||||
|
for (const file of wantedFiles) {
|
||||||
|
console.log(file.path);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('should not get a nonexisting file from a package', async () => {
|
||||||
|
const wantedFileNotThere = await verdaccioRegistry.getFileFromPackage(
|
||||||
|
'@pushrocks/websetup',
|
||||||
|
'ts/notthere'
|
||||||
|
);
|
||||||
|
expect(wantedFileNotThere).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.start();
|
||||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
|
*/
|
||||||
|
export const commitinfo = {
|
||||||
|
name: '@push.rocks/smartnpm',
|
||||||
|
version: '2.0.4',
|
||||||
|
description: 'interface with npm to retrieve package information'
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './smartnpm.plugins'
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
|
||||||
export * from './smartnpm.classes.npmregistry'
|
export * from './smartnpm.classes.npmregistry.js';
|
||||||
export * from './smartnpm.classes.npmpackage'
|
export * from './smartnpm.classes.npmpackage.js';
|
||||||
|
@ -1,40 +1,187 @@
|
|||||||
import * as plugins from './smartnpm.plugins'
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
import { NpmRegistry } from './smartnpm.classes.npmregistry.js';
|
||||||
|
import { PackageDisttag } from './smartnpm.classes.packagedisttag.js';
|
||||||
|
import { PackageVersion, type IVersionData } from './smartnpm.classes.packageversion.js';
|
||||||
|
|
||||||
export class NpmPackage {
|
export class NpmPackage {
|
||||||
name: string = null
|
public static async createFromFullMetadataAndVersionData(
|
||||||
scope: string = null
|
npmRegistryArg: NpmRegistry,
|
||||||
version: string = null
|
fullMetadataArg: plugins.packageJson.FullMetadata,
|
||||||
description: string = null
|
versionsDataArg: {
|
||||||
keywords: string[] = null
|
name: string;
|
||||||
date: '2017-08-02T11:22:49.144Z'
|
'dist-tags': { [key: string]: string };
|
||||||
links: {
|
versions: { [key: string]: IVersionData };
|
||||||
npm: string
|
}
|
||||||
homepage: string
|
) {
|
||||||
repository: string
|
const npmPackage = new NpmPackage(npmRegistryArg);
|
||||||
bugs: string
|
Object.assign(npmPackage, fullMetadataArg);
|
||||||
} = null
|
npmPackage.allVersions = [];
|
||||||
author: {
|
npmPackage.allDistTags = [];
|
||||||
name: 'Lossless GmbH'
|
for (const versionArg of Object.keys(versionsDataArg.versions)) {
|
||||||
} = null
|
const packageVersion = PackageVersion.createFromVersionData(
|
||||||
publisher: {
|
versionsDataArg.versions[versionArg]
|
||||||
username: 'gitzone', email: 'npm@git.zone'
|
);
|
||||||
} = null
|
npmPackage.allVersions.push(packageVersion);
|
||||||
maintainers: any = null
|
}
|
||||||
score: {
|
for (const distTagArg of Object.keys(versionsDataArg['dist-tags'])) {
|
||||||
final: number,
|
const packageDistTag = new PackageDisttag(
|
||||||
detail: {
|
distTagArg,
|
||||||
quality: number,
|
versionsDataArg['dist-tags'][distTagArg]
|
||||||
popularity: number,
|
);
|
||||||
maintenance: number
|
npmPackage.allDistTags.push(packageDistTag);
|
||||||
|
}
|
||||||
|
return npmPackage;
|
||||||
}
|
}
|
||||||
} = null
|
|
||||||
searchScore: number = null
|
|
||||||
|
|
||||||
constructor (descriptionArg) {
|
// INSTANCE
|
||||||
for (let key in descriptionArg) {
|
public name: string = null;
|
||||||
if (this[key] === null) {
|
public scope: string = null;
|
||||||
this[key] = descriptionArg[key]
|
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 files from package
|
||||||
|
*/
|
||||||
|
public async getFilesFromPackage(
|
||||||
|
filePath: string,
|
||||||
|
optionsArg: {
|
||||||
|
distTag?: string;
|
||||||
|
version?: string;
|
||||||
|
},
|
||||||
|
returnOnFirstArg = false
|
||||||
|
): 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?.version || optionsArg?.distTag) {
|
||||||
|
if (optionsArg.distTag && optionsArg.version) {
|
||||||
|
throw new Error('Please either specify version OR disttag, not both.');
|
||||||
|
}
|
||||||
|
let targetVersionString: string;
|
||||||
|
if (optionsArg.distTag) {
|
||||||
|
const targetDistTag = this.allDistTags.find((distTag) => {
|
||||||
|
return distTag.name === optionsArg.distTag;
|
||||||
|
});
|
||||||
|
if (targetDistTag) {
|
||||||
|
targetVersionString = targetDistTag.targetVersion;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
targetVersionString = optionsArg.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
// lets find the best matching release
|
||||||
|
const bestMatchingVersion = this.getBestMatchingVersion(targetVersionString);
|
||||||
|
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 allMatchingFiles: plugins.smartfile.Smartfile[] = [];
|
||||||
|
const subscription = fileObservable.subscribe(
|
||||||
|
(fileArg) => {
|
||||||
|
// returnOnFirstArg requires exact match
|
||||||
|
if (returnOnFirstArg && fileArg.path === wantedFilePath) {
|
||||||
|
// lets resolve with the wanted file
|
||||||
|
done.resolve([fileArg]);
|
||||||
|
subscription.unsubscribe();
|
||||||
|
} else if (!returnOnFirstArg && fileArg.path.startsWith(wantedFilePath)) {
|
||||||
|
allMatchingFiles.push(fileArg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
console.log(err);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
done.resolve(allMatchingFiles);
|
||||||
|
subscription.unsubscribe();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return done.promise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get files from package
|
||||||
|
*/
|
||||||
|
public async getFileFromPackage(
|
||||||
|
filePath: string,
|
||||||
|
optionsArg?: {
|
||||||
|
distTag?: string;
|
||||||
|
version?: string;
|
||||||
|
}
|
||||||
|
): Promise<plugins.smartfile.Smartfile> {
|
||||||
|
const result = await this.getFilesFromPackage(filePath, optionsArg, true);
|
||||||
|
return result[0] || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* updates the package with information from the registry
|
||||||
|
*/
|
||||||
|
update() {}
|
||||||
|
|
||||||
|
/** */
|
||||||
|
public getBestMatchingVersion(versionArg: string): string {
|
||||||
|
// lets find the best matching release
|
||||||
|
const targetVersion = plugins.smartversion.SmartVersion.fromFuzzyString(versionArg);
|
||||||
|
const versionStrings = this.allVersions.map((packageVersion) => packageVersion.version);
|
||||||
|
const bestMatchingVersion = targetVersion.getBestMatch(versionStrings);
|
||||||
|
if (!bestMatchingVersion) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return bestMatchingVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,72 +1,250 @@
|
|||||||
import * as plugins from './smartnpm.plugins'
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
import * as paths from './smartnpm.paths.js';
|
||||||
|
|
||||||
// interfaces
|
// interfaces
|
||||||
import { ISearchObject } from './smartnpm.interfaces'
|
import { type ISearchObject } from './smartnpm.interfaces.js';
|
||||||
|
|
||||||
// classes
|
// classes
|
||||||
import { NpmPackage } from './smartnpm.classes.npmpackage'
|
import { NpmPackage } from './smartnpm.classes.npmpackage.js';
|
||||||
|
import { type ICacheDescriptor, RegistryCache } from './smartnpm.classes.registrycache.js';
|
||||||
|
|
||||||
export class NpmRegistry {
|
export interface INpmRegistryConstructorOptions {
|
||||||
private searchDomain = 'https://api.npms.io/v2/search?q='
|
npmRegistryUrl?: string;
|
||||||
async search (searchObjectArg: ISearchObject) {
|
|
||||||
let searchString = ''
|
|
||||||
let addToSearchString = (addStringArg: string) => {
|
|
||||||
searchString = `${searchString}+${addStringArg}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class NpmRegistry {
|
||||||
|
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.default(packageName, {
|
||||||
|
registryUrl: this.options.npmRegistryUrl,
|
||||||
|
fullMetadata: true,
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
const versionData = await plugins.packageJson.default(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,
|
||||||
|
filePathArg: string,
|
||||||
|
optionsArg?: {
|
||||||
|
distTag?: string;
|
||||||
|
version?: string;
|
||||||
|
}
|
||||||
|
): Promise<plugins.smartfile.Smartfile> {
|
||||||
|
// lets create a cache descriptor
|
||||||
|
const cacheDescriptor: ICacheDescriptor = {
|
||||||
|
registryUrl: this.options.npmRegistryUrl,
|
||||||
|
packageName: packageNameArg,
|
||||||
|
filePath: filePathArg,
|
||||||
|
distTag: optionsArg?.distTag,
|
||||||
|
version: optionsArg?.version,
|
||||||
|
};
|
||||||
|
|
||||||
|
// lets see if we have something cached
|
||||||
|
const cachedFile: plugins.smartfile.Smartfile = await this.registryCache.getCachedFile(
|
||||||
|
cacheDescriptor
|
||||||
|
);
|
||||||
|
|
||||||
|
// lets handle both occasions
|
||||||
|
if (!cachedFile) {
|
||||||
|
const npmPackage = await this.getPackageInfo(packageNameArg);
|
||||||
|
if (!optionsArg?.version && !optionsArg?.distTag) {
|
||||||
|
const latestAvailable = npmPackage.allDistTags.find(
|
||||||
|
(packageArg) => packageArg.name === 'latest'
|
||||||
|
);
|
||||||
|
if (!latestAvailable) {
|
||||||
|
optionsArg = {
|
||||||
|
version: npmPackage.getBestMatchingVersion('*'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const fileResult = await npmPackage.getFileFromPackage(filePathArg, optionsArg);
|
||||||
|
if (fileResult) {
|
||||||
|
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
|
||||||
|
}
|
||||||
|
return fileResult;
|
||||||
|
} else {
|
||||||
|
return cachedFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getFilesFromPackage(
|
||||||
|
packageNameArg: string,
|
||||||
|
filePath: string,
|
||||||
|
optionsArg?: {
|
||||||
|
distTag?: string;
|
||||||
|
version?: string;
|
||||||
|
}
|
||||||
|
): Promise<plugins.smartfile.Smartfile[]> {
|
||||||
|
const npmPackage = await this.getPackageInfo(packageNameArg);
|
||||||
|
if (!optionsArg?.version && !optionsArg?.distTag) {
|
||||||
|
const latestAvailable = npmPackage.allDistTags.find(
|
||||||
|
(packageDistTagArg) => packageDistTagArg.name === 'latest'
|
||||||
|
);
|
||||||
|
if (!latestAvailable) {
|
||||||
|
optionsArg = {
|
||||||
|
version: npmPackage.getBestMatchingVersion('*'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return npmPackage.getFilesFromPackage(filePath, optionsArg);
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
// name
|
||||||
if (searchObjectArg.name) { searchString = `${searchObjectArg.name}` }
|
if (searchObjectArg.name) {
|
||||||
|
searchString = `${searchObjectArg.name}`;
|
||||||
|
}
|
||||||
|
|
||||||
// metadata
|
// metadata
|
||||||
if (searchObjectArg.author) { addToSearchString(`author:${searchObjectArg.author}`) }
|
if (searchObjectArg.author) {
|
||||||
if (searchObjectArg.maintainer) { addToSearchString(`maintainer:${searchObjectArg.maintainer}`) }
|
addToSearchString(`author:${searchObjectArg.author}`);
|
||||||
if (searchObjectArg.scope) { addToSearchString(`scope:${searchObjectArg.scope}`) }
|
}
|
||||||
|
if (searchObjectArg.maintainer) {
|
||||||
|
addToSearchString(`maintainer:${searchObjectArg.maintainer}`);
|
||||||
|
}
|
||||||
|
if (searchObjectArg.scope) {
|
||||||
|
addToSearchString(`scope:${searchObjectArg.scope}`);
|
||||||
|
}
|
||||||
|
|
||||||
// status
|
// status
|
||||||
if (searchObjectArg.deprecated) {
|
if (searchObjectArg.deprecated) {
|
||||||
if (searchObjectArg.deprecated === true) {
|
if (searchObjectArg.deprecated === true) {
|
||||||
addToSearchString(`is:deprecated`)
|
addToSearchString(`is:deprecated`);
|
||||||
} else {
|
} else {
|
||||||
addToSearchString(`not:deprecated`)
|
addToSearchString(`not:deprecated`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (searchObjectArg.unstable) {
|
if (searchObjectArg.unstable) {
|
||||||
if (searchObjectArg.unstable === true) {
|
if (searchObjectArg.unstable === true) {
|
||||||
addToSearchString(`is:unstable`)
|
addToSearchString(`is:unstable`);
|
||||||
} else {
|
} else {
|
||||||
addToSearchString(`not:unstable`)
|
addToSearchString(`not:unstable`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (searchObjectArg.insecure) {
|
if (searchObjectArg.insecure) {
|
||||||
if (searchObjectArg.insecure === true) {
|
if (searchObjectArg.insecure === true) {
|
||||||
addToSearchString(`is:insecure`)
|
addToSearchString(`is:insecure`);
|
||||||
} else {
|
} else {
|
||||||
addToSearchString(`not:insecure`)
|
addToSearchString(`not:insecure`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// search behaviour
|
// search behaviour
|
||||||
if (searchObjectArg.boostExact) { addToSearchString(`boost-exact:${searchObjectArg.boostExact}`) }
|
if (searchObjectArg.boostExact) {
|
||||||
if (searchObjectArg.scoreEffect) { addToSearchString(`score-effect:${searchObjectArg.scoreEffect}`) }
|
addToSearchString(`boost-exact:${searchObjectArg.boostExact}`);
|
||||||
|
}
|
||||||
|
if (searchObjectArg.scoreEffect) {
|
||||||
|
addToSearchString(`score-effect:${searchObjectArg.scoreEffect}`);
|
||||||
|
}
|
||||||
|
|
||||||
// analytics
|
// analytics
|
||||||
if (searchObjectArg.qualityWeight) { addToSearchString(`author:${searchObjectArg.qualityWeight}`) }
|
if (searchObjectArg.qualityWeight) {
|
||||||
if (searchObjectArg.popularityWeight) { addToSearchString(`author:${searchObjectArg.popularityWeight}`) }
|
addToSearchString(`author:${searchObjectArg.qualityWeight}`);
|
||||||
if (searchObjectArg.maintenanceWeight) { addToSearchString(`author:${searchObjectArg.maintenanceWeight}`) }
|
}
|
||||||
|
if (searchObjectArg.popularityWeight) {
|
||||||
plugins.beautylog.log(`Search on npm for ${plugins.beautycolor.coloredString(searchString, 'pink')}`)
|
addToSearchString(`author:${searchObjectArg.popularityWeight}`);
|
||||||
|
}
|
||||||
let response = (await plugins.smartrequest.get(this.searchDomain + searchString, {}))
|
if (searchObjectArg.maintenanceWeight) {
|
||||||
let body: any = response.body
|
addToSearchString(`author:${searchObjectArg.maintenanceWeight}`);
|
||||||
|
|
||||||
// lets create the response
|
|
||||||
let packageArray: NpmPackage[] = []
|
|
||||||
|
|
||||||
for (let packageArg of body.results) {
|
|
||||||
let localPackage = new NpmPackage(packageArg.package)
|
|
||||||
packageArray.push(localPackage)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return packageArray
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
ts/smartnpm.classes.packagedisttag.ts
Normal file
11
ts/smartnpm.classes.packagedisttag.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
|
||||||
|
export class PackageDisttag {
|
||||||
|
name: string;
|
||||||
|
targetVersion: string;
|
||||||
|
|
||||||
|
constructor(nameArg: string, targetVersionArg: string) {
|
||||||
|
this.name = nameArg;
|
||||||
|
this.targetVersion = targetVersionArg;
|
||||||
|
}
|
||||||
|
}
|
31
ts/smartnpm.classes.packageversion.ts
Normal file
31
ts/smartnpm.classes.packageversion.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
63
ts/smartnpm.classes.registrycache.ts
Normal file
63
ts/smartnpm.classes.registrycache.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import { NpmRegistry } from './smartnpm.classes.npmregistry.js';
|
||||||
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
|
||||||
|
export interface ICacheDescriptor {
|
||||||
|
registryUrl: string;
|
||||||
|
packageName: string;
|
||||||
|
filePath: string;
|
||||||
|
distTag?: string;
|
||||||
|
version?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
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(
|
||||||
|
cacheDescriptorArg: ICacheDescriptor
|
||||||
|
): Promise<plugins.smartfile.Smartfile> {
|
||||||
|
const cacheEntry = await this.levelCache.retrieveCacheEntryByKey(
|
||||||
|
this.getCacheDescriptorAsString(cacheDescriptorArg)
|
||||||
|
);
|
||||||
|
if (cacheEntry) {
|
||||||
|
return plugins.smartfile.Smartfile.fromFoldedJson(cacheEntry.contents.toString());
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async cacheSmartFile(
|
||||||
|
cacheDescriptorArg: ICacheDescriptor,
|
||||||
|
smartfileArg: plugins.smartfile.Smartfile
|
||||||
|
) {
|
||||||
|
if (smartfileArg && cacheDescriptorArg.version) {
|
||||||
|
await this.levelCache.storeCacheEntryByKey(
|
||||||
|
this.getCacheDescriptorAsString(cacheDescriptorArg),
|
||||||
|
new plugins.levelcache.CacheEntry({
|
||||||
|
contents: Buffer.from(smartfileArg.foldToJson()),
|
||||||
|
ttl: plugins.smarttime.getMilliSecondsFromUnits({ hours: 1 }),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await this.levelCache.storeCacheEntryByKey(
|
||||||
|
this.getCacheDescriptorAsString(cacheDescriptorArg),
|
||||||
|
new plugins.levelcache.CacheEntry({
|
||||||
|
contents: Buffer.from(smartfileArg.foldToJson()),
|
||||||
|
ttl: plugins.smarttime.getMilliSecondsFromUnits({ minutes: 1 }),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public getCacheDescriptorAsString(cacheDescriptorArg?: ICacheDescriptor) {
|
||||||
|
return `${cacheDescriptorArg.registryUrl}//+//${cacheDescriptorArg.packageName}//+//${
|
||||||
|
cacheDescriptorArg.filePath
|
||||||
|
}//+//${cacheDescriptorArg.distTag || cacheDescriptorArg.version}`;
|
||||||
|
}
|
||||||
|
}
|
@ -1,25 +1,24 @@
|
|||||||
|
|
||||||
export interface ISearchObject {
|
export interface ISearchObject {
|
||||||
// name
|
// name
|
||||||
name?: string
|
name?: string;
|
||||||
|
|
||||||
// metadata
|
// metadata
|
||||||
author?: string
|
author?: string;
|
||||||
maintainer?: string
|
maintainer?: string;
|
||||||
scope?: string
|
scope?: string;
|
||||||
keywords?: string[]
|
keywords?: string[];
|
||||||
|
|
||||||
// status
|
// status
|
||||||
deprecated?: boolean
|
deprecated?: boolean;
|
||||||
unstable?: boolean
|
unstable?: boolean;
|
||||||
insecure?: boolean
|
insecure?: boolean;
|
||||||
|
|
||||||
// search behaviour
|
// search behaviour
|
||||||
boostExact?: boolean
|
boostExact?: boolean;
|
||||||
scoreEffect?: number
|
scoreEffect?: number;
|
||||||
|
|
||||||
// Analytics
|
// Analytics
|
||||||
qualityWeight?: number
|
qualityWeight?: number;
|
||||||
popularityWeight?: number
|
popularityWeight?: number;
|
||||||
maintenanceWeight?: number
|
maintenanceWeight?: number;
|
||||||
}
|
}
|
||||||
|
7
ts/smartnpm.paths.ts
Normal file
7
ts/smartnpm.paths.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import * as plugins from './smartnpm.plugins.js';
|
||||||
|
|
||||||
|
export const packageDir = plugins.path.join(
|
||||||
|
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||||
|
'../'
|
||||||
|
);
|
||||||
|
export const nogitDir = plugins.path.join(packageDir, '.nogit/');
|
@ -1,11 +1,32 @@
|
|||||||
import 'typings-global'
|
// node native modules
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
import * as beautycolor from 'beautycolor'
|
export { path };
|
||||||
import * as beautylog from 'beautylog'
|
|
||||||
import * as smartrequest from 'smartrequest'
|
// @pushrocks scope
|
||||||
|
import * as consolecolor from '@push.rocks/consolecolor';
|
||||||
|
import * as levelcache from '@push.rocks/levelcache';
|
||||||
|
import * as smartarchive from '@push.rocks/smartarchive';
|
||||||
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
|
import * as smartrequest from '@push.rocks/smartrequest';
|
||||||
|
import * as smartversion from '@push.rocks/smartversion';
|
||||||
|
import * as smarttime from '@push.rocks/smarttime';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
beautycolor,
|
consolecolor,
|
||||||
beautylog,
|
levelcache,
|
||||||
smartrequest
|
smartarchive,
|
||||||
}
|
smartfile,
|
||||||
|
smartpath,
|
||||||
|
smartpromise,
|
||||||
|
smartrequest,
|
||||||
|
smartversion,
|
||||||
|
smarttime,
|
||||||
|
};
|
||||||
|
|
||||||
|
// third party scope
|
||||||
|
import * as packageJson from 'package-json';
|
||||||
|
|
||||||
|
export { packageJson };
|
||||||
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"useDefineForClassFields": false,
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "NodeNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"verbatimModuleSyntax": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"dist_*/**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "tslint-config-standard"
|
|
||||||
}
|
|
518
yarn.lock
518
yarn.lock
@ -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"
|
|
Reference in New Issue
Block a user