Util.js 469 B

123456789101112131415
  1. let Fs=require("fire-fs"),Path=require("fire-path");
  2. const OutPut=Editor.require("packages://hot-update-tools/core/OutPut.js");
  3. module.exports={
  4. manifestResDir:null,
  5. getLocalIP(){
  6. let e="",r=require("os").networkInterfaces();
  7. return Object.keys(r).forEach(
  8. t=>{
  9. r[t].forEach(
  10. r=>{"IPv4"===r.family&&!1===r.internal&&(e=r.address)}
  11. )
  12. }
  13. ),e
  14. }
  15. };