Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
b87ca1fa03 | |||
824f872fa5 | |||
80248c77d0 | |||
f592150646 | |||
f24652936a | |||
79af6c4a68 | |||
fafc757930 | |||
ead5e1a7bd |
@ -10,6 +10,7 @@ before_script:
|
||||
testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm install
|
||||
- npmci npm test stable
|
||||
only:
|
||||
- tags
|
||||
|
8
npmextra.json
Normal file
8
npmextra.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"npmdocker": {
|
||||
|
||||
}
|
||||
}
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "smartnginx",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartnginx",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.5",
|
||||
"private": false,
|
||||
"description": "control nginx from node, TypeScript ready",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
@ -35,6 +36,5 @@
|
||||
"@gitzone/tstest": "^1.0.13",
|
||||
"@pushrocks/tapbundle": "^3.0.5",
|
||||
"qenv": "^1.1.7"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,8 @@ tap.test(`should produce an instance of NginxConfig`, async () => {
|
||||
});
|
||||
|
||||
tap.test('.addZone() should add a zone to NginxConfig Object', async () => {
|
||||
testSmartNginx.addHost(testNginxZone01);
|
||||
testSmartNginx.addHost(testNginxZone02);
|
||||
testSmartNginx.addHost('test200.bleu.de', '192.192.192.191');
|
||||
testSmartNginx.addHost('test201.blue.de', '192.192.192.191');
|
||||
});
|
||||
|
||||
tap.test('.deploy() should deploy a config from an instance', async () => {
|
||||
|
@ -1,5 +1,15 @@
|
||||
import * as plugins from './smartnginx.plugins';
|
||||
|
||||
export class CertHandler {
|
||||
private _readyDeferred = plugins.smartpromise.defer();
|
||||
certHandlerReady = this._readyDeferred.promise;
|
||||
constructor() {} // nothing to do here for now
|
||||
|
||||
/**
|
||||
* ensure a cert is at the right location
|
||||
* @param hostName
|
||||
*/
|
||||
async ensureCertForHost(hostName) {
|
||||
|
||||
}
|
||||
}
|
@ -26,10 +26,22 @@ export class SmartNginx {
|
||||
* add a host
|
||||
* @param nginxHostArg
|
||||
*/
|
||||
addHost(nginxHostArg: NginxHost) {
|
||||
this.hosts.push(nginxHostArg);
|
||||
addHost(hostNameArg: string, destinationIp: string): NginxHost {
|
||||
const nginxHost = new NginxHost(this, {
|
||||
hostName: hostNameArg,
|
||||
destination: destinationIp
|
||||
})
|
||||
this.hosts.push(nginxHost);
|
||||
return nginxHost;
|
||||
}
|
||||
|
||||
getNginxHostByHostName(hostNameArg: string): NginxHost {
|
||||
return this.hosts.find(nginxHost => {
|
||||
return nginxHost.hostName === hostNameArg;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* listHosts
|
||||
*/
|
||||
|
Reference in New Issue
Block a user