@ng-apimock/base-client
Advanced tools
Comparing version
@@ -6,2 +6,3 @@ import { Request } from 'node-fetch'; | ||
baseUrl: string; | ||
private agent; | ||
constructor(baseUrl: string); | ||
@@ -8,0 +9,0 @@ delayResponse(name: string, delay: number): Promise<any>; |
@@ -14,2 +14,3 @@ "use strict"; | ||
const uuid = require("uuid"); | ||
const https = require("https"); | ||
const urljoin = require("url-join"); | ||
@@ -21,2 +22,5 @@ const COOKIE_NAME = 'apimockid'; | ||
this.baseUrl = urljoin(baseUrl, 'ngapimock'); | ||
this.agent = new https.Agent({ | ||
rejectUnauthorized: false | ||
}); | ||
} | ||
@@ -79,2 +83,5 @@ delayResponse(name, delay) { | ||
} | ||
if (this.baseUrl.startsWith('https')) { | ||
requestInit.agent = this.agent; | ||
} | ||
const url = urljoin(this.baseUrl, query); | ||
@@ -81,0 +88,0 @@ return yield this.fetchResponse(new node_fetch_1.Request(url, requestInit)) |
101
package.json
{ | ||
"name": "@ng-apimock/base-client", | ||
"description": "Base client for @ng-apimock/core", | ||
"version": "1.0.14", | ||
"homepage": "https://github.com/ng-apimock/base-client#readme", | ||
"author": { | ||
"name": "Mischa Dasberg", | ||
"email": "mischa@dasberg.nl" | ||
}, | ||
"main": "dist/base.client.js", | ||
"types": "dist/base.client.d.ts", | ||
"scripts": { | ||
"precompile": "rimraf dist", | ||
"compile": "tsc", | ||
"lint": "tslint -p tsconfig.json", | ||
"test": "jasmine-ts --config=jasmine.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ng-apimock/base-client.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ng-apimock/base-client/issues" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
"apimock", | ||
"ng-apimock", | ||
"http", | ||
"api" | ||
], | ||
"devDependencies": { | ||
"@types/jasmine": "3.4.2", | ||
"@types/node-fetch": "2.5.2", | ||
"@types/sinon": "7.5.0", | ||
"@types/url-join": "4.0.0", | ||
"@types/uuid": "3.4.5", | ||
"jasmine": "3.5.0", | ||
"jasmine-ts": "0.3.0", | ||
"rimraf": "3.0.0", | ||
"sinon": "7.5.0", | ||
"ts-node": "8.4.1", | ||
"tslint": "5.20.0", | ||
"tslint-eslint-rules": "5.4.0", | ||
"typescript": "3.6.3", | ||
"vrsource-tslint-rules": "6.0.0" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "2.6.0", | ||
"url-join": "4.0.1", | ||
"uuid": "3.3.3" | ||
} | ||
"name": "@ng-apimock/base-client", | ||
"description": "Base client for @ng-apimock/core", | ||
"version": "1.0.15", | ||
"homepage": "https://github.com/ng-apimock/base-client#readme", | ||
"author": { | ||
"name": "Mischa Dasberg", | ||
"email": "mischa@dasberg.nl" | ||
}, | ||
"main": "dist/base.client.js", | ||
"types": "dist/base.client.d.ts", | ||
"scripts": { | ||
"precompile": "rimraf dist", | ||
"compile": "tsc", | ||
"lint": "tslint -p tsconfig.json", | ||
"test": "jest --config=jest.config.js -w 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ng-apimock/base-client.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ng-apimock/base-client/issues" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
"apimock", | ||
"ng-apimock", | ||
"http", | ||
"api" | ||
], | ||
"devDependencies": { | ||
"@types/jest": "25.1.3", | ||
"@types/node-fetch": "2.5.5", | ||
"@types/sinon": "7.5.2", | ||
"@types/url-join": "4.0.0", | ||
"@types/uuid": "7.0.0", | ||
"jest": "25.1.0", | ||
"rimraf": "3.0.2", | ||
"sinon": "9.0.0", | ||
"ts-jest": "25.2.1", | ||
"tslint": "6.0.0", | ||
"tslint-eslint-rules": "5.4.0", | ||
"typescript": "3.8.3", | ||
"vrsource-tslint-rules": "6.0.0" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "2.6.0", | ||
"url-join": "4.0.1", | ||
"uuid": "7.0.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# ng-apimock/base-client [](https://circleci.com/gh/ng-apimock/base-client) [](https://david-dm.org/ng-apimock/base-client) [](https://david-dm.org/ng-apimock/base-client#info=devDependencies) | ||
# ng-apimock/base-client [](https://circleci.com/gh/ng-apimock/base-client) [](https://david-dm.org/ng-apimock/base-client) [](https://david-dm.org/ng-apimock/base-client#info=devDependencies)  | ||
Base client for ng-apimock api. | ||
@@ -3,0 +3,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
93541
584.93%13
-7.14%21
133.33%731
299.45%2
Infinity%+ Added
- Removed
Updated