From cf75c70844d839342e20030b540cc4ef40c5316a Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Sat, 21 Oct 2023 16:52:36 +0200 Subject: [PATCH] fix(connection): upload over HTTP read from env - bump @existdb/node-exist to version 5.5.0 - document that the secure option is deprecated - adapt example .xstrc - adapt compileConnectionOptions --- package-lock.json | 14 +++++++------- package.json | 2 +- readme.md | 9 ++++++--- spec/fixtures/.xstrc | 2 +- utility/configure.js | 1 - 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2a543b..7fbfbca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-development", "license": "MIT", "dependencies": { - "@existdb/node-exist": "^5.4.1", + "@existdb/node-exist": "^5.5.0", "bottleneck": "^2.19.5", "chalk": "^5.2.0", "dotenv": "^16.0.3", @@ -897,9 +897,9 @@ } }, "node_modules/@existdb/node-exist": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@existdb/node-exist/-/node-exist-5.4.1.tgz", - "integrity": "sha512-8Ws6LanpxAMZ1GpyUX5CWfa90kikp38VZvhkmYBdpFFUuuqbCNvLb5nUswJH2ZtTAjp0uN1t7zbaqairIO2hyQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@existdb/node-exist/-/node-exist-5.5.0.tgz", + "integrity": "sha512-YkKeD8g0sPFLSplEizcNjSOGea0RTth3KTiWwkzD47ckuNeFTb0iZWLufJ/DZeGpUqlqAInymHeWmD0cBdbjAw==", "dependencies": { "got": "^12.1.0", "lodash.assign": "^4.0.2", @@ -12381,9 +12381,9 @@ "dev": true }, "@existdb/node-exist": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@existdb/node-exist/-/node-exist-5.4.1.tgz", - "integrity": "sha512-8Ws6LanpxAMZ1GpyUX5CWfa90kikp38VZvhkmYBdpFFUuuqbCNvLb5nUswJH2ZtTAjp0uN1t7zbaqairIO2hyQ==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@existdb/node-exist/-/node-exist-5.5.0.tgz", + "integrity": "sha512-YkKeD8g0sPFLSplEizcNjSOGea0RTth3KTiWwkzD47ckuNeFTb0iZWLufJ/DZeGpUqlqAInymHeWmD0cBdbjAw==", "requires": { "got": "^12.1.0", "lodash.assign": "^4.0.2", diff --git a/package.json b/package.json index 0d71fbb..24506fd 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "maintainers": [], "license": "MIT", "dependencies": { - "@existdb/node-exist": "^5.4.1", + "@existdb/node-exist": "^5.5.0", "bottleneck": "^2.19.5", "chalk": "^5.2.0", "dotenv": "^16.0.3", diff --git a/readme.md b/readme.md index 0ae49a4..46deb5f 100644 --- a/readme.md +++ b/readme.md @@ -170,9 +170,12 @@ xst ls /db/apps --config spec/fixtures/.xstrc #### .xstrc -A JSON formatted file where you can set not only connection options but also other settings like -`color`. -Have a look at the [example .xstrc](spec/fixtures/.xstrc). +A JSON formatted file where you can set connection options as well as other preferred settings like +`color` or `timesort`. Have a look at the [example .xstrc](spec/fixtures/.xstrc). + +**NOTE:** The boolean option "secure" is deprecated. To switch between encrypted and unencrypted +connections use "protocol" instead. "secure" will continue to work for both XMLRPC and REST until +version 2. #### .existdb.json diff --git a/spec/fixtures/.xstrc b/spec/fixtures/.xstrc index 74b100b..00e1418 100644 --- a/spec/fixtures/.xstrc +++ b/spec/fixtures/.xstrc @@ -7,7 +7,7 @@ "rejectUnauthorized": false, "host": "localhost", "port": 8443, - "secure": true + "protocol": "https:" }, "extensionsort": true, "color": true diff --git a/utility/configure.js b/utility/configure.js index c8b6a82..7176560 100644 --- a/utility/configure.js +++ b/utility/configure.js @@ -53,7 +53,6 @@ function compileConnectionOptions (server, user, pass) { throw new Error('Unknown protocol: "' + protocol + '"!') } - connectionOptions.secure = protocol === 'https:' connectionOptions.host = hostname connectionOptions.port = port connectionOptions.protocol = protocol