mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Linting fixes
This commit is contained in:
parent
ea61b15a40
commit
c3469de61b
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -14,9 +14,9 @@ pipeline {
|
|||||||
ansiColor('xterm')
|
ansiColor('xterm')
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
IMAGE = "nginx-proxy-manager"
|
IMAGE = 'nginx-proxy-manager'
|
||||||
BUILD_VERSION = getVersion()
|
BUILD_VERSION = getVersion()
|
||||||
MAJOR_VERSION = "2"
|
MAJOR_VERSION = '2'
|
||||||
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('/', '-')}"
|
BRANCH_LOWER = "${BRANCH_NAME.toLowerCase().replaceAll('/', '-')}"
|
||||||
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
|
COMPOSE_PROJECT_NAME = "npm_${BRANCH_LOWER}_${BUILD_NUMBER}"
|
||||||
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
|
COMPOSE_FILE = 'docker/docker-compose.ci.yml'
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const fs = require('fs');
|
|
||||||
const logger = require('./logger').global;
|
const logger = require('./logger').global;
|
||||||
|
|
||||||
async function appStart () {
|
async function appStart () {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const NodeRSA = require('node-rsa');
|
const NodeRSA = require('node-rsa');
|
||||||
const { config } = require('process');
|
|
||||||
const logger = require('../logger').global;
|
const logger = require('../logger').global;
|
||||||
|
|
||||||
const keysFile = '/data/keys.json';
|
const keysFile = '/data/keys.json';
|
||||||
@ -18,7 +17,8 @@ const configure = () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
if (configData?.database && configData?.database?.engine) {
|
|
||||||
|
if (configData && configData.database) {
|
||||||
logger.info(`Using configuration from file: ${filename}`);
|
logger.info(`Using configuration from file: ${filename}`);
|
||||||
instance = configData;
|
instance = configData;
|
||||||
return;
|
return;
|
||||||
@ -62,7 +62,7 @@ const configure = () => {
|
|||||||
// Get keys from file
|
// Get keys from file
|
||||||
if (!fs.existsSync(keysFile)) {
|
if (!fs.existsSync(keysFile)) {
|
||||||
generateKeys();
|
generateKeys();
|
||||||
} else if (!!process.env.DEBUG) {
|
} else if (process.env.DEBUG) {
|
||||||
logger.info('Keys file exists OK');
|
logger.info('Keys file exists OK');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -140,7 +140,7 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
isSqlite: function () {
|
isSqlite: function () {
|
||||||
instance === null && configure();
|
instance === null && configure();
|
||||||
return instance.database?.knex && instance.database?.knex?.client === 'sqlite3';
|
return instance.database.knex && instance.database.knex.client === 'sqlite3';
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,7 +159,7 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
getPublicKey: function () {
|
getPublicKey: function () {
|
||||||
instance === null && configure();
|
instance === null && configure();
|
||||||
return instance?.keys?.pub
|
return instance.keys.pub;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -169,7 +169,7 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
getPrivateKey: function () {
|
getPrivateKey: function () {
|
||||||
instance === null && configure();
|
instance === null && configure();
|
||||||
return instance?.keys?.key;
|
return instance.keys.key;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +22,7 @@ module.exports = function () {
|
|||||||
*/
|
*/
|
||||||
create: (payload) => {
|
create: (payload) => {
|
||||||
if (!config.getPrivateKey()) {
|
if (!config.getPrivateKey()) {
|
||||||
logger.error('Private key is empty!')
|
logger.error('Private key is empty!');
|
||||||
}
|
}
|
||||||
// sign with RSA SHA256
|
// sign with RSA SHA256
|
||||||
const options = {
|
const options = {
|
||||||
@ -55,7 +55,7 @@ module.exports = function () {
|
|||||||
*/
|
*/
|
||||||
load: function (token) {
|
load: function (token) {
|
||||||
if (!config.getPublicKey()) {
|
if (!config.getPublicKey()) {
|
||||||
logger.error('Public key is empty!')
|
logger.error('Public key is empty!');
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"node-rsa": "^1.0.8",
|
"node-rsa": "^1.0.8",
|
||||||
"nodemon": "^2.0.2",
|
|
||||||
"objection": "3.0.1",
|
"objection": "3.0.1",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"signale": "1.4.0",
|
"signale": "1.4.0",
|
||||||
@ -35,8 +34,9 @@
|
|||||||
"author": "Jamie Curnow <jc@jc21.com>",
|
"author": "Jamie Curnow <jc@jc21.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^8.36.0",
|
||||||
"eslint-plugin-align-assignments": "^1.1.2",
|
"eslint-plugin-align-assignments": "^1.1.2",
|
||||||
|
"nodemon": "^2.0.2",
|
||||||
"prettier": "^2.0.4"
|
"prettier": "^2.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user