Compare commits
46 Commits
Author | SHA1 | Date | |
---|---|---|---|
e94f0edafb | |||
c417d96e48 | |||
c5b1dbb46e | |||
893a2e2709 | |||
01f0dc6b20 | |||
736a42066c | |||
44403863d1 | |||
5be21fa100 | |||
042167c01e | |||
db38d038ef | |||
a4d8a46360 | |||
84e5c10129 | |||
98a2871f08 | |||
9bb847210a | |||
91d4ba5715 | |||
3ee2988964 | |||
221f1f6237 | |||
0a6fbf588e | |||
1a8546af6e | |||
9e01bdb8e2 | |||
33833fbc6c | |||
97b5678fe4 | |||
9b96984413 | |||
0de412b842 | |||
64bcce9e23 | |||
390812ec33 | |||
a672bb920f | |||
c3fabb6107 | |||
b4ebdbae47 | |||
c55d2dcf10 | |||
7274d5ea8a | |||
1ec733c2a9 | |||
3ef14d8ac7 | |||
f332bf95fe | |||
6acad8a306 | |||
6ae672f707 | |||
3d263e2181 | |||
85639f29af | |||
85448a21fc | |||
3b85c4a37e | |||
67dd650dce | |||
92eaf5f19a | |||
fcf9a61b1d | |||
fbd258a876 | |||
c65b8fc1af | |||
b7b588d713 |
306
package-lock.json
generated
306
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartnginx",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.33",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -89,6 +89,16 @@
|
||||
"symbol-tree": "^3.2.2"
|
||||
}
|
||||
},
|
||||
"@pushrocks/qenv": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fqenv/-/qenv-4.0.0.tgz",
|
||||
"integrity": "sha512-3/odPJaGp3ALtcSG/+N3dGtFX/CVBed9a5XKDa0bv7LoKCgYZeQwpF3jkCnNPjs7GKyzOzALHHID1L+zcb1RXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smartfile": "^6.0.6",
|
||||
"@pushrocks/smartlog": "^2.0.9"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartcli": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartcli/-/smartcli-3.0.7.tgz",
|
||||
@ -152,11 +162,11 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartlog": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.9.tgz",
|
||||
"integrity": "sha512-F2u3O8OOQ7QXgg9o0lI7HnqEhSQZo2A8u0EuNbQH+Kj2oL62xDwjAg6KkINwH7ObSWpaldZ+I28prG0JxaRzvg==",
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.11.tgz",
|
||||
"integrity": "sha512-V8SMzAAqDpl1+CJ9b3w5e/1ARjk4JOPZ35qZIllVBhHr8meCqnPE2immlfBYWmEp1xy3ntdAA+Lgewtu+iVk6A==",
|
||||
"requires": {
|
||||
"@pushrocks/smartlog-interfaces": "^2.0.2"
|
||||
"@pushrocks/smartlog-interfaces": "^2.0.5"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartlog-interfaces": {
|
||||
@ -217,12 +227,12 @@
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartstring": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.5.tgz",
|
||||
"integrity": "sha512-Bws2s6+Pc0HIXA35QH6cl6LJywhZ1U5icjyYMx+1kH8nURG+njzkacfarr9NWqyVYYOVu7SgXLzp9sR0eH7k9g==",
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartstring/-/smartstring-3.0.8.tgz",
|
||||
"integrity": "sha512-twmCGF47+TJoiCpj6t5MxwcKDDJEATuKqJXxftcHOlXWW743LJ/1bCpMueDdtumo5EheUfSxb43aRse3DU3wig==",
|
||||
"requires": {
|
||||
"crypto-random-string": "^1.0.0",
|
||||
"js-base64": "^2.4.9",
|
||||
"js-base64": "^2.5.0",
|
||||
"normalize-newline": "^3.0.0",
|
||||
"randomatic": "^3.1.1",
|
||||
"strip-indent": "^2.0.0"
|
||||
@ -238,6 +248,17 @@
|
||||
"luxon": "^1.8.0"
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartunique": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartunique/-/smartunique-3.0.1.tgz",
|
||||
"integrity": "sha512-xBu9ZB4C0BA0S/pbFFZn2ItPfnodPKpzrYIq1yN5XDs6OaookwcDF/iBwfS9+EYMSPENC9wAsOxg2RGMm4Qicw==",
|
||||
"requires": {
|
||||
"@types/shortid": "^0.0.29",
|
||||
"@types/uuid": "^3.0.0",
|
||||
"shortid": "^2.2.8",
|
||||
"uuid": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"@pushrocks/tapbundle": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.7.tgz",
|
||||
@ -312,6 +333,19 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz",
|
||||
"integrity": "sha512-VkKcfuitP+Nc/TaTFH0B8qNmn+6NbI6crLkQonbedViVz7O2w8QV/GERPlkJ4bg42VGHiEWa31CoTOPs1q6z1w=="
|
||||
},
|
||||
"@types/shortid": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fshortid/-/shortid-0.0.29.tgz",
|
||||
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps="
|
||||
},
|
||||
"@types/uuid": {
|
||||
"version": "3.4.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fuuid/-/uuid-3.4.4.tgz",
|
||||
"integrity": "sha512-tPIgT0GUmdJQNSHxp0X2jnpQfBSTfGxUMc/2CXBU2mnyTFVYVa2ojpoQ74w0U2yn2vw3jnC640+77lkFFpdVDw==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/vinyl": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.2.tgz",
|
||||
@ -633,16 +667,6 @@
|
||||
"type-detect": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"define-properties": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
|
||||
"integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"foreach": "^2.0.5",
|
||||
"object-keys": "^1.0.8"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
@ -663,30 +687,6 @@
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"es-abstract": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
|
||||
"integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.1.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.1",
|
||||
"is-callable": "^1.1.3",
|
||||
"is-regex": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"es-to-primitive": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz",
|
||||
"integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-callable": "^1.1.1",
|
||||
"is-date-object": "^1.0.1",
|
||||
"is-symbol": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"es6-error": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/es6-error/-/es6-error-4.1.1.tgz",
|
||||
@ -751,12 +751,6 @@
|
||||
"readable-stream": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"foreach": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
|
||||
"dev": true
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://verdaccio.lossless.one/form-data/-/form-data-2.3.3.tgz",
|
||||
@ -782,12 +776,6 @@
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"get-caller-file": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/get-caller-file/-/get-caller-file-1.0.3.tgz",
|
||||
@ -810,9 +798,9 @@
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/glob/-/glob-7.1.3.tgz",
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
@ -828,15 +816,6 @@
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
||||
},
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
@ -860,15 +839,6 @@
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"home": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/home/-/home-1.0.1.tgz",
|
||||
"integrity": "sha1-lqQjzrSbmDeP9e886uBZpVf53TU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"os-homedir": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
@ -889,18 +859,6 @@
|
||||
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
|
||||
"dev": true
|
||||
},
|
||||
"is-callable": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
|
||||
"integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
|
||||
"dev": true
|
||||
},
|
||||
"is-date-object": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
|
||||
"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
|
||||
"dev": true
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
@ -918,27 +876,12 @@
|
||||
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
|
||||
"dev": true
|
||||
},
|
||||
"is-regex": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
|
||||
"integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
|
||||
"dev": true
|
||||
},
|
||||
"is-symbol": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz",
|
||||
"integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=",
|
||||
"dev": true
|
||||
},
|
||||
"is-utf8": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||
@ -1025,12 +968,6 @@
|
||||
"path-exists": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.10",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
|
||||
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
|
||||
"dev": true
|
||||
},
|
||||
"luxon": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://verdaccio.lossless.one/luxon/-/luxon-1.9.0.tgz",
|
||||
@ -1052,9 +989,9 @@
|
||||
}
|
||||
},
|
||||
"math-random": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
|
||||
"integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w="
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/math-random/-/math-random-1.0.4.tgz",
|
||||
"integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A=="
|
||||
},
|
||||
"mem": {
|
||||
"version": "4.0.0",
|
||||
@ -1123,6 +1060,11 @@
|
||||
"integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==",
|
||||
"dev": true
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.0.1.tgz",
|
||||
"integrity": "sha512-k1u2uemjIGsn25zmujKnotgniC/gxQ9sdegdezeDiKdkDW56THUMqlz3urndKCXJxA6yPzSZbXx/QCMe/pxqsA=="
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/nice-try/-/nice-try-1.0.5.tgz",
|
||||
@ -1149,22 +1091,6 @@
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"dev": true
|
||||
},
|
||||
"object-keys": {
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
|
||||
"integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
|
||||
"dev": true
|
||||
},
|
||||
"object.getownpropertydescriptors": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
|
||||
"integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-properties": "^1.1.2",
|
||||
"es-abstract": "^1.5.1"
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@ -1173,12 +1099,6 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true
|
||||
},
|
||||
"os-locale": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/os-locale/-/os-locale-3.1.0.tgz",
|
||||
@ -1287,17 +1207,6 @@
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"qenv": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/qenv/-/qenv-1.1.7.tgz",
|
||||
"integrity": "sha1-0D+L+P43SUzwjQkZ/nZdyoTZr64=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.4",
|
||||
"smartfile": "^4.2.11",
|
||||
"typings-global": "^1.0.16"
|
||||
}
|
||||
},
|
||||
"randomatic": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/randomatic/-/randomatic-3.1.1.tgz",
|
||||
@ -1344,12 +1253,6 @@
|
||||
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
|
||||
"dev": true
|
||||
},
|
||||
"require-reload": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/require-reload/-/require-reload-0.2.2.tgz",
|
||||
"integrity": "sha1-KadZGEbK+RtuijzamRaD+V+NfUI=",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.9.0.tgz",
|
||||
@ -1399,6 +1302,14 @@
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
|
||||
"dev": true
|
||||
},
|
||||
"shortid": {
|
||||
"version": "2.2.14",
|
||||
"resolved": "https://verdaccio.lossless.one/shortid/-/shortid-2.2.14.tgz",
|
||||
"integrity": "sha512-4UnZgr9gDdA1kaKj/38IiudfC3KHKhDc1zi/HSxd9FQDR0VLwH3/y79tZJLsVYPsJgIjeHjqIWaWVRJUj9qZOQ==",
|
||||
"requires": {
|
||||
"nanoid": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
@ -1419,74 +1330,6 @@
|
||||
"chai-string": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"smartfile": {
|
||||
"version": "4.2.28",
|
||||
"resolved": "https://registry.npmjs.org/smartfile/-/smartfile-4.2.28.tgz",
|
||||
"integrity": "sha512-zUeAOLYftz8xLfKTs9U1NOuNPTA9jlvTQNr7lDIv84kXnr1AEpDb2Xwy1MdK1w733sBil/RkxtezrkvgRVAnNg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/fs-extra": "5.0.0",
|
||||
"@types/vinyl": "^2.0.2",
|
||||
"fs-extra": "^5.0.0",
|
||||
"glob": "^7.1.2",
|
||||
"js-yaml": "^3.10.0",
|
||||
"require-reload": "0.2.2",
|
||||
"smartpath": "^3.2.8",
|
||||
"smartq": "^1.1.6",
|
||||
"smartrequest": "^1.0.8",
|
||||
"vinyl-file": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/fs-extra": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.0.tgz",
|
||||
"integrity": "sha512-qtxDULQKUenuaDLW003CgC+0T0eiAfH3BrH+vSt87GLzbz5EZ6Ox6mv9rMttvhDOatbb9nYh0E1m7ydoYwUrAg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
|
||||
"integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"smartpath": {
|
||||
"version": "3.2.8",
|
||||
"resolved": "https://registry.npmjs.org/smartpath/-/smartpath-3.2.8.tgz",
|
||||
"integrity": "sha1-SDS9OouuIpW6rK26I8h6UBlS+UA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"home": "^1.0.1",
|
||||
"typings-global": "^1.0.14"
|
||||
}
|
||||
},
|
||||
"smartq": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||
"integrity": "sha512-FURlYW/C3bLeZjJcBVyw7bxCyQoCXiXbLCZcDUKznhXHaLu35c8m33/a2H8CA0rtb82lvzN8dRLnBZAcNMzNHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"util.promisify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"smartrequest": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/smartrequest/-/smartrequest-1.0.13.tgz",
|
||||
"integrity": "sha512-OHrvzaxaA8Z8bJr33yxnyJF35nrWyaumsajqXm2Zkv0/2hfWO1NQAj02VVV51rLQfmtU0Hex7Nk19SoC8nOmYg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"smartq": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://verdaccio.lossless.one/source-map/-/source-map-0.6.1.tgz",
|
||||
@ -1604,9 +1447,9 @@
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.12.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.12.0.tgz",
|
||||
"integrity": "sha512-CKEcH1MHUBhoV43SA/Jmy1l24HJJgI0eyLbBNSRyFlsQvb9v6Zdq+Nz2vEOH00nC5SUx4SneJ59PZUS/ARcokQ==",
|
||||
"version": "5.12.1",
|
||||
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.12.1.tgz",
|
||||
"integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.22.0",
|
||||
@ -1650,12 +1493,6 @@
|
||||
"integrity": "sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg==",
|
||||
"dev": true
|
||||
},
|
||||
"typings-global": {
|
||||
"version": "1.0.28",
|
||||
"resolved": "https://registry.npmjs.org/typings-global/-/typings-global-1.0.28.tgz",
|
||||
"integrity": "sha512-6VOwJWEY2971HOMHu/7sURzUXiD4/LiMJPsMAOqkHHAtS3MVpLFE5gzTiHilsH9KY5VE1mBQirWIgWFsDuo90A==",
|
||||
"dev": true
|
||||
},
|
||||
"universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
@ -1666,15 +1503,10 @@
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"util.promisify": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
|
||||
"integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-properties": "^1.1.2",
|
||||
"object.getownpropertydescriptors": "^2.0.3"
|
||||
}
|
||||
"uuid": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://verdaccio.lossless.one/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"vinyl": {
|
||||
"version": "2.2.0",
|
||||
|
11
package.json
11
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartnginx",
|
||||
"version": "2.0.10",
|
||||
"version": "2.0.33",
|
||||
"private": false,
|
||||
"description": "control nginx from node, TypeScript ready",
|
||||
"main": "dist/index.js",
|
||||
@ -26,18 +26,19 @@
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^3.0.4",
|
||||
"@pushrocks/smartfile": "^6.0.11",
|
||||
"@pushrocks/smartlog": "^2.0.9",
|
||||
"@pushrocks/smartlog": "^2.0.11",
|
||||
"@pushrocks/smartpromise": "^2.0.5",
|
||||
"@pushrocks/smartshell": "^2.0.13",
|
||||
"@pushrocks/smartstring": "^3.0.5"
|
||||
"@pushrocks/smartstring": "^3.0.8",
|
||||
"@pushrocks/smartunique": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.4",
|
||||
"@gitzone/tsrun": "^1.1.17",
|
||||
"@gitzone/tstest": "^1.0.18",
|
||||
"@pushrocks/qenv": "^4.0.0",
|
||||
"@pushrocks/tapbundle": "^3.0.7",
|
||||
"qenv": "^1.1.7",
|
||||
"tslint": "^5.12.0",
|
||||
"tslint": "^5.12.1",
|
||||
"tslint-config-prettier": "^1.17.0"
|
||||
}
|
||||
}
|
||||
|
21
test/test.ts
21
test/test.ts
@ -1,10 +1,10 @@
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
import path = require('path');
|
||||
|
||||
import { Qenv } from 'qenv';
|
||||
let testQenv = new Qenv(process.cwd(), path.join(process.cwd(), '.nogit'));
|
||||
import { Qenv } from '@pushrocks/qenv';
|
||||
const testQenv = new Qenv('./', './.nogit/');
|
||||
|
||||
import * as smartnginx from '../ts';
|
||||
import * as smartnginx from '../ts/index';
|
||||
|
||||
let testSmartNginx: smartnginx.SmartNginx;
|
||||
let testNginxZone01: smartnginx.NginxHost;
|
||||
@ -19,28 +19,35 @@ tap.test(`should produce an instance of NginxConfig`, async () => {
|
||||
testNginxZone01 = new smartnginx.NginxHost(testSmartNginx, {
|
||||
hostName: 'test100.bleu.de',
|
||||
destination: '192.192.192.191',
|
||||
destinationPort: 3000,
|
||||
privateKey: 'some private',
|
||||
publicKey: 'some public'
|
||||
});
|
||||
testNginxZone02 = new smartnginx.NginxHost(testSmartNginx, {
|
||||
hostName: 'test102.bleu.de',
|
||||
destination: '192.192.192.192',
|
||||
destinationPort: 3050,
|
||||
privateKey: 'some private',
|
||||
publicKey: 'some public'
|
||||
});
|
||||
expect(testNginxZone01).to.be.instanceof(smartnginx.NginxHost);
|
||||
console.log(testNginxZone01.configString);
|
||||
});
|
||||
|
||||
tap.test('.addZone() should add a zone to NginxConfig Object', async () => {
|
||||
testSmartNginx.addHost(testNginxZone01);
|
||||
testSmartNginx.addHost(testNginxZone02);
|
||||
tap.test('.addHostCandidate() should add a zone to NginxConfig Object', async () => {
|
||||
testSmartNginx.addHostCandidate(testNginxZone01);
|
||||
testSmartNginx.addHostCandidate(testNginxZone02);
|
||||
});
|
||||
|
||||
tap.test('.deploy() should deploy a config from an instance', async () => {
|
||||
await testSmartNginx.deploy();
|
||||
});
|
||||
|
||||
tap.test('should not redeploy', async () => {
|
||||
testSmartNginx.addHostCandidate(testNginxZone01);
|
||||
testSmartNginx.addHostCandidate(testNginxZone02);
|
||||
await testSmartNginx.deploy();
|
||||
});
|
||||
|
||||
tap.test('.stop() should end the process', async () => {
|
||||
testSmartNginx.nginxProcess.stop();
|
||||
});
|
||||
|
@ -1,6 +1,7 @@
|
||||
export interface IHostConfig {
|
||||
hostName: string;
|
||||
destination: string;
|
||||
destinationPort: number;
|
||||
privateKey: string;
|
||||
publicKey: string;
|
||||
}
|
||||
|
@ -17,19 +17,22 @@ export class NginxHost implements IHostConfig {
|
||||
/**
|
||||
* smartnginxInstance this NginHost belongs to
|
||||
*/
|
||||
smartnginxInstance: SmartNginx;
|
||||
public smartnginxInstance: SmartNginx;
|
||||
|
||||
hostName: string; // the host name e.g. domain name
|
||||
destination: string;
|
||||
configString: string; // the actual host config file as string
|
||||
privateKey: string;
|
||||
publicKey: string;
|
||||
public hostName: string; // the host name e.g. domain name
|
||||
public destination: string;
|
||||
public destinationPort: number;
|
||||
public configString: string; // the actual host config file as string
|
||||
public privateKey: string;
|
||||
public publicKey: string;
|
||||
|
||||
constructor(smartnginxInstanceArg: SmartNginx, optionsArg: IHostConfig) {
|
||||
this.smartnginxInstance = smartnginxInstanceArg;
|
||||
this.hostName = optionsArg.hostName;
|
||||
this.destination = optionsArg.destination;
|
||||
this.configString = snippets.getHostConfigString(optionsArg.hostName, optionsArg.destination);
|
||||
this.destinationPort = optionsArg.destinationPort;
|
||||
this.privateKey = optionsArg.privateKey;
|
||||
this.publicKey = optionsArg.publicKey;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -37,8 +40,18 @@ export class NginxHost implements IHostConfig {
|
||||
* @param certInstanceArg
|
||||
*/
|
||||
public async deploy() {
|
||||
const filePath = plugins.path.join(paths.nginxHostDirPath, `${this.hostName}.conf`);
|
||||
const filePathConfig = plugins.path.join(paths.nginxHostDirPath, `${this.hostName}.conf`);
|
||||
const filePathPrivate = plugins.path.join(paths.nginxHostDirPath, `${this.hostName}.private.pem`);
|
||||
const filePathPublic = plugins.path.join(paths.nginxHostDirPath, `${this.hostName}.public.pem`);
|
||||
|
||||
|
||||
// writeConfig
|
||||
plugins.smartfile.memory.toFsSync(this.configString, filePath);
|
||||
this.configString = snippets.getHostConfigString(this.hostName, this.destination, this.destinationPort);
|
||||
plugins.smartfile.memory.toFsSync(this.configString, filePathConfig);
|
||||
|
||||
// write ssl
|
||||
plugins.smartfile.memory.toFsSync(this.privateKey, filePathPrivate);
|
||||
plugins.smartfile.memory.toFsSync(this.publicKey, filePathPublic);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,11 @@ import { IHostConfig } from './interfaces/hostconfig';
|
||||
*/
|
||||
export class SmartNginx {
|
||||
public logger: plugins.smartlog.Smartlog;
|
||||
private hosts = new plugins.lik.Objectmap<NginxHost>();
|
||||
|
||||
// the objectmaps
|
||||
private deployedHosts = new plugins.lik.Objectmap<NginxHost>();
|
||||
private hostCandidates = new plugins.lik.Objectmap<NginxHost>();
|
||||
|
||||
public nginxProcess: NginxProcess = new NginxProcess(this);
|
||||
constructor(optionsArg: { logger?: plugins.smartlog.Smartlog }) {
|
||||
optionsArg.logger
|
||||
@ -26,9 +30,9 @@ export class SmartNginx {
|
||||
* add a host
|
||||
* @param nginxHostArg
|
||||
*/
|
||||
public addHost(optionsArg: IHostConfig): NginxHost {
|
||||
public addHostCandidate(optionsArg: IHostConfig): NginxHost {
|
||||
const nginxHost = new NginxHost(this, optionsArg);
|
||||
this.hosts.add(nginxHost);
|
||||
this.hostCandidates.add(nginxHost);
|
||||
return nginxHost;
|
||||
}
|
||||
|
||||
@ -36,47 +40,86 @@ export class SmartNginx {
|
||||
* Gets a NginxHost by hostname
|
||||
* @param hostNameArg
|
||||
*/
|
||||
public getNginxHostByHostName(hostNameArg: string): NginxHost {
|
||||
return this.hosts.find(nginxHost => {
|
||||
public getDeployedNginxHostByHostName(hostNameArg: string): NginxHost {
|
||||
return this.deployedHosts.find(nginxHost => {
|
||||
return nginxHost.hostName === hostNameArg;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* listHosts
|
||||
*/
|
||||
public listHosts(): NginxHost[] {
|
||||
return this.hosts.getArray();
|
||||
public async listDeployedHosts(): Promise<NginxHost[]> {
|
||||
return this.deployedHosts.getArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* remove a Host
|
||||
* @param nginxHostArg
|
||||
*/
|
||||
public removeHost(nginxHostArg: NginxHost) {
|
||||
this.hosts.remove(nginxHostArg);
|
||||
public async removeDeployedHost(nginxHostArg: NginxHost) {
|
||||
if (this.hostCandidates.isEmpty()) {
|
||||
this.deployedHosts.forEach(hostArg => {
|
||||
this.hostCandidates.add(hostArg);
|
||||
});
|
||||
}
|
||||
this.hostCandidates.remove(nginxHostArg);
|
||||
this.deploy();
|
||||
}
|
||||
|
||||
/**
|
||||
* clean all hosts
|
||||
* check wether there has been a diverging host configuration
|
||||
* this function will only redeploy the nginx configuration in case there has been a change
|
||||
*/
|
||||
public wipeHosts() {
|
||||
this.hosts.wipe();
|
||||
private async areHostsDiverged(): Promise<boolean> {
|
||||
let hostCounter = 0;
|
||||
let unfoundHosts = 0;
|
||||
await this.hostCandidates.forEach(async hostCandidateArg => {
|
||||
let foundHost = false;
|
||||
await this.deployedHosts.forEach(async deployedHostArg => {
|
||||
if (
|
||||
hostCandidateArg.hostName === deployedHostArg.hostName &&
|
||||
hostCandidateArg.destination === deployedHostArg.destination &&
|
||||
hostCandidateArg.destinationPort === deployedHostArg.destinationPort
|
||||
) {
|
||||
hostCounter++;
|
||||
foundHost = true;
|
||||
}
|
||||
});
|
||||
if (!foundHost) {
|
||||
unfoundHosts++;
|
||||
}
|
||||
});
|
||||
return (
|
||||
this.deployedHosts.getArray().length !== this.hostCandidates.getArray().length ||
|
||||
hostCounter !== this.deployedHosts.getArray().length ||
|
||||
unfoundHosts !== 0
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* deploy the current stack and restart nginx
|
||||
*/
|
||||
public async deploy() {
|
||||
// write base config
|
||||
plugins.smartfile.fs.ensureDirSync(paths.nginxConfigDirPath);
|
||||
plugins.smartfile.memory.toFsSync(snippets.getBaseConfigString(), paths.nginxConfFile);
|
||||
if (await this.areHostsDiverged()) {
|
||||
this.logger.log('ok', `hosts have diverged, trigger config deployment and nginx reload!`);
|
||||
this.deployedHosts.wipe();
|
||||
this.deployedHosts.addArray(this.hostCandidates.getArray());
|
||||
this.hostCandidates.wipe();
|
||||
|
||||
// deploy hosts
|
||||
plugins.smartfile.fs.ensureEmptyDirSync(paths.nginxHostDirPath);
|
||||
for (const host of this.hosts.getArray()) {
|
||||
await host.deploy();
|
||||
this.logger.log('info', `Host ${host.hostName} deployed!`);
|
||||
// write base config
|
||||
plugins.smartfile.fs.ensureDirSync(paths.nginxConfigDirPath);
|
||||
plugins.smartfile.memory.toFsSync(snippets.getBaseConfigString(), paths.nginxConfFile);
|
||||
|
||||
// deploy hosts
|
||||
plugins.smartfile.fs.ensureEmptyDirSync(paths.nginxHostDirPath);
|
||||
for (const host of this.deployedHosts.getArray()) {
|
||||
await host.deploy();
|
||||
this.logger.log('info', `Host ${host.hostName} deployed!`);
|
||||
}
|
||||
this.nginxProcess.reloadConfig();
|
||||
} else {
|
||||
this.logger.log('info', `hosts have not diverged, skipping nginx reload`);
|
||||
this.hostCandidates.wipe();
|
||||
}
|
||||
this.nginxProcess.reloadConfig();
|
||||
}
|
||||
}
|
||||
|
@ -10,5 +10,6 @@ import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartshell from '@pushrocks/smartshell';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartstring from '@pushrocks/smartstring';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
|
||||
export { lik, smartlog, smartpromise, smartshell, smartfile, smartstring };
|
||||
export { lik, smartlog, smartpromise, smartshell, smartfile, smartstring, smartunique };
|
||||
|
@ -1,10 +1,10 @@
|
||||
import * as plugins from './smartnginx.plugins';
|
||||
import * as paths from './smartnginx.paths';
|
||||
export let getBaseConfigString = () => {
|
||||
let baseConfig = plugins.smartstring.indent.normalize(`
|
||||
const baseConfig = plugins.smartstring.indent.normalize(`
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
pid /run/nginx/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
@ -71,13 +71,18 @@ export let getBaseConfigString = () => {
|
||||
return baseConfig;
|
||||
};
|
||||
|
||||
export let getHostConfigString = (hostNameArg: string, destinationIpArg: string) => {
|
||||
let hostConfig = plugins.smartstring.indent.normalize(`
|
||||
upstream ${hostNameArg} {
|
||||
server ${destinationIpArg};
|
||||
export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, destinationPortArg = 80) => {
|
||||
const uniqueString = plugins.smartunique.shortId();
|
||||
const hostConfig = plugins.smartstring.indent.normalize(`
|
||||
upstream ${uniqueString} {
|
||||
keepalive 100;
|
||||
server ${destinationIpArg}:${destinationPortArg};
|
||||
}
|
||||
|
||||
server {
|
||||
# The keepalive parameter sets the maximum number of idle keepalive connections
|
||||
# to upstream servers that are preserved in the cache of each worker process. When
|
||||
# this number is exceeded, the least recently used connections are closed.
|
||||
listen *:80 ;
|
||||
server_name ${hostNameArg};
|
||||
rewrite ^ https://${hostNameArg}$request_uri? permanent;
|
||||
@ -88,13 +93,14 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string)
|
||||
server_name ${hostNameArg};
|
||||
ssl_certificate ${paths.nginxHostDirPath}/${hostNameArg}.public.pem;
|
||||
ssl_certificate_key ${paths.nginxHostDirPath}/${hostNameArg}.private.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://${hostNameArg};
|
||||
include /etc/nginx/proxy_params;
|
||||
}
|
||||
location ~ /\.git {
|
||||
deny all;
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://${uniqueString};
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
Reference in New Issue
Block a user