Skip to content

Commit c32a8aa

Browse files
author
Daniele Briggi
committed
chore(config): test
1 parent 9b6057c commit c32a8aa

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

lib/drivers/utilities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function parseconnectionstring(connectionstring) {
200200
url.searchParams.forEach((value, key) => {
201201
options[key.toLowerCase().replace(/-/g, '_')] = value.trim();
202202
});
203-
const config = Object.assign(Object.assign({}, options), { username: decodeURIComponent(url.username), password: decodeURIComponent(url.password), password_hashed: options.password_hashed ? parseBoolean(options.password_hashed) : undefined, host: url.hostname,
203+
const config = Object.assign(Object.assign({}, options), { username: url.username ? decodeURIComponent(url.username) : undefined, password: url.password ? decodeURIComponent(url.password) : undefined, password_hashed: options.password_hashed ? parseBoolean(options.password_hashed) : undefined, host: url.hostname,
204204
// type cast values
205205
port: url.port ? parseInt(url.port) : undefined, insecure: options.insecure ? parseBoolean(options.insecure) : undefined, timeout: options.timeout ? parseInt(options.timeout) : undefined, zerotext: options.zerotext ? parseBoolean(options.zerotext) : undefined, create: options.create ? parseBoolean(options.create) : undefined, memory: options.memory ? parseBoolean(options.memory) : undefined, compression: options.compression ? parseBoolean(options.compression) : undefined, non_linearizable: options.non_linearizable ? parseBoolean(options.non_linearizable) : undefined, noblob: options.noblob ? parseBoolean(options.noblob) : undefined, maxdata: options.maxdata ? parseInt(options.maxdata) : undefined, maxrows: options.maxrows ? parseInt(options.maxrows) : undefined, maxrowset: options.maxrowset ? parseInt(options.maxrowset) : undefined, usewebsocket: options.usewebsocket ? parseBoolean(options.usewebsocket) : undefined, verbose: options.verbose ? parseBoolean(options.verbose) : undefined });
206206
// either you use an apikey, token or username and password

lib/sqlitecloud.drivers.dev.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/sqlitecloud.drivers.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqlitecloud/drivers",
3-
"version": "1.0.493",
3+
"version": "1.0.494",
44
"description": "SQLiteCloud drivers for Typescript/Javascript in edge, web and node clients",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",

src/drivers/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ export function parseconnectionstring(connectionstring: string): SQLiteCloudConf
223223

224224
const config: SQLiteCloudConfig = {
225225
...options,
226-
username: decodeURIComponent(url.username),
227-
password: decodeURIComponent(url.password),
226+
username: url.username ? decodeURIComponent(url.username) : undefined,
227+
password: url.password ? decodeURIComponent(url.password) : undefined,
228228
password_hashed: options.password_hashed ? parseBoolean(options.password_hashed) : undefined,
229229
host: url.hostname,
230230
// type cast values

0 commit comments

Comments
 (0)