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