fix(core): update
This commit is contained in:
parent
d0f6e88388
commit
2cb227632f
@ -31,7 +31,7 @@ audit:
|
|||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci command npm install --ignore-scripts
|
- npmci command npm install --ignore-scripts
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
- npmci command npm audit --audit-level=moderate
|
- npmci command npm audit --audit-level=high
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
|
3757
package-lock.json
generated
3757
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@ -9,22 +9,21 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(tstest test/)",
|
||||||
"build": "(tsbuild)"
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.22",
|
"@gitzone/tsbuild": "^2.1.24",
|
||||||
"@gitzone/tsrun": "^1.2.8",
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@gitzone/tstest": "^1.0.28",
|
"@gitzone/tstest": "^1.0.33",
|
||||||
"@pushrocks/tapbundle": "^3.2.1",
|
"@pushrocks/tapbundle": "^3.2.1",
|
||||||
"@types/node": "^13.9.1",
|
"@types/node": "^14.0.14",
|
||||||
"tslint": "^6.1.0",
|
"tslint": "^6.1.2",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/consolecolor": "^2.0.1",
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
"@pushrocks/smartarchive": "^1.0.12",
|
"@pushrocks/smartarchive": "^1.0.12",
|
||||||
"@pushrocks/smartfile": "^7.0.11",
|
"@pushrocks/smartfile": "^7.0.12",
|
||||||
"@pushrocks/smartlog": "^2.0.21",
|
|
||||||
"@pushrocks/smartrequest": "^1.1.47",
|
"@pushrocks/smartrequest": "^1.1.47",
|
||||||
"package-json": "^6.5.0"
|
"package-json": "^6.5.0"
|
||||||
},
|
},
|
||||||
|
21
readme.md
21
readme.md
@ -8,13 +8,20 @@ interface with npm to retrieve package information
|
|||||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartnpm/)
|
* [docs (typedoc)](https://pushrocks.gitlab.io/smartnpm/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[![pipeline status](https://gitlab.com/pushrocks/smartnpm/badges/master/pipeline.svg)](https://gitlab.com/pushrocks/smartnpm/commits/master)
|
|
||||||
[![coverage report](https://gitlab.com/pushrocks/smartnpm/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartnpm/commits/master)
|
Status Category | Status Badge
|
||||||
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartnpm.svg)](https://www.npmjs.com/package/@pushrocks/smartnpm)
|
-- | --
|
||||||
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartnpm/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartnpm)
|
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartnpm/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||||
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartnpm/badges/master/coverage.svg)](https://lossless.cloud)
|
||||||
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartnpm)](https://lossless.cloud)
|
||||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
|
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartnpm)](https://lossless.cloud)
|
||||||
|
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
|
||||||
|
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
|
||||||
|
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartnpm)](https://lossless.cloud)
|
||||||
|
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartnpm)](https://lossless.cloud)
|
||||||
|
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartnpm)](https://lossless.cloud)
|
||||||
|
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ export class NpmRegistry {
|
|||||||
|
|
||||||
constructor(optionsArg: INpmRegistryConstructorOptions = {}) {
|
constructor(optionsArg: INpmRegistryConstructorOptions = {}) {
|
||||||
const defaultOptions: INpmRegistryConstructorOptions = {
|
const defaultOptions: INpmRegistryConstructorOptions = {
|
||||||
npmRegistryUrl: 'https://registry.npmjs.org'
|
npmRegistryUrl: 'https://registry.npmjs.org',
|
||||||
};
|
};
|
||||||
this.options = {
|
this.options = {
|
||||||
...defaultOptions,
|
...defaultOptions,
|
||||||
...optionsArg
|
...optionsArg,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ export class NpmRegistry {
|
|||||||
public async getPackageInfo(packageName: string): Promise<NpmPackage> {
|
public async getPackageInfo(packageName: string): Promise<NpmPackage> {
|
||||||
const fullMetadata = await plugins.packageJson(packageName, {
|
const fullMetadata = await plugins.packageJson(packageName, {
|
||||||
registryUrl: this.options.npmRegistryUrl,
|
registryUrl: this.options.npmRegistryUrl,
|
||||||
fullMetadata: true
|
fullMetadata: true,
|
||||||
});
|
});
|
||||||
const npmPackage = await NpmPackage.createFromFullMetadata(this, fullMetadata);
|
const npmPackage = await NpmPackage.createFromFullMetadata(this, fullMetadata);
|
||||||
return npmPackage;
|
return npmPackage;
|
||||||
@ -134,9 +134,8 @@ export class NpmRegistry {
|
|||||||
addToSearchString(`author:${searchObjectArg.maintenanceWeight}`);
|
addToSearchString(`author:${searchObjectArg.maintenanceWeight}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.smartlog.defaultLogger.log(
|
console.log(
|
||||||
'info',
|
`info: Search on npm for ${plugins.consolecolor.coloredString(searchString, 'pink')}`
|
||||||
`Search on npm for ${plugins.consolecolor.coloredString(searchString, 'pink')}`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let body: any;
|
let body: any;
|
||||||
|
@ -7,11 +7,9 @@ export { path };
|
|||||||
import * as consolecolor from '@pushrocks/consolecolor';
|
import * as consolecolor from '@pushrocks/consolecolor';
|
||||||
import * as smartarchive from '@pushrocks/smartarchive';
|
import * as smartarchive from '@pushrocks/smartarchive';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
import * as smartlog from '@pushrocks/smartlog';
|
|
||||||
smartlog.defaultLogger.enableConsole();
|
|
||||||
import * as smartrequest from '@pushrocks/smartrequest';
|
import * as smartrequest from '@pushrocks/smartrequest';
|
||||||
|
|
||||||
export { consolecolor, smartarchive, smartfile, smartlog, smartrequest };
|
export { consolecolor, smartarchive, smartfile, smartrequest };
|
||||||
|
|
||||||
// third party scope
|
// third party scope
|
||||||
import packageJson from 'package-json';
|
import packageJson from 'package-json';
|
||||||
|
Loading…
Reference in New Issue
Block a user