Skip to content

Commit

Permalink
r0b08x [chore] 3/5/2024, 10:47:08 AM
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed Mar 5, 2024
1 parent e53cefa commit 0f3e389
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://corifeus.com/redis-ui


---
# 🏍️ The p3x-redis-ui-server package motor that is connected to the p3x-redis-ui-material web user interface v2024.4.122
# 🏍️ The p3x-redis-ui-server package motor that is connected to the p3x-redis-ui-material web user interface v2024.4.123



Expand Down Expand Up @@ -114,7 +114,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.122
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.123

[![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
2 changes: 1 addition & 1 deletion artifacts/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://

---

[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.122
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2024.4.123

[![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software)

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "p3x-redis-ui-server",
"version": "2024.4.122",
"version": "2024.4.123",
"description": "🏍️ The p3x-redis-ui-server package motor that is connected to the p3x-redis-ui-material web user interface",
"corifeus": {
"icon": "fas fa-flag-checkered",
Expand Down Expand Up @@ -47,7 +47,7 @@
"author": "Patrik Laszlo <[email protected]>",
"license": "MIT",
"devDependencies": {
"corifeus-builder": "^2024.4.108",
"corifeus-builder": "^2024.4.109",
"nodemon": "^3.1.0"
},
"dependencies-saved": {
Expand All @@ -57,7 +57,7 @@
"dependencies": {
"chalk": "^4.1.2",
"commander": "^12.0.0",
"corifeus-utils": "^2024.4.108",
"corifeus-utils": "^2024.4.109",
"ioredis": "^5.3.2",
"koa": "^2.15.0",
"koa-send": "^5.0.1",
Expand Down
27 changes: 17 additions & 10 deletions src/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ const fs = require('fs')
const cli = () => {
const pkg = require('../../package')

if (!process.versions.hasOwnProperty('electron') && !process.env.hasOwnProperty('P3XRS_DOCKER_HOME')) {
const program = require('commander').program
const program = require('commander').program


program
.version(pkg.version)
.option('-c, --config [config]', 'Set the p3xr.json p3x-redis-ui-server configuration, see more help in https://github.com/patrikx3/redis-ui-server')
.option('-r, --readonly-connections', 'Set the connections to be readonly, no adding, saving or delete a connection')
.option('-n, --connections-file-name [filename]', 'Set the connections file name, overrides default .p3xrs-conns.json')
.parse(process.argv);

program
.version(pkg.version)
.option('-c, --config [config]', 'Set the p3xr.json p3x-redis-ui-server configuration, see more help in https://github.com/patrikx3/redis-ui-server')
.option('-r, --readonly-connections', 'Set the connections to be readonly, no adding, saving or delete a connection')
.option('-n, --connections-file-name [filename]', 'Set the connections file name, overrides default .p3xrs-conns.json')
.parse(process.argv);
const programOptions = program.opts();

const programOptions = program.opts();
if (!process.versions.hasOwnProperty('electron') && !process.env.hasOwnProperty('P3XRS_DOCKER_HOME')) {

if (!programOptions.config) {

Expand Down Expand Up @@ -66,7 +67,13 @@ const cli = () => {
"@"
]
}
p3xrs.cfg.readonlyConnections = false
if (programOptions.readonlyConnections) {
// console.warn(programOptions.readonlyConnections)
p3xrs.cfg.readonlyConnections = true
//console.warn(p3xrs.cfg.readonlyConnections === true)
} else {
p3xrs.cfg.readonlyConnections = false
}
}

if (p3xrs.cfg.connectionsFileName === undefined) {
Expand Down

0 comments on commit 0f3e389

Please sign in to comment.