nginxwebnodeplugin 1.0.308 → 1.0.310
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.d.ts +1 -4
- package/index.js +1 -1
- package/package.json +19 -16
- package/type.d.ts +2 -3
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckReachabilityOptions, RecursivePartial } from 'clientnode
|
|
1
|
+
import { CheckReachabilityOptions, RecursivePartial } from 'clientnode';
|
|
2
2
|
import { PluginHandler, PluginPromises } from 'web-node/type';
|
|
3
3
|
import { Configuration, ServicePromisesState } from './type';
|
|
4
4
|
/**
|
|
@@ -13,7 +13,6 @@ export declare class Nginx implements PluginHandler {
|
|
|
13
13
|
* @param state.configuration - Applications configuration.
|
|
14
14
|
* @param state.configuration.applicationServer - Plugins configuration.
|
|
15
15
|
* @param state.services - An object with stored service instances.
|
|
16
|
-
*
|
|
17
16
|
* @returns A mapping to promises which correspond to the plugin specific
|
|
18
17
|
* continues services.
|
|
19
18
|
*/
|
|
@@ -23,7 +22,6 @@ export declare class Nginx implements PluginHandler {
|
|
|
23
22
|
* @param state - Application state.
|
|
24
23
|
* @param state.configuration - Applications configuration.
|
|
25
24
|
* @param state.services - Application services.
|
|
26
|
-
*
|
|
27
25
|
* @returns Given object of services.
|
|
28
26
|
*/
|
|
29
27
|
static shouldExit({ configuration, services }: ServicePromisesState): Promise<void>;
|
|
@@ -35,7 +33,6 @@ export declare class Nginx implements PluginHandler {
|
|
|
35
33
|
* or un-reachability.
|
|
36
34
|
* @param givenOptions - Tools reachability options to configure how to
|
|
37
35
|
* check for reachability.
|
|
38
|
-
*
|
|
39
36
|
* @returns A promise which will be resolved if a request to given url has
|
|
40
37
|
* (not) finished. Otherwise returned promise will be rejected.
|
|
41
38
|
*/
|
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"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator","child_process","clientnode"],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")):r(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/regenerator"],e.child_process,e.clientnode);for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(this,((e,r,n,t,o)=>(()=>{var a=[,r=>{r.exports=e},e=>{e.exports=r},e=>{e.exports=n},e=>{e.exports=t},e=>{e.exports=o}],i={};function l(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}};return a[e](n,n.exports,l),n.exports}l.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return l.d(r,{a:r}),r},l.d=(e,r)=>{for(var n in r)l.o(r,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};
|
|
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"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/extends","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator","child_process","clientnode"],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")):r(e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/regenerator"],e.child_process,e.clientnode);for(var t in n)("object"==typeof exports?exports:e)[t]=n[t]}}(this,((e,r,n,t,o)=>(()=>{var a=[,r=>{r.exports=e},e=>{e.exports=r},e=>{e.exports=n},e=>{e.exports=t},e=>{e.exports=o}],i={};function l(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}};return a[e](n,n.exports,l),n.exports}l.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return l.d(r,{a:r}),r},l.d=(e,r)=>{for(var n in r)l.o(r,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};l.r(u),l.d(u,{Nginx:()=>x,default:()=>g});var s=l(1),c=l.n(s),p=l(2),d=l.n(p),f=l(3),b=l.n(f),v=l(4),m=l(5);function h(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 y(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)?y(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 y(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}var x=function(){function e(){}return e.loadService=function(){var r=d()(b().mark((function r(n){var t,o,a,i;return b().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=n.configuration.applicationServer,o=n.services,!Object.prototype.hasOwnProperty.call(o,"nginx")){r.next=3;break}return r.abrupt("return",null);case 3:return a=(0,v.spawn)("nginx",[],{cwd:process.cwd(),env:process.env,shell:!0,stdio:"inherit"}),o.nginx=a,a.reload=function(){return new Promise((function(e,r){return(0,v.exec)("nginx -s reload",(function(n,t,o){n?(n.standardErrorOutput=o,r(n)):e(t)}))}))},i=new Promise((function(e,r){for(var n,o,i=h(m.CLOSE_EVENT_NAMES);!(n=i()).done;)o=n.value,a.on(o,(0,m.getProcessCloseHandler)(e,t.proxy.optional?e:r,{reason:a,process:a}))})),r.prev=7,r.next=10,e.checkReachability(t);case 10:r.next=21;break;case 12:if(r.prev=12,r.t0=r.catch(7),!t.proxy.optional){r.next=20;break}o.nginx=null,i=null,r.next=21;break;case 20:throw r.t0;case 21:return r.abrupt("return",{nginx:i});case 22:case"end":return r.stop()}}),r,null,[[7,12]])})));return function(){return r.apply(this,arguments)}}(),e.shouldExit=function(){var r=d()(b().mark((function r(n){var t,o;return b().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=n.configuration,null===(o=n.services).nginx){r.next=5;break}return o.nginx.kill("SIGINT"),r.next=5,e.checkReachability(t.applicationServer,!0);case 5:delete o.nginx;case 6:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}(),e.checkReachability=function(e,r,n){if(void 0===r&&(r=!1),void 0===n&&(n={}),0<Object.values(e.proxy.ports.backend).length){var t="http"+(443===Object.values(e.proxy.ports.backend)[0]?"s":"")+"://"+e.hostName+":"+Object.values(e.proxy.ports.backend)[0],o=c()({options:{redirect:"manual"},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?m.checkUnreachability:m.checkReachability)(t,o)}return Promise.resolve(null)},e}();const g=x;return u})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nginxwebnodeplugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.310",
|
|
4
4
|
"description": "A nginx proxy server configuration template for webNode.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"clear": "weboptimizer clear",
|
|
38
38
|
"document": "weboptimizer document",
|
|
39
39
|
"lint": "weboptimizer lint",
|
|
40
|
-
"postversion": "yarn publish --non-interactive; git push --tags && git push",
|
|
41
40
|
"prepare": "yarn build",
|
|
42
41
|
"serve": "yarn build && yarn start",
|
|
43
42
|
"start": "web-node '{plugin: {hotReloading: true}}'",
|
|
@@ -49,22 +48,23 @@
|
|
|
49
48
|
"watch": "weboptimizer build --watch"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@babel/eslint-parser": "^7.
|
|
53
|
-
"@babel/runtime": "^7.24.
|
|
54
|
-
"@types/node": "^20.
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
56
|
-
"@typescript-eslint/parser": "^7.
|
|
57
|
-
"application-server-web-node-plugin": "^1.0.
|
|
58
|
-
"clientnode": "^3.0.
|
|
59
|
-
"documentation-website": "^1.0.
|
|
60
|
-
"eslint": "^
|
|
51
|
+
"@babel/eslint-parser": "^7.24.8",
|
|
52
|
+
"@babel/runtime": "^7.24.8",
|
|
53
|
+
"@types/node": "^20.14.10",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
55
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
56
|
+
"application-server-web-node-plugin": "^1.0.353",
|
|
57
|
+
"clientnode": "^3.0.1166",
|
|
58
|
+
"documentation-website": "^1.0.328",
|
|
59
|
+
"eslint": "^9.7.0",
|
|
61
60
|
"eslint-config-google": "^0.14.0",
|
|
62
|
-
"eslint-plugin-jsdoc": "^48.
|
|
61
|
+
"eslint-plugin-jsdoc": "^48.7.0",
|
|
63
62
|
"jest": "^29.7.0",
|
|
64
|
-
"jsdoc": "^4.0.
|
|
63
|
+
"jsdoc": "^4.0.3",
|
|
65
64
|
"node-fetch": "^3.3.2",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
65
|
+
"typescript-eslint": "^7.16.0",
|
|
66
|
+
"web-node": "^1.0.513",
|
|
67
|
+
"weboptimizer": "^2.0.1486"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@babel/runtime": "*",
|
|
@@ -83,7 +83,10 @@
|
|
|
83
83
|
"yarn": ">=4"
|
|
84
84
|
},
|
|
85
85
|
"resolutions": {
|
|
86
|
-
"colors": "1.4.0"
|
|
86
|
+
"colors": "1.4.0",
|
|
87
|
+
"globals@npm:^9.18.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
|
|
88
|
+
"globals@npm:^11.1.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
|
|
89
|
+
"globals@npm:^14.0.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch"
|
|
87
90
|
},
|
|
88
91
|
"sideEffects": false,
|
|
89
92
|
"documentationWebsite": {
|
package/type.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ChildProcess } from 'child_process';
|
|
3
|
-
import { Mapping, ProcessCloseReason } from 'clientnode/type';
|
|
4
1
|
import { Configuration as BaseConfiguration, ServicePromises as BaseServicePromises, Services as BaseServices } from 'application-server-web-node-plugin/type';
|
|
2
|
+
import { ChildProcess } from 'child_process';
|
|
3
|
+
import { Mapping, ProcessCloseReason } from 'clientnode';
|
|
5
4
|
import { ServicePromisesState as BaseServicePromisesState, ServicesState as BaseServicesState } from 'web-node/type';
|
|
6
5
|
export type Configuration<PluginConfigurationType = Mapping<unknown>> = BaseConfiguration<{
|
|
7
6
|
applicationServer: {
|