清除项目内容并重新初始化项目文件,删掉全部,升级node升级yarn升级@nestjs/cli,然后 nest new ninghao-nestjs
This commit is contained in:
parent
d5ddcbfc30
commit
ab3909ef15
|
@ -1,53 +0,0 @@
|
||||||
---
|
|
||||||
title: NinghaoNodeCamp2019
|
|
||||||
date: 2019-06-17
|
|
||||||
draft: false
|
|
||||||
---
|
|
||||||
|
|
||||||
NinghaoNodeCamp2019 的时间安排是 0615-0630,不过由于周末有其它事情没及时开启,今天来追上吧。(暂时此文不发布到博客,先跟着项目更新走)
|
|
||||||
|
|
||||||
相关链接:
|
|
||||||
|
|
||||||
https://gitea.isyin.cn/jeremy/ninghao-nestjs
|
|
||||||
|
|
||||||
https://github.com/jeremyyin2012/ninghao-nestjs
|
|
||||||
|
|
||||||
https://nnc2019.isyin.cn
|
|
||||||
|
|
||||||
## 00 prepare
|
|
||||||
|
|
||||||
### 0001 命令行界面
|
|
||||||
|
|
||||||
我是 macOS 所以就用自带终端 Terminal 就可以了,以及我也有装了 iTerm,以及也在不久前才配置了 oh-my-zsh,可以了。
|
|
||||||
|
|
||||||
Windows 下 cmder 以前没遇到过,毕竟用的少,也因为 cmd 不好用;据说 Windows 以后会有个很厉害的终端,可能还没那么快,那就先用着 cmder 吧。
|
|
||||||
|
|
||||||
### 0002 Git
|
|
||||||
|
|
||||||
git macOS 上有的,不过我又用 brew upgrade 更新到了最新版本,不过其实 git 命令用的其实不多,大部分时间还是会用 GUI 类型的产品,一年前基本是 Source Tree,但是由于它经常性死掉,所以后来就寻找新的替代,经过一些尝试,后来发现了 Fork,体验很好,个人非常喜欢,也在推荐朋友们使用。
|
|
||||||
|
|
||||||
### 0003 代码编辑器
|
|
||||||
|
|
||||||
编辑器我工作中针对长期项目主要是 PyCharm,临时看一下或者是啥,就会用 VS Code,经常性地也会把 VS Code 当作临时文本片段编辑器来用,比如竖向编辑;Sublime 也装着,长期开着做临时文本记录用,直接打开代码文件也会是用它来查看。
|
|
||||||
|
|
||||||
### 0004 HTTP 客户端
|
|
||||||
|
|
||||||
试过 Postman 还有一些其它的以及 Insomnia,后来直接买了 Paw,蛮喜欢的。
|
|
||||||
|
|
||||||
### 0005 数据库客户端
|
|
||||||
|
|
||||||
产品有很多,不过现在都没咋用 GUI 客户端了,能用 Web 的就用 Web 的了,几个客户端都蛮能吃内存的,Sequel Pro 以前用过,很好用,但是 MySQL 升级到 8 它就不支持了,现在不知道更新没;TablePlus 以前没遇到过,不过看介绍挺喜欢的,不过价格也感人,后面试用下看看。配数据库服务我现在都一般会配上一个 Web 管理服务,不在本地搞太多东西了,MySQL:Adminer,Mongo:Mongo Express,Redis:PHPRedisAdmin。
|
|
||||||
|
|
||||||
### 0006 Node.js(v11.13)
|
|
||||||
|
|
||||||
本地我用 brew 升级到了 v12.4.0
|
|
||||||
|
|
||||||
### 0007 Docker 桌面版
|
|
||||||
|
|
||||||
Docker 我已经用了蛮久了,开发和生产都在用,目前主要是用 docker-compose 来操作,应对较小规模场景完全没问题,几乎只需要敲一个命令就完成全部事情。k8s 是非常好,不过手里没那么多配套资源,复杂度也蛮高,暂时还没吃下来。
|
|
||||||
|
|
||||||
日常要用的数据库啊什么的都是跑在 Docker 里面了,反正能上 Docker 就优先上 Docker,简直不要太舒服,就两只手操作那么多服务,照以前那还不得死去活来。
|
|
||||||
|
|
||||||
### 0008 MySQL(v5.7)
|
|
||||||
|
|
||||||
目前我是会优先考虑 8 版本的,不过好在有 Docker,你想什么版本就什么版本,多服务多版本共存也完全不是问题。
|
|
|
@ -23,8 +23,6 @@
|
||||||
"@nestjs/common": "^6.0.0",
|
"@nestjs/common": "^6.0.0",
|
||||||
"@nestjs/core": "^6.0.0",
|
"@nestjs/core": "^6.0.0",
|
||||||
"@nestjs/platform-express": "^6.0.0",
|
"@nestjs/platform-express": "^6.0.0",
|
||||||
"class-transformer": "^0.2.3",
|
|
||||||
"class-validator": "^0.9.1",
|
|
||||||
"reflect-metadata": "^0.1.12",
|
"reflect-metadata": "^0.1.12",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"rxjs": "^6.3.3"
|
"rxjs": "^6.3.3"
|
||||||
|
@ -48,11 +46,7 @@
|
||||||
"wait-on": "^3.2.0"
|
"wait-on": "^3.2.0"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": ["js", "json", "ts"],
|
||||||
"js",
|
|
||||||
"json",
|
|
||||||
"ts"
|
|
||||||
],
|
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"testRegex": ".spec.ts$",
|
"testRegex": ".spec.ts$",
|
||||||
"transform": {
|
"transform": {
|
||||||
|
|
|
@ -1,32 +1,10 @@
|
||||||
import { Module, NestModule, MiddlewareConsumer} from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
import { AppController } from './app.controller';
|
import { AppController } from './app.controller';
|
||||||
import { AppService } from './app.service';
|
import { AppService } from './app.service';
|
||||||
import { PostsModule } from './modules/posts/posts.module';
|
|
||||||
import { DemoMiddleware } from './core/middleware/demo.middleware'
|
|
||||||
import { APP_GUARD } from '@nestjs/core';
|
|
||||||
import { DemoRolesGuard } from './core/guards/demo-roles.guard'
|
|
||||||
import { APP_INTERCEPTOR } from '@nestjs/core';
|
|
||||||
import { LoggingInterceptor } from './core/interceptors/logging.interceptor'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [PostsModule],
|
imports: [],
|
||||||
controllers: [AppController],
|
controllers: [AppController],
|
||||||
providers: [
|
providers: [AppService],
|
||||||
AppService,
|
|
||||||
{
|
|
||||||
provide: APP_GUARD,
|
|
||||||
useClass: DemoRolesGuard,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
provide: APP_INTERCEPTOR,
|
|
||||||
useClass: LoggingInterceptor,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class AppModule implements NestModule {
|
export class AppModule {}
|
||||||
configure(consumer: MiddlewareConsumer) {
|
|
||||||
consumer.apply(DemoMiddleware).forRoutes('posts')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
import { ReflectMetadata, SetMetadata } from '@nestjs/common';
|
|
||||||
|
|
||||||
export const Roles = (...args: string[]) => SetMetadata('roles', args);
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { createParamDecorator } from '@nestjs/common'
|
|
||||||
|
|
||||||
export const User = createParamDecorator((data, req) => {
|
|
||||||
console.log('data:', data)
|
|
||||||
|
|
||||||
return req.user[data]
|
|
||||||
})
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { DemoFilter } from './demo.filter';
|
|
||||||
|
|
||||||
describe('DemoFilter', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new DemoFilter()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,16 +0,0 @@
|
||||||
import { ArgumentsHost, Catch, ExceptionFilter, HttpException } from '@nestjs/common';
|
|
||||||
|
|
||||||
@Catch(HttpException)
|
|
||||||
export class DemoFilter<T> implements ExceptionFilter {
|
|
||||||
catch(exception: HttpException, host: ArgumentsHost) {
|
|
||||||
const ctx = host.switchToHttp();
|
|
||||||
const response = ctx.getResponse();
|
|
||||||
const request = ctx.getRequest();
|
|
||||||
const status = exception.getStatus();
|
|
||||||
|
|
||||||
response.status(status).json({
|
|
||||||
statusCode: status,
|
|
||||||
path: request.url,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { DemoAuthGuard } from './demo-auth.guard';
|
|
||||||
|
|
||||||
describe('DemoAuthGuard', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new DemoAuthGuard()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,13 +0,0 @@
|
||||||
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class DemoAuthGuard implements CanActivate {
|
|
||||||
canActivate(
|
|
||||||
context: ExecutionContext,
|
|
||||||
): boolean | Promise<boolean> | Observable<boolean> {
|
|
||||||
const request = context.switchToHttp().getRequest();
|
|
||||||
|
|
||||||
return request.header('x-demo') === 'secret';
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { DemoRolesGuard } from './demo-roles.guard';
|
|
||||||
|
|
||||||
describe('DemoRolesGuard', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new DemoRolesGuard()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,28 +0,0 @@
|
||||||
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { Reflector } from '@nestjs/core';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class DemoRolesGuard implements CanActivate {
|
|
||||||
constructor(private readonly reflector: Reflector) {}
|
|
||||||
|
|
||||||
canActivate(
|
|
||||||
context: ExecutionContext,
|
|
||||||
): boolean | Promise<boolean> | Observable<boolean> {
|
|
||||||
console.log('handler:', context.getHandler());
|
|
||||||
console.log('class:', context.getClass());
|
|
||||||
|
|
||||||
const roles = this.reflector.get<string[]>('roles', context.getHandler())
|
|
||||||
console.log(roles)
|
|
||||||
|
|
||||||
if (!roles) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
const request = context.switchToHttp().getRequest();
|
|
||||||
const { user } = request;
|
|
||||||
const hasRole = () => user.roles.some(item => roles.includes(item))
|
|
||||||
|
|
||||||
return user && user.roles && hasRole();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { ErrorsInterceptor } from './errors.interceptor';
|
|
||||||
|
|
||||||
describe('ErrorsInterceptor', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new ErrorsInterceptor()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,14 +0,0 @@
|
||||||
import { CallHandler, ExecutionContext, Injectable, NestInterceptor, BadGatewayException } from '@nestjs/common';
|
|
||||||
import { Observable, throwError } from 'rxjs';
|
|
||||||
import { catchError } from 'rxjs/operators'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class ErrorsInterceptor implements NestInterceptor {
|
|
||||||
intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
|
|
||||||
return next
|
|
||||||
.handle()
|
|
||||||
.pipe(
|
|
||||||
catchError(error => throwError(new BadGatewayException()))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { LoggingInterceptor } from './logging.interceptor';
|
|
||||||
|
|
||||||
describe('LoggingInterceptor', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new LoggingInterceptor()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,21 +0,0 @@
|
||||||
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { tap } from 'rxjs/operators'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class LoggingInterceptor implements NestInterceptor {
|
|
||||||
intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
|
|
||||||
console.log('I am a interceptor!')
|
|
||||||
|
|
||||||
const now = Date.now();
|
|
||||||
console.log('before...');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return next
|
|
||||||
.handle()
|
|
||||||
.pipe(
|
|
||||||
tap(() => console.log(`after... ${Date.now() - now}ms`))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { TransformInterceptor } from './transform.interceptor';
|
|
||||||
|
|
||||||
describe('TransformInterceptor', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new TransformInterceptor()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,18 +0,0 @@
|
||||||
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { map } from 'rxjs/operators';
|
|
||||||
|
|
||||||
export interface Response<T>{
|
|
||||||
data: T;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class TransformInterceptor<T> implements NestInterceptor<T, Response<T>> {
|
|
||||||
intercept(context: ExecutionContext, next: CallHandler): Observable<Response<T>> {
|
|
||||||
return next
|
|
||||||
.handle()
|
|
||||||
.pipe(
|
|
||||||
map(item => ({data: item})) // 这个map和js那个map貌似还是有点不一样,那边返回的是一个数组呀?
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { DemoMiddleware } from './demo.middleware';
|
|
||||||
|
|
||||||
describe('DemoMiddleware', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new DemoMiddleware()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,24 +0,0 @@
|
||||||
import { Injectable, NestMiddleware } from '@nestjs/common';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class DemoMiddleware implements NestMiddleware {
|
|
||||||
use(req: any, res: any, next: () => void) {
|
|
||||||
console.log('hello ~')
|
|
||||||
req.user = {
|
|
||||||
roles: [
|
|
||||||
'guest'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (req.header('x-demo') === 'secret') {
|
|
||||||
req.user = {
|
|
||||||
roles: [
|
|
||||||
'member'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
import { DemoPipe } from './demo.pipe';
|
|
||||||
|
|
||||||
describe('DemoPipe', () => {
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(new DemoPipe()).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,8 +0,0 @@
|
||||||
import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class DemoPipe implements PipeTransform {
|
|
||||||
transform(value: any, metadata: ArgumentMetadata) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +1,8 @@
|
||||||
import { NestFactory } from '@nestjs/core';
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
import { DemoFilter } from './core/filters/demo.filter'
|
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
// app.useGlobalFilters(new DemoFilter());
|
|
||||||
await app.listen(3000);
|
await app.listen(3000);
|
||||||
}
|
}
|
||||||
bootstrap();
|
bootstrap();
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
export interface Post {
|
|
||||||
title: string
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
import { IsString } from 'class-validator'
|
|
||||||
|
|
||||||
export class CreatePostDto {
|
|
||||||
@IsString()
|
|
||||||
readonly title: string
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
import { Test, TestingModule } from '@nestjs/testing';
|
|
||||||
import { PostsController } from './posts.controller';
|
|
||||||
|
|
||||||
describe('Posts Controller', () => {
|
|
||||||
let controller: PostsController;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
|
||||||
controllers: [PostsController],
|
|
||||||
}).compile();
|
|
||||||
|
|
||||||
controller = module.get<PostsController>(PostsController);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(controller).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,51 +0,0 @@
|
||||||
import { Controller, Get, Post, Req, Query, Headers, Param, Body, HttpException, HttpStatus, ForbiddenException, UseFilters, UsePipes, ValidationPipe, ParseIntPipe, UseGuards, SetMetadata, UseInterceptors } from '@nestjs/common';
|
|
||||||
import { CreatePostDto } from './post.dto';
|
|
||||||
import { DemoService } from './providers/demo/demo.service'
|
|
||||||
import { DemoFilter } from '../../core/filters/demo.filter'
|
|
||||||
import { DemoAuthGuard } from '../../core/guards/demo-auth.guard'
|
|
||||||
import { Roles } from '../../core/decorators/roles.decorator'
|
|
||||||
import { User } from '../../core/decorators/user.decorator'
|
|
||||||
import { LoggingInterceptor } from '../../core/interceptors/logging.interceptor'
|
|
||||||
import { TransformInterceptor } from '../../core/interceptors/transform.interceptor'
|
|
||||||
import { ErrorsInterceptor } from '../../core/interceptors/errors.interceptor'
|
|
||||||
|
|
||||||
@Controller('posts')
|
|
||||||
// @UseGuards(DemoAuthGuard)
|
|
||||||
// @UseFilters(DemoFilter)
|
|
||||||
// @ UseInterceptors(LoggingInterceptor)
|
|
||||||
export class PostsController {
|
|
||||||
|
|
||||||
constructor(private readonly demoService: DemoService) {}
|
|
||||||
|
|
||||||
@Get()
|
|
||||||
@UseInterceptors(TransformInterceptor)
|
|
||||||
@UseInterceptors(ErrorsInterceptor)
|
|
||||||
index() {
|
|
||||||
throw new ForbiddenException();
|
|
||||||
// return this.demoService.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id')
|
|
||||||
show(@Param('id', ParseIntPipe) id) {
|
|
||||||
console.log('typeof id:', typeof id);
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: `Post ${id}`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Post()
|
|
||||||
// @UseFilters(DemoFilter)
|
|
||||||
@UsePipes(ValidationPipe)
|
|
||||||
// @SetMetadata('roles', ['member', 89])
|
|
||||||
// @Roles('member', 'tester')
|
|
||||||
@Roles(...['member', 'tester'])
|
|
||||||
store(@Body() post: CreatePostDto, @User('roles') roles) {
|
|
||||||
console.log('roles:', roles)
|
|
||||||
|
|
||||||
|
|
||||||
// throw new HttpException('没有权限!', HttpStatus.FORBIDDEN)
|
|
||||||
// throw new ForbiddenException('没有权限!')
|
|
||||||
this.demoService.create(post);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import { Module } from '@nestjs/common';
|
|
||||||
import { PostsController } from './posts.controller';
|
|
||||||
import { DemoService } from "./providers/demo/demo.service";
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
controllers: [PostsController],
|
|
||||||
providers: [DemoService]
|
|
||||||
})
|
|
||||||
export class PostsModule {}
|
|
|
@ -1,18 +0,0 @@
|
||||||
import { Test, TestingModule } from '@nestjs/testing';
|
|
||||||
import { DemoService } from './demo.service';
|
|
||||||
|
|
||||||
describe('DemoService', () => {
|
|
||||||
let service: DemoService;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
|
||||||
providers: [DemoService],
|
|
||||||
}).compile();
|
|
||||||
|
|
||||||
service = module.get<DemoService>(DemoService);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be defined', () => {
|
|
||||||
expect(service).toBeDefined();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
|
||||||
import { Post } from 'src/modules/posts/interfaces/post.interface';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class DemoService {
|
|
||||||
private readonly posts: Post[] = [];
|
|
||||||
|
|
||||||
findAll(): Post[] {
|
|
||||||
return this.posts;
|
|
||||||
}
|
|
||||||
|
|
||||||
create(post: Post) {
|
|
||||||
this.posts.push(post);
|
|
||||||
}
|
|
||||||
}
|
|
81
yarn.lock
81
yarn.lock
|
@ -797,11 +797,6 @@ ci-info@^1.5.0:
|
||||||
resolved "https://registry.npm.taobao.org/ci-info/download/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
|
resolved "https://registry.npm.taobao.org/ci-info/download/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
|
||||||
integrity sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc=
|
integrity sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc=
|
||||||
|
|
||||||
class-transformer@^0.2.3:
|
|
||||||
version "0.2.3"
|
|
||||||
resolved "https://registry.npm.taobao.org/class-transformer/download/class-transformer-0.2.3.tgz#598c92ca71dcca73f91ccb875d74a3847ccfa32d"
|
|
||||||
integrity sha1-WYySynHcynP5HMuHXXSjhHzPoy0=
|
|
||||||
|
|
||||||
class-utils@^0.3.5:
|
class-utils@^0.3.5:
|
||||||
version "0.3.6"
|
version "0.3.6"
|
||||||
resolved "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
|
resolved "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
|
||||||
|
@ -812,14 +807,6 @@ class-utils@^0.3.5:
|
||||||
isobject "^3.0.0"
|
isobject "^3.0.0"
|
||||||
static-extend "^0.1.1"
|
static-extend "^0.1.1"
|
||||||
|
|
||||||
class-validator@^0.9.1:
|
|
||||||
version "0.9.1"
|
|
||||||
resolved "https://registry.npm.taobao.org/class-validator/download/class-validator-0.9.1.tgz#d60e58c5d14abca0a41bce38cf792ad4c46d1531"
|
|
||||||
integrity sha1-1g5YxdFKvKCkG844z3kq1MRtFTE=
|
|
||||||
dependencies:
|
|
||||||
google-libphonenumber "^3.1.6"
|
|
||||||
validator "10.4.0"
|
|
||||||
|
|
||||||
cli-boxes@^1.0.0:
|
cli-boxes@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npm.taobao.org/cli-boxes/download/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
|
resolved "https://registry.npm.taobao.org/cli-boxes/download/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
|
||||||
|
@ -936,9 +923,9 @@ configstore@^3.0.0:
|
||||||
xdg-basedir "^3.0.0"
|
xdg-basedir "^3.0.0"
|
||||||
|
|
||||||
consola@^2.3.0:
|
consola@^2.3.0:
|
||||||
version "2.7.1"
|
version "2.9.0"
|
||||||
resolved "https://registry.npm.taobao.org/consola/download/consola-2.7.1.tgz#3f7f7c53eb44362240c3aee41b9bb2641d5ca32e"
|
resolved "https://registry.npm.taobao.org/consola/download/consola-2.9.0.tgz?cache=0&sync_timestamp=1560867735070&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsola%2Fdownload%2Fconsola-2.9.0.tgz#57760e3a65a53ec27337f4add31505802d902278"
|
||||||
integrity sha1-P398U+tENiJAw67kG5uyZB1coy4=
|
integrity sha1-V3YOOmWlPsJzN/St0xUFgC2QIng=
|
||||||
|
|
||||||
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
|
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
|
@ -1072,7 +1059,7 @@ data-urls@^1.0.0:
|
||||||
|
|
||||||
date-fns@^1.23.0:
|
date-fns@^1.23.0:
|
||||||
version "1.30.1"
|
version "1.30.1"
|
||||||
resolved "https://registry.npm.taobao.org/date-fns/download/date-fns-1.30.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-fns%2Fdownload%2Fdate-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
|
resolved "https://registry.npm.taobao.org/date-fns/download/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
|
||||||
integrity sha1-LnG/CxGRU9u0zE6I2epaz7UNwFw=
|
integrity sha1-LnG/CxGRU9u0zE6I2epaz7UNwFw=
|
||||||
|
|
||||||
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
|
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
|
||||||
|
@ -1379,7 +1366,7 @@ exec-sh@^0.2.0:
|
||||||
|
|
||||||
execa@^0.7.0:
|
execa@^0.7.0:
|
||||||
version "0.7.0"
|
version "0.7.0"
|
||||||
resolved "https://registry.npm.taobao.org/execa/download/execa-0.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
resolved "https://registry.npm.taobao.org/execa/download/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
||||||
integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=
|
integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=
|
||||||
dependencies:
|
dependencies:
|
||||||
cross-spawn "^5.0.1"
|
cross-spawn "^5.0.1"
|
||||||
|
@ -1392,7 +1379,7 @@ execa@^0.7.0:
|
||||||
|
|
||||||
execa@^1.0.0:
|
execa@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
|
resolved "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
|
||||||
integrity sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=
|
integrity sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=
|
||||||
dependencies:
|
dependencies:
|
||||||
cross-spawn "^6.0.0"
|
cross-spawn "^6.0.0"
|
||||||
|
@ -1654,9 +1641,18 @@ forever-agent@~0.6.1:
|
||||||
resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
||||||
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
|
||||||
|
|
||||||
form-data@^2.3.1, form-data@~2.3.2:
|
form-data@^2.3.1:
|
||||||
|
version "2.4.0"
|
||||||
|
resolved "https://registry.npm.taobao.org/form-data/download/form-data-2.4.0.tgz?cache=0&sync_timestamp=1560929244634&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fform-data%2Fdownload%2Fform-data-2.4.0.tgz#4902b831b051e0db5612a35e1a098376f7b13ad8"
|
||||||
|
integrity sha1-SQK4MbBR4NtWEqNeGgmDdvexOtg=
|
||||||
|
dependencies:
|
||||||
|
asynckit "^0.4.0"
|
||||||
|
combined-stream "^1.0.6"
|
||||||
|
mime-types "^2.1.12"
|
||||||
|
|
||||||
|
form-data@~2.3.2:
|
||||||
version "2.3.3"
|
version "2.3.3"
|
||||||
resolved "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
|
resolved "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz?cache=0&sync_timestamp=1560929244634&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fform-data%2Fdownload%2Fform-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
|
||||||
integrity sha1-3M5SwF9kTymManq5Nr1yTO/786Y=
|
integrity sha1-3M5SwF9kTymManq5Nr1yTO/786Y=
|
||||||
dependencies:
|
dependencies:
|
||||||
asynckit "^0.4.0"
|
asynckit "^0.4.0"
|
||||||
|
@ -1800,11 +1796,6 @@ globals@^9.18.0:
|
||||||
resolved "https://registry.npm.taobao.org/globals/download/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
|
resolved "https://registry.npm.taobao.org/globals/download/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
|
||||||
integrity sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=
|
integrity sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=
|
||||||
|
|
||||||
google-libphonenumber@^3.1.6:
|
|
||||||
version "3.2.2"
|
|
||||||
resolved "https://registry.npm.taobao.org/google-libphonenumber/download/google-libphonenumber-3.2.2.tgz#3d9d7ba727e99a50812f21b0ed313723b76c5c54"
|
|
||||||
integrity sha1-PZ17pyfpmlCBLyGw7TE3I7dsXFQ=
|
|
||||||
|
|
||||||
got@^6.7.1:
|
got@^6.7.1:
|
||||||
version "6.7.1"
|
version "6.7.1"
|
||||||
resolved "https://registry.npm.taobao.org/got/download/got-6.7.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgot%2Fdownload%2Fgot-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0"
|
resolved "https://registry.npm.taobao.org/got/download/got-6.7.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgot%2Fdownload%2Fgot-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0"
|
||||||
|
@ -2021,9 +2012,14 @@ inflight@^1.0.4:
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
inherits@2, inherits@2.0.3, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
|
inherits@2, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
|
||||||
|
version "2.0.4"
|
||||||
|
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz?cache=0&sync_timestamp=1560975547815&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finherits%2Fdownload%2Finherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
|
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=
|
||||||
|
|
||||||
|
inherits@2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz?cache=0&sync_timestamp=1560975547815&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finherits%2Fdownload%2Finherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
|
||||||
|
|
||||||
ini@^1.3.4, ini@~1.3.0:
|
ini@^1.3.4, ini@~1.3.0:
|
||||||
|
@ -2351,7 +2347,7 @@ isemail@3.x.x:
|
||||||
|
|
||||||
isexe@^2.0.0:
|
isexe@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
resolved "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fisexe%2Fdownload%2Fisexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
|
||||||
|
|
||||||
isobject@^2.0.0:
|
isobject@^2.0.0:
|
||||||
|
@ -2390,7 +2386,7 @@ istanbul-api@^1.3.1:
|
||||||
|
|
||||||
istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1:
|
istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.npm.taobao.org/istanbul-lib-coverage/download/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0"
|
resolved "https://registry.npm.taobao.org/istanbul-lib-coverage/download/istanbul-lib-coverage-1.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0"
|
||||||
integrity sha1-zPftzQoLubj3Kf7rCTBHD5r2ZPA=
|
integrity sha1-zPftzQoLubj3Kf7rCTBHD5r2ZPA=
|
||||||
|
|
||||||
istanbul-lib-hook@^1.2.2:
|
istanbul-lib-hook@^1.2.2:
|
||||||
|
@ -2436,7 +2432,7 @@ istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6:
|
||||||
|
|
||||||
istanbul-reports@^1.5.1:
|
istanbul-reports@^1.5.1:
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.npm.taobao.org/istanbul-reports/download/istanbul-reports-1.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-reports%2Fdownload%2Fistanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a"
|
resolved "https://registry.npm.taobao.org/istanbul-reports/download/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a"
|
||||||
integrity sha1-l+Tb87UV6MSEyuoV1lJO69P/Tho=
|
integrity sha1-l+Tb87UV6MSEyuoV1lJO69P/Tho=
|
||||||
dependencies:
|
dependencies:
|
||||||
handlebars "^4.0.3"
|
handlebars "^4.0.3"
|
||||||
|
@ -3811,9 +3807,9 @@ private@^0.1.8:
|
||||||
integrity sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=
|
integrity sha1-I4Hts2ifelPWUxkAYPz4ItLzaP8=
|
||||||
|
|
||||||
process-nextick-args@~2.0.0:
|
process-nextick-args@~2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
|
resolved "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||||
integrity sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=
|
integrity sha1-eCDZsWEgzFXKmud5JoCufbptf+I=
|
||||||
|
|
||||||
prompts@^0.1.9:
|
prompts@^0.1.9:
|
||||||
version "0.1.14"
|
version "0.1.14"
|
||||||
|
@ -3837,9 +3833,9 @@ pseudomap@^1.0.2:
|
||||||
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
|
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
|
||||||
|
|
||||||
psl@^1.1.24, psl@^1.1.28:
|
psl@^1.1.24, psl@^1.1.28:
|
||||||
version "1.1.32"
|
version "1.1.33"
|
||||||
resolved "https://registry.npm.taobao.org/psl/download/psl-1.1.32.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpsl%2Fdownload%2Fpsl-1.1.32.tgz#3f132717cf2f9c169724b2b6caf373cf694198db"
|
resolved "https://registry.npm.taobao.org/psl/download/psl-1.1.33.tgz#5533d9384ca7aab86425198e10e8053ebfeab661"
|
||||||
integrity sha1-PxMnF88vnBaXJLK2yvNzz2lBmNs=
|
integrity sha1-VTPZOEynqrhkJRmOEOgFPr/qtmE=
|
||||||
|
|
||||||
pstree.remy@^1.1.6:
|
pstree.remy@^1.1.6:
|
||||||
version "1.1.7"
|
version "1.1.7"
|
||||||
|
@ -4231,7 +4227,7 @@ set-blocking@^2.0.0, set-blocking@~2.0.0:
|
||||||
|
|
||||||
set-value@^0.4.3:
|
set-value@^0.4.3:
|
||||||
version "0.4.3"
|
version "0.4.3"
|
||||||
resolved "https://registry.npm.taobao.org/set-value/download/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
|
resolved "https://registry.npm.taobao.org/set-value/download/set-value-0.4.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fset-value%2Fdownload%2Fset-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1"
|
||||||
integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE=
|
integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE=
|
||||||
dependencies:
|
dependencies:
|
||||||
extend-shallow "^2.0.1"
|
extend-shallow "^2.0.1"
|
||||||
|
@ -4241,7 +4237,7 @@ set-value@^0.4.3:
|
||||||
|
|
||||||
set-value@^2.0.0:
|
set-value@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npm.taobao.org/set-value/download/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
|
resolved "https://registry.npm.taobao.org/set-value/download/set-value-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fset-value%2Fdownload%2Fset-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
|
||||||
integrity sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=
|
integrity sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=
|
||||||
dependencies:
|
dependencies:
|
||||||
extend-shallow "^2.0.1"
|
extend-shallow "^2.0.1"
|
||||||
|
@ -4943,11 +4939,6 @@ validate-npm-package-license@^3.0.1:
|
||||||
spdx-correct "^3.0.0"
|
spdx-correct "^3.0.0"
|
||||||
spdx-expression-parse "^3.0.0"
|
spdx-expression-parse "^3.0.0"
|
||||||
|
|
||||||
validator@10.4.0:
|
|
||||||
version "10.4.0"
|
|
||||||
resolved "https://registry.npm.taobao.org/validator/download/validator-10.4.0.tgz#ee99a44afb3bb5ed350a159f056ca72a204cfc3c"
|
|
||||||
integrity sha1-7pmkSvs7te01ChWfBWynKiBM/Dw=
|
|
||||||
|
|
||||||
vary@^1, vary@~1.1.2:
|
vary@^1, vary@~1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
||||||
|
@ -5090,7 +5081,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0:
|
||||||
|
|
||||||
ws@^5.2.0:
|
ws@^5.2.0:
|
||||||
version "5.2.2"
|
version "5.2.2"
|
||||||
resolved "https://registry.npm.taobao.org/ws/download/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
|
resolved "https://registry.npm.taobao.org/ws/download/ws-5.2.2.tgz?cache=0&sync_timestamp=1560788200711&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fws%2Fdownload%2Fws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
|
||||||
integrity sha1-3/7xSGa46NyRM1glFNG++vlumA8=
|
integrity sha1-3/7xSGa46NyRM1glFNG++vlumA8=
|
||||||
dependencies:
|
dependencies:
|
||||||
async-limiter "~1.0.0"
|
async-limiter "~1.0.0"
|
||||||
|
|
Loading…
Reference in New Issue