@push-rpc/core
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -61,2 +61,3 @@ "use strict"; | ||
var rpc_1 = require("./rpc"); | ||
var RpcSession_1 = require("./RpcSession"); | ||
var utils_1 = require("./utils"); | ||
@@ -179,3 +180,3 @@ var RemoteTopicImpl = /** @class */ (function (_super) { | ||
// skip other system props | ||
if (["then", "catch", "toJSON", "prototype"].includes(propName)) | ||
if (__spreadArrays(["then", "catch", "toJSON"], RpcSession_1.skippedRemoteProps).includes(propName)) | ||
return target[propName]; | ||
@@ -196,3 +197,3 @@ // skip topic methods | ||
ownKeys: function () { | ||
return __spreadArrays(["prototype"], Object.keys(cachedItems)); | ||
return __spreadArrays(RpcSession_1.skippedRemoteProps, Object.keys(cachedItems)); | ||
}, | ||
@@ -199,0 +200,0 @@ }); |
@@ -59,1 +59,2 @@ import { CallOptions, MessageType, Middleware, RpcConnectionContext, RpcContext } from "./rpc"; | ||
export declare const PONG_MESSAGE = "PONG"; | ||
export declare const skippedRemoteProps: string[]; |
@@ -57,3 +57,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PONG_MESSAGE = exports.PING_MESSAGE = exports.RpcSession = void 0; | ||
exports.skippedRemoteProps = exports.PONG_MESSAGE = exports.PING_MESSAGE = exports.RpcSession = void 0; | ||
var logger_1 = require("./logger"); | ||
@@ -490,3 +490,3 @@ var remote_1 = require("./remote"); | ||
Object.getOwnPropertyNames(remote).forEach(function (key) { | ||
if (key == "prototype") | ||
if (exports.skippedRemoteProps.includes(key)) | ||
return; | ||
@@ -511,1 +511,2 @@ // because each item is always a topic; but those that not subscribed will not do a thing on resubscribe | ||
} | ||
exports.skippedRemoteProps = ["length", "name", "prototype", "arguments", "caller"]; |
{ | ||
"name": "@push-rpc/core", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"main": "dist/index.js", | ||
@@ -21,3 +21,3 @@ "types": "dist/index.d.ts", | ||
}, | ||
"gitHead": "780c40760154824bd93ee636fec0855e5e145c03" | ||
"gitHead": "a5bdea5151a3b21cc20762664290359caf6cb59f" | ||
} |
import {CallOptions, DataConsumer, LocalTopic, MessageType, RemoteTopic, TopicImpl} from "./rpc" | ||
import {RpcSession} from "./RpcSession" | ||
import {RpcSession, skippedRemoteProps} from "./RpcSession" | ||
import {createMessageId, getClassMethodNames} from "./utils" | ||
@@ -124,3 +124,4 @@ | ||
// skip other system props | ||
if (["then", "catch", "toJSON", "prototype"].includes(propName)) return target[propName] | ||
if (["then", "catch", "toJSON", ...skippedRemoteProps].includes(propName)) | ||
return target[propName] | ||
@@ -144,5 +145,5 @@ // skip topic methods | ||
ownKeys() { | ||
return ["prototype", ...Object.keys(cachedItems)] | ||
return [...skippedRemoteProps, ...Object.keys(cachedItems)] | ||
}, | ||
}) | ||
} |
@@ -456,3 +456,3 @@ import {LocalTopicImpl} from "./local" | ||
Object.getOwnPropertyNames(remote).forEach(key => { | ||
if (key == "prototype") return | ||
if (skippedRemoteProps.includes(key)) return | ||
@@ -491,1 +491,3 @@ // because each item is always a topic; but those that not subscribed will not do a thing on resubscribe | ||
} | ||
export const skippedRemoteProps = ["length", "name", "prototype", "arguments", "caller"] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
186319
4918