@holaluz/pomada
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -5,6 +5,10 @@ "use strict"; | ||
const http_service_1 = require("./http-service"); | ||
exports.baseUrl = process.env.ENV === 'production' | ||
? 'https://core.holaluz.com/api/' | ||
: 'https://core-staging.holaluz.com/api/'; | ||
const coreUrls = { | ||
production: 'https://core.holaluz.com/api/', | ||
staging: 'https://core-staging.holaluz.com/api/', | ||
// FIXME: development should be MSW mocks | ||
development: 'https://core-staging.holaluz.com/api/', | ||
}; | ||
exports.baseUrl = coreUrls[process.env.ENV || 'development']; | ||
exports.coreService = new http_service_1.HttpService(exports.baseUrl); | ||
//# sourceMappingURL=core-service.js.map |
@@ -23,3 +23,3 @@ "use strict"; | ||
catch (error) { | ||
if (error.response) { | ||
if (axios_1.default.isAxiosError(error) && error.response) { | ||
const httpServiceError = this.getError(error.response.status); | ||
@@ -26,0 +26,0 @@ return new result_1.Fail(httpServiceError); |
{ | ||
"name": "@holaluz/pomada", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Holaluz shared FE business logic repository", | ||
@@ -15,2 +15,5 @@ "author": "Holaluz", | ||
}, | ||
"engines": { | ||
"node": ">= 16" | ||
}, | ||
"scripts": { | ||
@@ -24,12 +27,10 @@ "build": "tsc", | ||
"dependencies": { | ||
"axios": "^0.21.1" | ||
"axios": "^0.22.0" | ||
}, | ||
"devDependencies": { | ||
"@holaluz/npm-scripts": "^5.1.0", | ||
"@types/jest": "^26.0.22", | ||
"jest": "^26.6.3", | ||
"@holaluz/npm-scripts": "^5.7.1", | ||
"@types/jest": "^27.0.2", | ||
"msw": "^0.28.1", | ||
"prettier": "^2.2.1", | ||
"semantic-release": "^17.3.1", | ||
"ts-jest": "^26.5.4", | ||
"ts-jest": "^27.0.5", | ||
"typedoc": "^0.20.35", | ||
@@ -36,0 +37,0 @@ "typescript": "^4.2.4" |
@@ -55,3 +55,3 @@ # Pomada | ||
This library reads a `process.env.ENV` variable, and access staging APIs if `ENV = development` or production APIs if `ENV = production`. | ||
This library reads a `process.env.ENV` variable, and access staging APIs if `ENV = staging` or production APIs if `ENV = production`. | ||
@@ -58,0 +58,0 @@ ## Development |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37148
7
514
1
+ Addedaxios@0.22.0(transitive)
- Removedaxios@0.21.4(transitive)
Updatedaxios@^0.22.0