@usebruno/js 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/bruno-request.js
CHANGED
|
@@ -46,7 +46,6 @@ class BrunoRequest {
|
|
|
46
46
|
getMethod() {
|
|
47
47
|
return this.req.method;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
49
|
getAuthMode() {
|
|
51
50
|
if (this.req?.oauth2) {
|
|
52
51
|
return 'oauth2';
|
|
@@ -58,6 +57,8 @@ class BrunoRequest {
|
|
|
58
57
|
return 'awsv4';
|
|
59
58
|
} else if (this.req?.digestConfig) {
|
|
60
59
|
return 'digest';
|
|
60
|
+
} else if (this.headers?.['X-WSSE'] || this.req?.auth?.username) {
|
|
61
|
+
return 'wsse';
|
|
61
62
|
} else {
|
|
62
63
|
return 'none';
|
|
63
64
|
}
|
|
@@ -192,6 +193,10 @@ class BrunoRequest {
|
|
|
192
193
|
disableParsingResponseJson() {
|
|
193
194
|
this.req.__brunoDisableParsingResponseJson = true;
|
|
194
195
|
}
|
|
196
|
+
|
|
197
|
+
getExecutionMode() {
|
|
198
|
+
return this.req.__bruno__executionMode;
|
|
199
|
+
}
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
module.exports = BrunoRequest;
|
|
@@ -111,6 +111,12 @@ const addBrunoRequestShimToContext = (vm, req) => {
|
|
|
111
111
|
vm.setProp(reqObject, 'disableParsingResponseJson', disableParsingResponseJson);
|
|
112
112
|
disableParsingResponseJson.dispose();
|
|
113
113
|
|
|
114
|
+
let getExecutionMode = vm.newFunction('getExecutionMode', function () {
|
|
115
|
+
return marshallToVm(req.getExecutionMode(), vm);
|
|
116
|
+
});
|
|
117
|
+
vm.setProp(reqObject, 'getExecutionMode', getExecutionMode);
|
|
118
|
+
getExecutionMode.dispose();
|
|
119
|
+
|
|
114
120
|
vm.setProp(vm.global, 'req', reqObject);
|
|
115
121
|
reqObject.dispose();
|
|
116
122
|
};
|