Skip to content

Commit 7f545d4

Browse files
committed
chore: bump version to v1.1.5
1 parent 38c5aa9 commit 7f545d4

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

dist/components/proxy-middleware/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exports.RQ_INTERCEPTED_CONTENT_TYPES = [
1616
"text/plain",
1717
"text/javascript",
1818
"application/javascript",
19+
"application/x-javascript",
1920
"text/css",
2021
"application/css",
2122
"application/json",

dist/components/proxy-middleware/rule_action_processor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class RuleActionProcessor {
9090
action_result = (0, modify_request_processor_1.default)(rule_action, ctx);
9191
break;
9292
case constants_1.RULE_ACTION.MODIFY_RESPONSE:
93-
action_result = (0, modify_response_processor_1.default)(rule_action, ctx);
93+
action_result = yield (0, modify_response_processor_1.default)(rule_action, ctx);
9494
break;
9595
case constants_1.RULE_ACTION.INSERT:
9696
action_result = (0, insert_processor_1.default)(rule_action, ctx);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default process_modify_response_action;
2-
declare function process_modify_response_action(action: any, ctx: any): {
2+
declare function process_modify_response_action(action: any, ctx: any): Promise<{
33
action: any;
44
success: boolean;
55
post_process_data: any;
6-
};
6+
}>;

dist/components/proxy-middleware/rule_action_processor/processors/modify_response_processor.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ const proxy_ctx_helper_1 = require("../../helpers/proxy_ctx_helper");
1818
const utils_1 = require("../utils");
1919
const fs_1 = __importDefault(require("fs"));
2020
const { types } = require("util");
21-
const process_modify_response_action = (action, ctx) => {
21+
const process_modify_response_action = (action, ctx) => __awaiter(void 0, void 0, void 0, function* () {
2222
const allowed_handlers = [proxy_1.PROXY_HANDLER_TYPE.ON_RESPONSE_END];
2323
if (!allowed_handlers.includes(ctx.currentHandler)) {
2424
return (0, utils_1.build_action_processor_response)(action, false);
2525
}
2626
if (action.responseType &&
2727
action.responseType === requestly_core_1.CONSTANTS.RESPONSE_BODY_TYPES.CODE) {
28-
modify_response_using_code(action, ctx);
28+
yield modify_response_using_code(action, ctx);
2929
return (0, utils_1.build_action_processor_response)(action, true);
3030
}
3131
else if (action.responseType === requestly_core_1.CONSTANTS.RESPONSE_BODY_TYPES.LOCAL_FILE) {
@@ -36,7 +36,7 @@ const process_modify_response_action = (action, ctx) => {
3636
modify_response(ctx, action.response, action.statusCode);
3737
return (0, utils_1.build_action_processor_response)(action, true);
3838
}
39-
};
39+
});
4040
const modify_response = (ctx, new_resp, status_code) => {
4141
ctx.rq_response_body = new_resp;
4242
ctx.rq_response_status_code = status_code;
@@ -90,8 +90,7 @@ const modify_response_using_code = (action, ctx) => __awaiter(void 0, void 0, vo
9090
if (types.isPromise(finalResponse)) {
9191
finalResponse = yield finalResponse;
9292
}
93-
const isResponseJSON = args.responseType && args.responseType.includes("application/json");
94-
if (typeof finalResponse === "object" && isResponseJSON) {
93+
if (typeof finalResponse === "object") {
9594
finalResponse = JSON.stringify(finalResponse);
9695
}
9796
if (finalResponse && typeof finalResponse === "string") {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@requestly/requestly-proxy",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "Proxy that gives superpowers to all the Requestly clients",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)