mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
Fix: safe serialise TypedArrays to avoid loosing constructor information (#5941)
* fix: enhance cleanJson to support serialization of typed arrays * fix: correctness of inference based checks * fix: remove duplicate Uint8Array reference * fix: correct export syntax for mixinTypedArrays Updated the export statement to use 'exports' instead of 'export' for proper module export functionality. * chore: code cleanup * test: add basics tests for cleanJson
This commit is contained in:
committed by
GitHub
parent
08c182a875
commit
e47d1ed353
@@ -37,6 +37,7 @@ const cheerio = require('cheerio');
|
||||
const tv4 = require('tv4');
|
||||
const jsonwebtoken = require('jsonwebtoken');
|
||||
const { executeQuickJsVmAsync } = require('../sandbox/quickjs');
|
||||
const { mixinTypedArrays } = require('../sandbox/mixins/typed-arrays');
|
||||
|
||||
class TestRuntime {
|
||||
constructor(props) {
|
||||
@@ -108,6 +109,10 @@ class TestRuntime {
|
||||
jwt: jsonwebtoken
|
||||
};
|
||||
|
||||
if (this.runtime === 'vm2') {
|
||||
mixinTypedArrays(context);
|
||||
}
|
||||
|
||||
if (onConsoleLog && typeof onConsoleLog === 'function') {
|
||||
const customLogger = (type) => {
|
||||
return (...args) => {
|
||||
|
||||
Reference in New Issue
Block a user