Hi Kilian, As Josh mentioned, VM.js should only be used by applications that are bundled in the platform. For our services (like cn-agent and vm-agent), we use a wrapper library that takes care of executing vmadm and parsing it's feedback. I've written up some docs, and posted it to npm here:
https://www.npmjs.com/package/vmadm/ Switching where you require VM.js with that library should hopefully not be too difficult. For most of the functions you should just need to wrap up the first several arguments into an object with the right property names. - Cody On Mon, Oct 16, 2017 at 11:01 AM, Josh Wilsdon <[email protected]> wrote: > Is there any plan form Joyent to update this Library to a newer node >> version? This is an really old version and besides the security point many >> commands like "const" are not supported :/ >> > > Hi Kilian, > > We would like to eventually update the node in the platform, but this is > not a current priority. > > I would also point out that using VM.js in applications not shipped with > the platform is not supported. See also the note here: > https://github.com/joyent/smartos-live/blob/master/src/ > vm/node_modules/VM.js#L61-L63 which was added in 2013. > > In our own components that use the platform tools without being shipped > with it (e.g. Triton's cn-agent and vm-agent) we use vmadm instead of VM.js > which avoids these issues. > > Thanks, > Josh > *smartos-discuss* | Archives > <https://www.listbox.com/member/archive/184463/=now> > <https://www.listbox.com/member/archive/rss/184463/27398174-11508a73> | > Modify > <https://www.listbox.com/member/?&> > Your Subscription <http://www.listbox.com> > ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
