-
Notifications
You must be signed in to change notification settings - Fork 0
CORE-225: Added template changes for the Nest JS to support Nest@8.0x #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| import { DynamicModule, HttpService, HttpModule, Module, Global } from '@nestjs/common'; | ||
| import { DynamicModule, Module, Global } from '@nestjs/common'; | ||
| import { Configuration } from './configuration'; | ||
| import { HttpService, HttpModule } from '@nestjs/axios'; | ||
| import { ConfigModule, ConfigService } from '@nestjs/config'; | ||
|
|
||
| {{#apiInfo}} | ||
| {{#apis}} | ||
|
|
@@ -9,7 +11,7 @@ import { {{classname}} } from './{{importPath}}'; | |
|
|
||
| @Global() | ||
| @Module({ | ||
| imports: [ HttpModule ], | ||
| imports: [ HttpModule, ConfigModule ], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this used? |
||
| exports: [ | ||
| {{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, | ||
| {{/-last}}{{/apis}}{{/apiInfo}} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| {{>licenseInfo}} | ||
| /* tslint:disable:no-unused-variable member-ordering */ | ||
|
|
||
| import { HttpService, Inject, Injectable, Optional } from '@nestjs/common'; | ||
| import { AxiosResponse } from 'axios'; | ||
| import { Inject, Injectable, Optional } from '@nestjs/common'; | ||
| import { HttpService } from '@nestjs/axios'; | ||
| import { AxiosResponse, AxiosRequestConfig } from 'axios'; | ||
| import { Observable } from 'rxjs'; | ||
| {{#imports}} | ||
| import { {{classname}} } from '../{{filename}}'; | ||
|
|
@@ -53,8 +54,8 @@ export class {{classname}} { | |
| {{/allParams}}* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. | ||
| * @param reportProgress flag to report request and response progress. | ||
| */ | ||
| public {{nickname}}({{#allParams}}{{^isConstEnumParam}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/isConstEnumParam}}{{/allParams}}): Observable<AxiosResponse<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>>; | ||
| public {{nickname}}({{#allParams}}{{^isConstEnumParam}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/isConstEnumParam}}{{/allParams}}): Observable<any> { | ||
| public {{nickname}}({{#allParams}}{{^isConstEnumParam}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/isConstEnumParam}}{{/allParams}}options?: AxiosRequestConfig): Observable<AxiosResponse<{{#returnType}}{{{returnType}}}{{#isResponseTypeFile}}|undefined{{/isResponseTypeFile}}{{/returnType}}{{^returnType}}any{{/returnType}}>>; | ||
| public {{nickname}}({{#allParams}}{{^isConstEnumParam}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/isConstEnumParam}}{{/allParams}}options?: AxiosRequestConfig): any { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking we'd want to pump in the same |
||
| {{#allParams}} | ||
|
|
||
| {{#required}} | ||
|
|
@@ -218,7 +219,7 @@ export class {{classname}} { | |
| responseType: "blob", | ||
| {{/isResponseFile}} | ||
| withCredentials: this.configuration.withCredentials, | ||
| headers: headers | ||
| headers: { ...headers, ...options?.headers } | ||
| } | ||
| ); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,9 +28,11 @@ | |
| "@nestjs/common": "^{{nestVersion}}", | ||
| "@nestjs/core": "^{{nestVersion}}", | ||
| "@nestjs/platform-express": "^{{nestVersion}}", | ||
| "@nestjs/config": "1.1.6", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add a variable for setting the config version, some of our applications are using 1.2.0 already |
||
| "reflect-metadata": "^0.1.13", | ||
| "rimraf": "^2.6.3", | ||
| "rxjs": "^6.5.2" | ||
| "rxjs": "^7.1.0", | ||
| "@nestjs/axios": "^0.0.6" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add a variable for setting the axios version |
||
| }, | ||
| "devDependencies": { | ||
| "@nestjs/testing": "~{{nestVersion}}", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should default this to 8.4.0, I ran into some issues installing fastify plugins on 8.3.x