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

qcobjects-admin-lib-db-sqlite3

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcobjects-admin-lib-db-sqlite3 - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

7

build/js/packages/com.qcobjects.admin.lib.db.sqlite3.js

@@ -34,2 +34,3 @@ /* eslint-disable @typescript-eslint/no-var-requires */

const sqlite3_1 = require("sqlite3");
const node_fs_1 = require("node:fs");
class SQLite3Container {

@@ -297,3 +298,7 @@ constructor({ pipe, id, containerFields }) {

try {
const db = new sqlite3_1.Database(node_path_1.default.resolve(`./${databaseName}`), sqlite3_1.OPEN_READWRITE, (err) => {
const databasePath = node_path_1.default.resolve(`./${databaseName}`);
if (!(0, node_fs_1.existsSync)(databasePath)) {
(0, node_fs_1.writeFileSync)(databasePath, "");
}
const db = new sqlite3_1.Database(databasePath, sqlite3_1.OPEN_READWRITE, (err) => {
if (err) {

@@ -300,0 +305,0 @@ throw new Error(`[sqlite3][database][createIfNotExists] Error creating database: ${err}`);

2

package.json
{
"name": "qcobjects-admin-lib-db-sqlite3",
"version": "0.0.23",
"version": "0.0.24",
"description": "QCObjects Admin Lib to work with SQLite3",

@@ -5,0 +5,0 @@ "main": "public/js/index.cjs",

@@ -30,2 +30,3 @@ /* eslint-disable @typescript-eslint/no-var-requires */

import { Database, OPEN_READWRITE } from "sqlite3";
import { existsSync, writeFileSync } from "node:fs";

@@ -343,3 +344,7 @@ class SQLite3Container {

try {
const db = new Database(path.resolve(`./${databaseName}`), OPEN_READWRITE, (err:any) => {
const databasePath = path.resolve(`./${databaseName}`);
if (!existsSync(databasePath)){
writeFileSync(databasePath, "");
}
const db = new Database(databasePath, OPEN_READWRITE, (err:any) => {
if (err) {

@@ -346,0 +351,0 @@ throw new Error(`[sqlite3][database][createIfNotExists] Error creating database: ${err}`);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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