New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@locker/near-membrane-shared

Package Overview
Dependencies
Maintainers
8
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/near-membrane-shared - npm Package Compare versions

Comparing version 0.12.5 to 0.12.6

types/Proxy.d.ts

250

dist/index.cjs.js

@@ -8,6 +8,13 @@ 'use strict';

apply: ReflectApply,
construct: ReflectConstruct,
defineProperty: ReflectDefineProperty,
deleteProperty: ReflectDeleteProperty,
get: ReflectGet,
getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor,
getPrototypeOf: ReflectGetPrototypeOf,
has: ReflectHas,
isExtensible: ReflectIsExtensible,
ownKeys: ReflectOwnKeys,
preventExtensions: ReflectPreventExtensions,
set: ReflectSet,
setPrototypeOf: ReflectSetPrototypeOf

@@ -186,6 +193,10 @@ } = Reflect;

const CHAR_ELLIPSIS = '\u2026'; // Near-membrane constants.
const CHAR_ELLIPSIS = '\u2026'; // Error message constants.
const ERR_ILLEGAL_PROPERTY_ACCESS = 'Illegal property access.'; // Near-membrane constants.
const LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL = SymbolFor('@@lockerNearMembraneProxyMasked');
const LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL = SymbolFor('@@lockerNearMembraneSerializedValue');
const LOCKER_NEAR_MEMBRANE_SYMBOL = SymbolFor('@@lockerNearMembrane'); // Object brand constants.
const LOCKER_NEAR_MEMBRANE_SYMBOL = SymbolFor('@@lockerNearMembrane');
const SYMBOL_LIVE_OBJECT = SymbolFor('@@lockerLiveValue'); // Object brand constants.

@@ -546,8 +557,21 @@ const TO_STRING_BRAND_ARRAY = '[object Array]';

function getNearMembraneSerializedValue(object) {
return LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL in object ? undefined : object[LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL];
function getNearMembraneProxySerializedValue(object) {
if (typeof object === 'object' && object !== null || typeof object === 'function') {
// To extract the serialized value of a blue near-membrane proxy we must
// perform a two step handshake. First, we trigger the "has" trap for
// the `LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL` property which
// must report `false`. Second, we trigger the "get" trap to return the
// serialized value.
return LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL in object ? undefined : object[LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL];
}
return undefined;
}
function isNearMembrane(value) {
function isNearMembraneProxy(value) {
if (typeof value === 'object' && value !== null || typeof value === 'function') {
// To extract the flag value of a blue near-membrane proxy we must
// perform a two step handshake. First, we trigger the "has" trap for
// the `LOCKER_NEAR_MEMBRANE_SYMBOL` property which must report `false`.
// Second, we trigger the "get" trap to return the flag value.
return !(LOCKER_NEAR_MEMBRANE_SYMBOL in value) && value[LOCKER_NEAR_MEMBRANE_SYMBOL] === true;

@@ -559,6 +583,14 @@ }

function isNearMembraneProxyMaskedFunction(value) {
// To extract the flag value of a blue near-membrane proxy we must perform
// a two step handshake. First, we trigger the "has" trap for the
// `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL` property which must report
// `false`. Second, we trigger the "get" trap to return the flag value.
return typeof value === 'function' && !(LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL in value) && value[LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL] === true;
}
const SEEN_OBJECTS = toSafeMap(new MapCtor());
function cloneBoxedPrimitive(object) {
return ObjectCtor(getNearMembraneSerializedValue(object));
return ObjectCtor(getNearMembraneProxySerializedValue(object));
}

@@ -610,3 +642,3 @@

source
} = JSONParse(getNearMembraneSerializedValue(regexp));
} = JSONParse(getNearMembraneProxySerializedValue(regexp));
return new RegExpCtor(source, flags);

@@ -815,3 +847,3 @@ }

// istanbul ignore else
if (!isNearMembrane(originalValue)) {
if (!isNearMembraneProxy(originalValue)) {
// Skip cloning non-membrane proxied objects.

@@ -878,4 +910,189 @@ SEEN_OBJECTS.set(originalValue, originalValue);

const TypeErrorCtor = TypeError;
const ProxyCtor = Proxy;
function noop() {// No operation performed.
}
function proxyMaskFunction(func, maskFunc, trapInvokers) {
let nearMembraneSymbolFlag = false;
let lastProxyTrapCalled = 0
/* ProxyHandlerTraps.None */
;
let applyTrapInvoker = ReflectApply;
let constructTrapInvoker = ReflectConstruct;
let getTrapInvoker = ReflectGet;
let hasTrapInvoker = ReflectHas;
if (trapInvokers) {
({
apply: applyTrapInvoker = ReflectApply,
construct: constructTrapInvoker = ReflectConstruct,
get: getTrapInvoker = ReflectGet,
has: hasTrapInvoker = ReflectHas
} = trapInvokers);
}
const proxy = new ProxyCtor(maskFunc, {
apply(_target, thisArg, args) {
lastProxyTrapCalled = 1
/* ProxyHandlerTraps.Apply */
;
if (thisArg === proxy || thisArg === maskFunc) {
thisArg = func;
}
return applyTrapInvoker(func, thisArg, args);
},
construct(_target, args, newTarget) {
lastProxyTrapCalled = 2
/* ProxyHandlerTraps.Construct */
;
if (newTarget === proxy || newTarget === maskFunc) {
newTarget = func;
}
return constructTrapInvoker(func, args, newTarget);
},
defineProperty(target, key, desc) {
lastProxyTrapCalled = 4
/* ProxyHandlerTraps.DefineProperty */
; // Defining forgeries of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return ReflectDefineProperty(target, key, desc);
},
deleteProperty(target, key) {
lastProxyTrapCalled = 32
/* ProxyHandlerTraps.GetOwnPropertyDescriptor */
;
return ReflectDeleteProperty(target, key);
},
get(target, key, receiver) {
// Only allow accessing near-membrane symbol values if the
// BoundaryProxyHandler.has trap has been called immediately before
// and the symbol does not exist.
nearMembraneSymbolFlag && (nearMembraneSymbolFlag = lastProxyTrapCalled === 128
/* ProxyHandlerTraps.Has */
);
lastProxyTrapCalled = 16
/* ProxyHandlerTraps.Get */
;
const isProxyMaskedSymbol = key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL;
if (nearMembraneSymbolFlag) {
// Exit without performing a [[Get]] for near-membrane symbols
// because we know when the nearMembraneSymbolFlag is ON that
// there is no shadowed symbol value.
if (isProxyMaskedSymbol) {
return true;
}
}
const result = getTrapInvoker(target, key, receiver, nearMembraneSymbolFlag); // Getting forged values of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (result !== undefined && isProxyMaskedSymbol) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return result;
},
getOwnPropertyDescriptor(target, key) {
lastProxyTrapCalled = 32
/* ProxyHandlerTraps.GetOwnPropertyDescriptor */
;
const result = ReflectGetOwnPropertyDescriptor(target, key); // Getting forged descriptors of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (result && key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return result;
},
getPrototypeOf(target) {
lastProxyTrapCalled = 64
/* ProxyHandlerTraps.GetPrototypeOf */
;
return ReflectGetPrototypeOf(target);
},
has(target, key) {
lastProxyTrapCalled = 128
/* ProxyHandlerTraps.Has */
;
const result = hasTrapInvoker(target, key);
const isProxyMaskedSymbol = key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL;
if (result) {
nearMembraneSymbolFlag = false; // Checking the existence of forged `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (isProxyMaskedSymbol) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
} else {
// The near-membrane symbol flag is on if the symbol does
// not exist on the object or its [[Prototype]].
nearMembraneSymbolFlag = isProxyMaskedSymbol;
}
return result;
},
isExtensible(target) {
lastProxyTrapCalled = 256
/* ProxyHandlerTraps.IsExtensible */
;
return ReflectIsExtensible(target);
},
ownKeys(target) {
lastProxyTrapCalled = 512
/* ProxyHandlerTraps.OwnKeys */
;
return ReflectOwnKeys(target);
},
preventExtensions(target) {
lastProxyTrapCalled = 1024
/* ProxyHandlerTraps.PreventExtensions */
;
return ReflectPreventExtensions(target);
},
set(target, key, value, receiver) {
lastProxyTrapCalled = 2048
/* ProxyHandlerTraps.Set */
; // Setting forged values of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return ReflectSet(target, key, value, receiver);
},
setPrototypeOf(target, proto) {
lastProxyTrapCalled = 4096
/* ProxyHandlerTraps.SetPrototypeOf */
;
return ReflectSetPrototypeOf(target, proto);
}
});
return proxy;
} // Used by '@locker/near-membrane-dom'.

@@ -901,2 +1118,3 @@

exports.DateProtoValueOf = DateProtoValueOf;
exports.ERR_ILLEGAL_PROPERTY_ACCESS = ERR_ILLEGAL_PROPERTY_ACCESS;
exports.ErrorCtor = ErrorCtor;

@@ -906,2 +1124,3 @@ exports.JSONParse = JSONParse;

exports.LOCKER_IDENTIFIER_MARKER = LOCKER_IDENTIFIER_MARKER;
exports.LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL = LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL;
exports.LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL = LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL;

@@ -927,7 +1146,15 @@ exports.LOCKER_NEAR_MEMBRANE_SYMBOL = LOCKER_NEAR_MEMBRANE_SYMBOL;

exports.ObjectProtoToString = ObjectProtoToString;
exports.ProxyCtor = ProxyCtor;
exports.ReflectApply = ReflectApply;
exports.ReflectConstruct = ReflectConstruct;
exports.ReflectDefineProperty = ReflectDefineProperty;
exports.ReflectDeleteProperty = ReflectDeleteProperty;
exports.ReflectGet = ReflectGet;
exports.ReflectGetOwnPropertyDescriptor = ReflectGetOwnPropertyDescriptor;
exports.ReflectGetPrototypeOf = ReflectGetPrototypeOf;
exports.ReflectHas = ReflectHas;
exports.ReflectIsExtensible = ReflectIsExtensible;
exports.ReflectOwnKeys = ReflectOwnKeys;
exports.ReflectPreventExtensions = ReflectPreventExtensions;
exports.ReflectSet = ReflectSet;
exports.ReflectSetPrototypeOf = ReflectSetPrototypeOf;

@@ -938,2 +1165,3 @@ exports.RegExpCtor = RegExpCtor;

exports.SUPPORTS_BIG_INT = SUPPORTS_BIG_INT;
exports.SYMBOL_LIVE_OBJECT = SYMBOL_LIVE_OBJECT;
exports.SetCtor = SetCtor;

@@ -974,7 +1202,9 @@ exports.SetProtoAdd = SetProtoAdd;

exports.getBrand = getBrand;
exports.getNearMembraneSerializedValue = getNearMembraneSerializedValue;
exports.isNearMembrane = isNearMembrane;
exports.getNearMembraneProxySerializedValue = getNearMembraneProxySerializedValue;
exports.isNearMembraneProxy = isNearMembraneProxy;
exports.isNearMembraneProxyMaskedFunction = isNearMembraneProxyMaskedFunction;
exports.isObject = isObject;
exports.noop = noop;
exports.partialStructuredClone = partialStructuredClone;
exports.proxyMaskFunction = proxyMaskFunction;
exports.toSafeArray = toSafeArray;

@@ -981,0 +1211,0 @@ exports.toSafeMap = toSafeMap;

const {
apply: ReflectApply,
construct: ReflectConstruct,
defineProperty: ReflectDefineProperty,
deleteProperty: ReflectDeleteProperty,
get: ReflectGet,
getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor,
getPrototypeOf: ReflectGetPrototypeOf,
has: ReflectHas,
isExtensible: ReflectIsExtensible,
ownKeys: ReflectOwnKeys,
preventExtensions: ReflectPreventExtensions,
set: ReflectSet,
setPrototypeOf: ReflectSetPrototypeOf

@@ -180,6 +187,10 @@ } = Reflect;

const CHAR_ELLIPSIS = '\u2026'; // Near-membrane constants.
const CHAR_ELLIPSIS = '\u2026'; // Error message constants.
const ERR_ILLEGAL_PROPERTY_ACCESS = 'Illegal property access.'; // Near-membrane constants.
const LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL = SymbolFor('@@lockerNearMembraneProxyMasked');
const LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL = SymbolFor('@@lockerNearMembraneSerializedValue');
const LOCKER_NEAR_MEMBRANE_SYMBOL = SymbolFor('@@lockerNearMembrane'); // Object brand constants.
const LOCKER_NEAR_MEMBRANE_SYMBOL = SymbolFor('@@lockerNearMembrane');
const SYMBOL_LIVE_OBJECT = SymbolFor('@@lockerLiveValue'); // Object brand constants.

@@ -540,8 +551,21 @@ const TO_STRING_BRAND_ARRAY = '[object Array]';

function getNearMembraneSerializedValue(object) {
return LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL in object ? undefined : object[LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL];
function getNearMembraneProxySerializedValue(object) {
if (typeof object === 'object' && object !== null || typeof object === 'function') {
// To extract the serialized value of a blue near-membrane proxy we must
// perform a two step handshake. First, we trigger the "has" trap for
// the `LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL` property which
// must report `false`. Second, we trigger the "get" trap to return the
// serialized value.
return LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL in object ? undefined : object[LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL];
}
return undefined;
}
function isNearMembrane(value) {
function isNearMembraneProxy(value) {
if (typeof value === 'object' && value !== null || typeof value === 'function') {
// To extract the flag value of a blue near-membrane proxy we must
// perform a two step handshake. First, we trigger the "has" trap for
// the `LOCKER_NEAR_MEMBRANE_SYMBOL` property which must report `false`.
// Second, we trigger the "get" trap to return the flag value.
return !(LOCKER_NEAR_MEMBRANE_SYMBOL in value) && value[LOCKER_NEAR_MEMBRANE_SYMBOL] === true;

@@ -553,6 +577,14 @@ }

function isNearMembraneProxyMaskedFunction(value) {
// To extract the flag value of a blue near-membrane proxy we must perform
// a two step handshake. First, we trigger the "has" trap for the
// `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL` property which must report
// `false`. Second, we trigger the "get" trap to return the flag value.
return typeof value === 'function' && !(LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL in value) && value[LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL] === true;
}
const SEEN_OBJECTS = toSafeMap(new MapCtor());
function cloneBoxedPrimitive(object) {
return ObjectCtor(getNearMembraneSerializedValue(object));
return ObjectCtor(getNearMembraneProxySerializedValue(object));
}

@@ -604,3 +636,3 @@

source
} = JSONParse(getNearMembraneSerializedValue(regexp));
} = JSONParse(getNearMembraneProxySerializedValue(regexp));
return new RegExpCtor(source, flags);

@@ -809,3 +841,3 @@ }

// istanbul ignore else
if (!isNearMembrane(originalValue)) {
if (!isNearMembraneProxy(originalValue)) {
// Skip cloning non-membrane proxied objects.

@@ -872,4 +904,189 @@ SEEN_OBJECTS.set(originalValue, originalValue);

const TypeErrorCtor = TypeError;
const ProxyCtor = Proxy;
function noop() {// No operation performed.
}
function proxyMaskFunction(func, maskFunc, trapInvokers) {
let nearMembraneSymbolFlag = false;
let lastProxyTrapCalled = 0
/* ProxyHandlerTraps.None */
;
let applyTrapInvoker = ReflectApply;
let constructTrapInvoker = ReflectConstruct;
let getTrapInvoker = ReflectGet;
let hasTrapInvoker = ReflectHas;
if (trapInvokers) {
({
apply: applyTrapInvoker = ReflectApply,
construct: constructTrapInvoker = ReflectConstruct,
get: getTrapInvoker = ReflectGet,
has: hasTrapInvoker = ReflectHas
} = trapInvokers);
}
const proxy = new ProxyCtor(maskFunc, {
apply(_target, thisArg, args) {
lastProxyTrapCalled = 1
/* ProxyHandlerTraps.Apply */
;
if (thisArg === proxy || thisArg === maskFunc) {
thisArg = func;
}
return applyTrapInvoker(func, thisArg, args);
},
construct(_target, args, newTarget) {
lastProxyTrapCalled = 2
/* ProxyHandlerTraps.Construct */
;
if (newTarget === proxy || newTarget === maskFunc) {
newTarget = func;
}
return constructTrapInvoker(func, args, newTarget);
},
defineProperty(target, key, desc) {
lastProxyTrapCalled = 4
/* ProxyHandlerTraps.DefineProperty */
; // Defining forgeries of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return ReflectDefineProperty(target, key, desc);
},
deleteProperty(target, key) {
lastProxyTrapCalled = 32
/* ProxyHandlerTraps.GetOwnPropertyDescriptor */
;
return ReflectDeleteProperty(target, key);
},
get(target, key, receiver) {
// Only allow accessing near-membrane symbol values if the
// BoundaryProxyHandler.has trap has been called immediately before
// and the symbol does not exist.
nearMembraneSymbolFlag && (nearMembraneSymbolFlag = lastProxyTrapCalled === 128
/* ProxyHandlerTraps.Has */
);
lastProxyTrapCalled = 16
/* ProxyHandlerTraps.Get */
;
const isProxyMaskedSymbol = key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL;
if (nearMembraneSymbolFlag) {
// Exit without performing a [[Get]] for near-membrane symbols
// because we know when the nearMembraneSymbolFlag is ON that
// there is no shadowed symbol value.
if (isProxyMaskedSymbol) {
return true;
}
}
const result = getTrapInvoker(target, key, receiver, nearMembraneSymbolFlag); // Getting forged values of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (result !== undefined && isProxyMaskedSymbol) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return result;
},
getOwnPropertyDescriptor(target, key) {
lastProxyTrapCalled = 32
/* ProxyHandlerTraps.GetOwnPropertyDescriptor */
;
const result = ReflectGetOwnPropertyDescriptor(target, key); // Getting forged descriptors of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (result && key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return result;
},
getPrototypeOf(target) {
lastProxyTrapCalled = 64
/* ProxyHandlerTraps.GetPrototypeOf */
;
return ReflectGetPrototypeOf(target);
},
has(target, key) {
lastProxyTrapCalled = 128
/* ProxyHandlerTraps.Has */
;
const result = hasTrapInvoker(target, key);
const isProxyMaskedSymbol = key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL;
if (result) {
nearMembraneSymbolFlag = false; // Checking the existence of forged `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (isProxyMaskedSymbol) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
} else {
// The near-membrane symbol flag is on if the symbol does
// not exist on the object or its [[Prototype]].
nearMembraneSymbolFlag = isProxyMaskedSymbol;
}
return result;
},
isExtensible(target) {
lastProxyTrapCalled = 256
/* ProxyHandlerTraps.IsExtensible */
;
return ReflectIsExtensible(target);
},
ownKeys(target) {
lastProxyTrapCalled = 512
/* ProxyHandlerTraps.OwnKeys */
;
return ReflectOwnKeys(target);
},
preventExtensions(target) {
lastProxyTrapCalled = 1024
/* ProxyHandlerTraps.PreventExtensions */
;
return ReflectPreventExtensions(target);
},
set(target, key, value, receiver) {
lastProxyTrapCalled = 2048
/* ProxyHandlerTraps.Set */
; // Setting forged values of `LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL`
// properties is not allowed.
if (key === LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL) {
throw new TypeErrorCtor(ERR_ILLEGAL_PROPERTY_ACCESS);
}
return ReflectSet(target, key, value, receiver);
},
setPrototypeOf(target, proto) {
lastProxyTrapCalled = 4096
/* ProxyHandlerTraps.SetPrototypeOf */
;
return ReflectSetPrototypeOf(target, proto);
}
});
return proxy;
} // Used by '@locker/near-membrane-dom'.

@@ -881,2 +1098,2 @@

} = Math;
export { ArrayBufferProtoByteLengthGetter, ArrayCtor, ArrayIsArray, ArrayProtoFilter, ArrayProtoFind, ArrayProtoIncludes, ArrayProtoPush, ArrayProtoShift, ArrayProtoSort, ArrayProtoUnshift, BigIntProtoValueOf, BooleanProtoValueOf, CHAR_ELLIPSIS, DateProtoValueOf, ErrorCtor, JSONParse, JSONStringify, LOCKER_IDENTIFIER_MARKER, LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL, LOCKER_NEAR_MEMBRANE_SYMBOL, LOCKER_UNMINIFIED_FLAG, MapCtor, MapProtoEntries, MapProtoSet, MapProtoSizeGetter, MathMin, NumberIsFinite, NumberIsInteger, NumberProtoValueOf, ObjectAssign, ObjectCtor, ObjectFreeze, ObjectHasOwn, ObjectKeys, ObjectLookupOwnGetter, ObjectLookupOwnSetter, ObjectProto, ObjectProtoToString, ReflectApply, ReflectDefineProperty, ReflectDeleteProperty, ReflectGetPrototypeOf, ReflectOwnKeys, ReflectSetPrototypeOf, RegExpCtor, RegExpProtoSourceGetter, RegExpProtoTest, SUPPORTS_BIG_INT, SetCtor, SetProtoAdd, SetProtoSizeGetter, SetProtoValues, StringCtor, StringProtoSlice, StringProtoValueOf, SymbolFor, SymbolIterator, SymbolProtoValueOf, SymbolToStringTag, SymbolUnscopables, TO_STRING_BRAND_ARRAY, TO_STRING_BRAND_ARRAY_BUFFER, TO_STRING_BRAND_BIG_INT, TO_STRING_BRAND_BOOLEAN, TO_STRING_BRAND_DATE, TO_STRING_BRAND_FUNCTION, TO_STRING_BRAND_MAP, TO_STRING_BRAND_NULL, TO_STRING_BRAND_NUMBER, TO_STRING_BRAND_OBJECT, TO_STRING_BRAND_REG_EXP, TO_STRING_BRAND_SET, TO_STRING_BRAND_STRING, TO_STRING_BRAND_SYMBOL, TO_STRING_BRAND_UNDEFINED, TO_STRING_BRAND_WEAK_MAP, TO_STRING_BRAND_WEAK_SET, TypeErrorCtor, WeakMapCtor, WeakMapProtoHas, WeakSetCtor, WeakSetProtoHas, getBrand, getNearMembraneSerializedValue, isNearMembrane, isObject, noop, partialStructuredClone, toSafeArray, toSafeMap, toSafeWeakMap, toSafeWeakSet };
export { ArrayBufferProtoByteLengthGetter, ArrayCtor, ArrayIsArray, ArrayProtoFilter, ArrayProtoFind, ArrayProtoIncludes, ArrayProtoPush, ArrayProtoShift, ArrayProtoSort, ArrayProtoUnshift, BigIntProtoValueOf, BooleanProtoValueOf, CHAR_ELLIPSIS, DateProtoValueOf, ERR_ILLEGAL_PROPERTY_ACCESS, ErrorCtor, JSONParse, JSONStringify, LOCKER_IDENTIFIER_MARKER, LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL, LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL, LOCKER_NEAR_MEMBRANE_SYMBOL, LOCKER_UNMINIFIED_FLAG, MapCtor, MapProtoEntries, MapProtoSet, MapProtoSizeGetter, MathMin, NumberIsFinite, NumberIsInteger, NumberProtoValueOf, ObjectAssign, ObjectCtor, ObjectFreeze, ObjectHasOwn, ObjectKeys, ObjectLookupOwnGetter, ObjectLookupOwnSetter, ObjectProto, ObjectProtoToString, ProxyCtor, ReflectApply, ReflectConstruct, ReflectDefineProperty, ReflectDeleteProperty, ReflectGet, ReflectGetOwnPropertyDescriptor, ReflectGetPrototypeOf, ReflectHas, ReflectIsExtensible, ReflectOwnKeys, ReflectPreventExtensions, ReflectSet, ReflectSetPrototypeOf, RegExpCtor, RegExpProtoSourceGetter, RegExpProtoTest, SUPPORTS_BIG_INT, SYMBOL_LIVE_OBJECT, SetCtor, SetProtoAdd, SetProtoSizeGetter, SetProtoValues, StringCtor, StringProtoSlice, StringProtoValueOf, SymbolFor, SymbolIterator, SymbolProtoValueOf, SymbolToStringTag, SymbolUnscopables, TO_STRING_BRAND_ARRAY, TO_STRING_BRAND_ARRAY_BUFFER, TO_STRING_BRAND_BIG_INT, TO_STRING_BRAND_BOOLEAN, TO_STRING_BRAND_DATE, TO_STRING_BRAND_FUNCTION, TO_STRING_BRAND_MAP, TO_STRING_BRAND_NULL, TO_STRING_BRAND_NUMBER, TO_STRING_BRAND_OBJECT, TO_STRING_BRAND_REG_EXP, TO_STRING_BRAND_SET, TO_STRING_BRAND_STRING, TO_STRING_BRAND_SYMBOL, TO_STRING_BRAND_UNDEFINED, TO_STRING_BRAND_WEAK_MAP, TO_STRING_BRAND_WEAK_SET, TypeErrorCtor, WeakMapCtor, WeakMapProtoHas, WeakSetCtor, WeakSetProtoHas, getBrand, getNearMembraneProxySerializedValue, isNearMembraneProxy, isNearMembraneProxyMaskedFunction, isObject, noop, partialStructuredClone, proxyMaskFunction, toSafeArray, toSafeMap, toSafeWeakMap, toSafeWeakSet };

4

package.json
{
"name": "@locker/near-membrane-shared",
"version": "0.12.5",
"version": "0.12.6",
"repository": {

@@ -28,3 +28,3 @@ "type": "git",

},
"gitHead": "a6255b03f35fa5a431be0f2b3e519315a44b2b68"
"gitHead": "8d910d261927b270483ff4320c88346526cb967d"
}
export declare const LOCKER_IDENTIFIER_MARKER = "$LWS";
export declare const LOCKER_UNMINIFIED_FLAG: boolean;
export declare const CHAR_ELLIPSIS = "\u2026";
export declare const ERR_ILLEGAL_PROPERTY_ACCESS = "Illegal property access.";
export declare const LOCKER_NEAR_MEMBRANE_PROXY_MASKED_SYMBOL: symbol;
export declare const LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL: symbol;
export declare const LOCKER_NEAR_MEMBRANE_SYMBOL: symbol;
export declare const SYMBOL_LIVE_OBJECT: symbol;
export declare const TO_STRING_BRAND_ARRAY = "[object Array]";

@@ -7,0 +10,0 @@ export declare const TO_STRING_BRAND_ARRAY_BUFFER = "[object ArrayBuffer]";

@@ -0,2 +1,4 @@

import type { ProxyTrapInvokers } from './types';
export declare function noop(): void;
export declare function proxyMaskFunction<T extends Function>(func: Function, maskFunc: T, trapInvokers?: ProxyTrapInvokers): T;
//# sourceMappingURL=Function.d.ts.map

@@ -17,2 +17,3 @@ export * from './Array';

export * from './Object';
export * from './Proxy';
export * from './Reflect';

@@ -19,0 +20,0 @@ export * from './RegExp';

import type { NearMembraneSerializedValue } from './types';
export declare function getNearMembraneSerializedValue(object: object): NearMembraneSerializedValue;
export declare function isNearMembrane(value: any): boolean;
export declare function getNearMembraneProxySerializedValue(object: object): NearMembraneSerializedValue;
export declare function isNearMembraneProxy(value: any): boolean;
export declare function isNearMembraneProxyMaskedFunction(value: any): boolean;
//# sourceMappingURL=NearMembrane.d.ts.map

@@ -1,2 +0,2 @@

export declare const ReflectApply: typeof Reflect.apply, ReflectDefineProperty: typeof Reflect.defineProperty, ReflectDeleteProperty: typeof Reflect.deleteProperty, ReflectGetPrototypeOf: typeof Reflect.getPrototypeOf, ReflectOwnKeys: typeof Reflect.ownKeys, ReflectSetPrototypeOf: typeof Reflect.setPrototypeOf;
export declare const ReflectApply: typeof Reflect.apply, ReflectConstruct: typeof Reflect.construct, ReflectDefineProperty: typeof Reflect.defineProperty, ReflectDeleteProperty: typeof Reflect.deleteProperty, ReflectGet: typeof Reflect.get, ReflectGetOwnPropertyDescriptor: typeof Reflect.getOwnPropertyDescriptor, ReflectGetPrototypeOf: typeof Reflect.getPrototypeOf, ReflectHas: typeof Reflect.has, ReflectIsExtensible: typeof Reflect.isExtensible, ReflectOwnKeys: typeof Reflect.ownKeys, ReflectPreventExtensions: typeof Reflect.preventExtensions, ReflectSet: typeof Reflect.set, ReflectSetPrototypeOf: typeof Reflect.setPrototypeOf;
//# sourceMappingURL=Reflect.d.ts.map
export declare type Getter = () => any;
export declare type NearMembraneSerializedValue = bigint | boolean | number | string | symbol;
export declare type NearMembraneSerializedValue = bigint | boolean | number | string | symbol | undefined;
export declare const enum ProxyHandlerTraps {
None = 0,
Apply = 1,
Construct = 2,
DefineProperty = 4,
DeleteProperty = 8,
Get = 16,
GetOwnPropertyDescriptor = 32,
GetPrototypeOf = 64,
Has = 128,
IsExtensible = 256,
OwnKeys = 512,
PreventExtensions = 1024,
Set = 2048,
SetPrototypeOf = 4096
}
export declare type ProxyTarget = CallableFunction | NewableFunction | any[] | object;
export interface ProxyTrapInvokers {
apply?: typeof Reflect.apply;
construct?: typeof Reflect.construct;
get?: <T extends object, P extends PropertyKey>(target: T, propertyKey: P, receiver?: unknown, handshake?: boolean) => P extends keyof T ? T[P] : any;
has?: typeof Reflect.has;
}
export declare type Setter = (value: any) => void;

@@ -5,0 +27,0 @@ export declare const enum TargetTraits {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc