Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/core

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libsql/core - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

10

lib-cjs/config.js

@@ -23,6 +23,6 @@ "use strict";

}
if (config.url === ':memory:') {
if (config.url === ":memory:") {
return {
path: ':memory:',
scheme: 'file',
path: ":memory:",
scheme: "file",
syncUrl,

@@ -76,3 +76,5 @@ syncInterval,

}
else if (uriScheme === "https" || uriScheme === "wss" || uriScheme === "file") {
else if (uriScheme === "https" ||
uriScheme === "wss" ||
uriScheme === "file") {
scheme = uriScheme;

@@ -79,0 +81,0 @@ }

29

lib-cjs/uri.js

@@ -17,8 +17,9 @@ "use strict";

const authority = groups["authority"] !== undefined
? parseAuthority(groups["authority"]) : undefined;
? parseAuthority(groups["authority"])
: undefined;
const path = percentDecode(groups["path"]);
const query = groups["query"] !== undefined
? parseQuery(groups["query"]) : undefined;
const query = groups["query"] !== undefined ? parseQuery(groups["query"]) : undefined;
const fragment = groups["fragment"] !== undefined
? percentDecode(groups["fragment"]) : undefined;
? percentDecode(groups["fragment"])
: undefined;
return { scheme, authority, path, query, fragment };

@@ -28,7 +29,7 @@ }

const URI_RE = (() => {
const SCHEME = '(?<scheme>[A-Za-z][A-Za-z.+-]*)';
const AUTHORITY = '(?<authority>[^/?#]*)';
const PATH = '(?<path>[^?#]*)';
const QUERY = '(?<query>[^#]*)';
const FRAGMENT = '(?<fragment>.*)';
const SCHEME = "(?<scheme>[A-Za-z][A-Za-z.+-]*)";
const AUTHORITY = "(?<authority>[^/?#]*)";
const PATH = "(?<path>[^?#]*)";
const QUERY = "(?<query>[^#]*)";
const FRAGMENT = "(?<fragment>.*)";
return new RegExp(`^${SCHEME}:(//${AUTHORITY})?${PATH}(\\?${QUERY})?(#${FRAGMENT})?$`, "su");

@@ -43,5 +44,3 @@ })();

const host = percentDecode(groups["host_br"] ?? groups["host"]);
const port = groups["port"]
? parseInt(groups["port"], 10)
: undefined;
const port = groups["port"] ? parseInt(groups["port"], 10) : undefined;
const userinfo = groups["username"] !== undefined

@@ -51,3 +50,4 @@ ? {

password: groups["password"] !== undefined
? percentDecode(groups["password"]) : undefined,
? percentDecode(groups["password"])
: undefined,
}

@@ -126,4 +126,5 @@ : undefined;

const passwordText = userinfo.password !== undefined
? `:${encodeURIComponent(userinfo.password)}` : "";
? `:${encodeURIComponent(userinfo.password)}`
: "";
return `${usernameText}${passwordText}@`;
}

@@ -36,7 +36,9 @@ "use strict";

return {
"columns": this.columns,
"columnTypes": this.columnTypes,
"rows": this.rows.map(rowToJson),
"rowsAffected": this.rowsAffected,
"lastInsertRowid": this.lastInsertRowid !== undefined ? "" + this.lastInsertRowid : null,
columns: this.columns,
columnTypes: this.columnTypes,
rows: this.rows.map(rowToJson),
rowsAffected: this.rowsAffected,
lastInsertRowid: this.lastInsertRowid !== undefined
? "" + this.lastInsertRowid
: null,
};

@@ -43,0 +45,0 @@ }

@@ -20,6 +20,6 @@ import { LibsqlError } from "./api.js";

}
if (config.url === ':memory:') {
if (config.url === ":memory:") {
return {
path: ':memory:',
scheme: 'file',
path: ":memory:",
scheme: "file",
syncUrl,

@@ -73,3 +73,5 @@ syncInterval,

}
else if (uriScheme === "https" || uriScheme === "wss" || uriScheme === "file") {
else if (uriScheme === "https" ||
uriScheme === "wss" ||
uriScheme === "file") {
scheme = uriScheme;

@@ -76,0 +78,0 @@ }

@@ -14,16 +14,17 @@ // URI parser based on RFC 3986

const authority = groups["authority"] !== undefined
? parseAuthority(groups["authority"]) : undefined;
? parseAuthority(groups["authority"])
: undefined;
const path = percentDecode(groups["path"]);
const query = groups["query"] !== undefined
? parseQuery(groups["query"]) : undefined;
const query = groups["query"] !== undefined ? parseQuery(groups["query"]) : undefined;
const fragment = groups["fragment"] !== undefined
? percentDecode(groups["fragment"]) : undefined;
? percentDecode(groups["fragment"])
: undefined;
return { scheme, authority, path, query, fragment };
}
const URI_RE = (() => {
const SCHEME = '(?<scheme>[A-Za-z][A-Za-z.+-]*)';
const AUTHORITY = '(?<authority>[^/?#]*)';
const PATH = '(?<path>[^?#]*)';
const QUERY = '(?<query>[^#]*)';
const FRAGMENT = '(?<fragment>.*)';
const SCHEME = "(?<scheme>[A-Za-z][A-Za-z.+-]*)";
const AUTHORITY = "(?<authority>[^/?#]*)";
const PATH = "(?<path>[^?#]*)";
const QUERY = "(?<query>[^#]*)";
const FRAGMENT = "(?<fragment>.*)";
return new RegExp(`^${SCHEME}:(//${AUTHORITY})?${PATH}(\\?${QUERY})?(#${FRAGMENT})?$`, "su");

@@ -38,5 +39,3 @@ })();

const host = percentDecode(groups["host_br"] ?? groups["host"]);
const port = groups["port"]
? parseInt(groups["port"], 10)
: undefined;
const port = groups["port"] ? parseInt(groups["port"], 10) : undefined;
const userinfo = groups["username"] !== undefined

@@ -46,3 +45,4 @@ ? {

password: groups["password"] !== undefined
? percentDecode(groups["password"]) : undefined,
? percentDecode(groups["password"])
: undefined,
}

@@ -120,4 +120,5 @@ : undefined;

const passwordText = userinfo.password !== undefined
? `:${encodeURIComponent(userinfo.password)}` : "";
? `:${encodeURIComponent(userinfo.password)}`
: "";
return `${usernameText}${passwordText}@`;
}

@@ -32,7 +32,9 @@ import { Base64 } from "js-base64";

return {
"columns": this.columns,
"columnTypes": this.columnTypes,
"rows": this.rows.map(rowToJson),
"rowsAffected": this.rowsAffected,
"lastInsertRowid": this.lastInsertRowid !== undefined ? "" + this.lastInsertRowid : null,
columns: this.columns,
columnTypes: this.columnTypes,
rows: this.rows.map(rowToJson),
rowsAffected: this.rowsAffected,
lastInsertRowid: this.lastInsertRowid !== undefined
? "" + this.lastInsertRowid
: null,
};

@@ -39,0 +41,0 @@ }

{
"name": "@libsql/core",
"version": "0.6.0",
"version": "0.6.1",
"keywords": [

@@ -5,0 +5,0 @@ "libsql",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc