Skip to content

Commit

Permalink
fix: correct paths for es modules; resolve options in factories
Browse files Browse the repository at this point in the history
  • Loading branch information
fmal committed Oct 17, 2020
1 parent 50b60a1 commit f81c9f9
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/@fmal/cerebral-storage/factories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "@fmal/cerebral-storage/factories",
"private": true,
"main": "../dist/cjs/factories/index.js",
"module": "../dist/esm/factories/index.js",
"module": "../dist/es/factories/index.js",
"types": "../dist/ts/factories/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/@fmal/http-service/factories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "@fmal/http-service/factories",
"private": true,
"main": "../dist/cjs/factories/index.js",
"module": "../dist/esm/factories/index.js",
"module": "../dist/es/factories/index.js",
"types": "../dist/ts/factories/index.d.ts"
}
6 changes: 5 additions & 1 deletion packages/@fmal/http-service/src/factories/httpDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { processResponse } from '../utils';
function httpDeleteFactory(url, query = {}, options) {
return function httpDelete({ http, path, resolve }) {
return processResponse(
http.delete(resolve.value(url), resolve.value(query), options),
http.delete(
resolve.value(url),
resolve.value(query),
resolve.value(options)
),
path
);
};
Expand Down
6 changes: 5 additions & 1 deletion packages/@fmal/http-service/src/factories/httpGet.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { processResponse } from '../utils';
function httpGetFactory(url, query = {}, options) {
return function httpGet({ http, path, resolve }) {
return processResponse(
http.get(resolve.value(url), resolve.value(query), options),
http.get(
resolve.value(url),
resolve.value(query),
resolve.value(options)
),
path
);
};
Expand Down
6 changes: 5 additions & 1 deletion packages/@fmal/http-service/src/factories/httpPatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { processResponse } from '../utils';
function httpPatchFactory(url, body = {}, options) {
return function httpPatch({ http, path, resolve }) {
return processResponse(
http.patch(resolve.value(url), resolve.value(body), options),
http.patch(
resolve.value(url),
resolve.value(body),
resolve.value(options)
),
path
);
};
Expand Down
6 changes: 5 additions & 1 deletion packages/@fmal/http-service/src/factories/httpPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { processResponse } from '../utils';
function httpPostFactory(url, body = {}, options) {
return function httpPost({ http, path, resolve }) {
return processResponse(
http.post(resolve.value(url), resolve.value(body), options),
http.post(
resolve.value(url),
resolve.value(body),
resolve.value(options)
),
path
);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/@fmal/http-service/src/factories/httpPut.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { processResponse } from '../utils';
function httpPutFactory(url, body = {}, options) {
return function httpPut({ http, path, resolve }) {
return processResponse(
http.put(resolve.value(url), resolve.value(body), options),
http.put(resolve.value(url), resolve.value(body), resolve.value(options)),
path
);
};
Expand Down

0 comments on commit f81c9f9

Please sign in to comment.