nginxwebnodeplugin 1.0.331 → 1.0.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("child_process"),require("clientnode"),require("https"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator","child_process","clientnode","https"],r);else{var n="object"==typeof exports?r(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("child_process"),require("clientnode"),require("https")):r(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/regenerator"],e.child_process,e.clientnode,e.https);for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(this,((e,r,n,t,o,i)=>(()=>{var a=[(e,r,n)=>{n.r(r),n.d(r,{checkReachability:()=>
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("child_process"),require("clientnode"),require("https"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator","child_process","clientnode","https"],r);else{var n="object"==typeof exports?r(require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("child_process"),require("clientnode"),require("https")):r(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/regenerator"],e.child_process,e.clientnode,e.https);for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(this,((e,r,n,t,o,i)=>(()=>{var a=[(e,r,n)=>{n.r(r),n.d(r,{checkReachability:()=>m,default:()=>v,loadService:()=>b,nginx:()=>x,shouldExit:()=>h});var t=n(1),o=n.n(t),i=n(2),a=n.n(i),l=n(3),u=n.n(l),s=n(4),c=n(5),p=n(6);function d(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return f(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}e=n.hmd(e);var b=function(){var e=a()(u().mark((function e(r){var n,t,o,i;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.configuration.applicationServer,!(t=r.services).nginx){e.next=3;break}return e.abrupt("return",null);case 3:return o=(0,s.spawn)("nginx",[],{cwd:process.cwd(),env:process.env,shell:!0,stdio:"inherit"}),t.nginx=o,o.reload=function(){return new Promise((function(e,r){return(0,s.exec)("nginx -s reload",(function(n,t,o){n?(n.standardErrorOutput=o,r(n)):e(t)}))}))},i=new Promise((function(e,r){for(var t,i,a=d(c.CLOSE_EVENT_NAMES);!(t=a()).done;)i=t.value,o.on(i,(0,c.getProcessCloseHandler)(e,n.proxy.optional?e:r,{reason:o,process:o}))})),e.prev=7,e.next=10,m(n);case 10:e.next=21;break;case 12:if(e.prev=12,e.t0=e.catch(7),!n.proxy.optional){e.next=20;break}t.nginx=null,i=null,e.next=21;break;case 20:throw new Error('Could not acknowledge that nginx is running because "'+n.proxy.url+'" is not reachable: '+(0,c.represent)(e.t0));case 21:return e.abrupt("return",{nginx:i});case 22:case"end":return e.stop()}}),e,null,[[7,12]])})));return function(){return e.apply(this,arguments)}}(),h=function(){var e=a()(u().mark((function e(r){var n,t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.configuration,null===(t=r.services).nginx){e.next=5;break}return t.nginx.kill("SIGINT"),e.next=5,m(n.applicationServer,!0);case 5:delete t.nginx;case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),m=function(e,r,n){if(void 0===r&&(r=!1),void 0===n&&(n={}),e.proxy.url){var t=e.proxy.url.startsWith("https://"),i=o()({options:o()({redirect:"manual"},t?{agent:new p.Agent({rejectUnauthorized:!1})}:{}),pollIntervallInSeconds:.1,statusCodes:[100,101,102,200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],timeoutInSeconds:3,wait:!0},n);return(r?c.checkUnreachability:c.checkReachability)(e.proxy.url,i)}return Promise.resolve(null)},x=e.exports;const v=x},r=>{r.exports=e},e=>{e.exports=r},e=>{e.exports=n},e=>{e.exports=t},e=>{e.exports=o},e=>{e.exports=i}],l={};function u(e){var r=l[e];if(void 0!==r)return r.exports;var n=l[e]={id:e,loaded:!1,exports:{}};return a[e](n,n.exports,u),n.loaded=!0,n.exports}return u.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return u.d(r,{a:r}),r},u.d=(e,r)=>{for(var n in r)u.o(r,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},u.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),u.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u(0)})()));
|