removed isomorphic-fetch typing dependency (#6894)

* removed isomorphic-fetch typing dependency
removed postinstall command

* space

* regenerated samples

* updated security samples

* fixed missing url module

* added prepublish hook

* regenerated samples

* added npm build to build
This commit is contained in:
Jeffrey Slort 2018-01-25 14:20:58 +01:00 committed by William Cheng
parent 0b4b25afff
commit 2b84118c9f
16 changed files with 47 additions and 31 deletions

View File

@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'url';

View File

@ -14,13 +14,12 @@
"typings": "./dist/index.d.ts",
"scripts" : {
"build": "tsc --outDir dist/",
"postinstall": "npm run build"
"prepublishOnly": "npm run build"
},
"dependencies": {
"portable-fetch": "^3.0.0"
},
"devDependencies": {
"@types/isomorphic-fetch": "0.0.34",
"@types/node": "^8.0.9",
"typescript": "^2.0"
}{{#npmRepository}},{{/npmRepository}}

View File

@ -1 +1 @@
2.3.0-SNAPSHOT
2.4.0-SNAPSHOT

View File

@ -89,7 +89,7 @@ export interface ModelReturn {
* @type {number}
* @memberof ModelReturn
*/
return?: number;
_return?: number;
}
@ -102,11 +102,11 @@ export const FakeApiFetchParamCreator = function (configuration?: Configuration)
/**
*
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {string} [test code inject * ' " =end rn n r] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
testCodeInjectEndRnNR(test code inject * ' " =end rn n r?: string, options: any = {}): FetchArgs {
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options: any = {}): FetchArgs {
const localVarPath = `/fake`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
@ -114,8 +114,8 @@ export const FakeApiFetchParamCreator = function (configuration?: Configuration)
const localVarQueryParameter = {} as any;
const localVarFormParams = new url.URLSearchParams();
if (test code inject * ' " =end rn n r !== undefined) {
localVarFormParams.set('test code inject */ ' " =end -- \r\n \n \r', test code inject * ' " =end rn n r as any);
if (testCodeInjectEndRnNR !== undefined) {
localVarFormParams.set('test code inject */ ' " =end -- \r\n \n \r', testCodeInjectEndRnNR as any);
}
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
@ -143,12 +143,12 @@ export const FakeApiFp = function(configuration?: Configuration) {
/**
*
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {string} [test code inject * ' " =end rn n r] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
const localVarFetchArgs = FakeApiFetchParamCreator(configuration).testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r, options);
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
const localVarFetchArgs = FakeApiFetchParamCreator(configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
@ -171,12 +171,12 @@ export const FakeApiFactory = function (configuration?: Configuration, fetch?: F
/**
*
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {string} [test code inject * &#39; &quot; &#x3D;end rn n r] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r?: string, options?: any) {
return FakeApiFp(configuration).testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r, options)(fetch, basePath);
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any) {
return FakeApiFp(configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options)(fetch, basePath);
},
};
};
@ -191,13 +191,13 @@ export class FakeApi extends BaseAPI {
/**
*
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {} [test code inject * &#39; &quot; &#x3D;end rn n r] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {} [testCodeInjectEndRnNR] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FakeApi
*/
public testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r?: string, options?: any) {
return FakeApiFp(this.configuration).testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r, options)(this.fetch, this.basePath);
public testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any) {
return FakeApiFp(this.configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options)(this.fetch, this.basePath);
}
}

View File

@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'url';

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'url';

View File

@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'url';

View File

@ -14,13 +14,12 @@
"typings": "./dist/index.d.ts",
"scripts" : {
"build": "tsc --outDir dist/",
"postinstall": "npm run build"
"prepublishOnly": "npm run build"
},
"dependencies": {
"portable-fetch": "^3.0.0"
},
"devDependencies": {
"@types/isomorphic-fetch": "0.0.34",
"@types/node": "^8.0.9",
"typescript": "^2.0"
},

View File

@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'url';

View File

@ -14,13 +14,12 @@
"typings": "./dist/index.d.ts",
"scripts" : {
"build": "tsc --outDir dist/",
"postinstall": "npm run build"
"prepublishOnly": "npm run build"
},
"dependencies": {
"portable-fetch": "^3.0.0"
},
"devDependencies": {
"@types/isomorphic-fetch": "0.0.34",
"@types/node": "^8.0.9",
"typescript": "^2.0"
},

View File

@ -39,6 +39,20 @@
</arguments>
</configuration>
</execution>
<execution>
<id>npm-build</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>npm-test</id>
<phase>integration-test</phase>