UNPKG

node-red-contrib-opcua-server

Version:

Node-RED contribution nodes with next generation OPC UA in a compact and less dependencies package.

3 lines (2 loc) 2.25 kB
"use strict";module.exports={choreCompact:require("./chore").de.bianco.royal.compact,debugLog:require("./chore").de.bianco.royal.compact.opcuaSandboxDebug,errorLog:require("./chore").de.bianco.royal.compact.opcuaErrorDebug,initialize:function(e,t,n){var o,r,i,u,a=require("vm2").VM,c=(e.outstandingTimers=[],e.outstandingIntervals=[],{node:e,coreServer:t,sandboxNodeContext:{set:function(){e.context().set.apply(e,arguments)},get:function(){return e.context().get.apply(e,arguments)},keys:function(){return e.context().keys.apply(e,arguments)},get global(){return e.context().global},get flow(){return e.context().flow}},sandboxFlowContext:{set:function(){e.context().flow.set.apply(e,arguments)},get:function(){return e.context().flow.get.apply(e,arguments)},keys:function(){return e.context().flow.keys.apply(e,arguments)}},sandboxGlobalContext:{set:function(){e.context().global.set.apply(e,arguments)},get:function(){return e.context().global.get.apply(e,arguments)},keys:function(){return e.context().global.keys.apply(e,arguments)}},sandboxEnv:{get:function(t){return e._flow.getSetting(t)}},setTimeout:(u=function(){var t=arguments[0],n=setTimeout.apply(this,arguments);return arguments[0]=function(){c.clearTimeout(n);try{t.apply(this,arguments)}catch(t){e.error(t,{})}},e.outstandingTimers.push(n),n},g.toString=function(){return u.toString()},g),clearTimeout:(i=function(t){clearTimeout(t);t=e.outstandingTimers.indexOf(t);-1<t&&e.outstandingTimers.splice(t,1)},p.toString=function(){return i.toString()},p),setInterval:(r=function(){var t=arguments[0],n=setInterval.apply(this,arguments);return arguments[0]=function(){try{t.apply(this,arguments)}catch(t){e.error(t,{})}},e.outstandingIntervals.push(n),n},s.toString=function(){return r.toString()},s),clearInterval:(o=function(t){clearInterval(t);t=e.outstandingIntervals.indexOf(t);-1<t&&e.outstandingIntervals.splice(t,1)},l.toString=function(){return o.toString()},l)});function l(t){return o.apply(this,arguments)}function s(){return r.apply(this,arguments)}function p(t){return i.apply(this,arguments)}function g(){return u.apply(this,arguments)}t=new a({require:{builtin:["fs","Math","Date","console"]},sandbox:c});n(e,t)}}; //# sourceMappingURL=../maps/core/server-sandbox.js.map