New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mikro-orm/libsql

Package Overview
Dependencies
Maintainers
0
Versions
719
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mikro-orm/libsql - npm Package Compare versions

Comparing version

to
6.4.11

1

LibSqlConnection.d.ts
import { BaseSqliteConnection, type Knex } from '@mikro-orm/knex';
export declare class LibSqlConnection extends BaseSqliteConnection {
connect(): Promise<void>;
createKnex(): void;
protected getKnexOptions(type: string): Knex.Config;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LibSqlConnection = void 0;
const node_path_1 = require("node:path");
const knex_1 = require("@mikro-orm/knex");
const fs_extra_1 = require("fs-extra");
class LibSqlConnection extends knex_1.BaseSqliteConnection {
async connect() {
this.createKnex();
const dbName = this.config.get('dbName');
if (dbName && dbName !== ':memory:' && !(0, node_path_1.dirname)(dbName).startsWith('libsql:/')) {
await (0, fs_extra_1.ensureDir)((0, node_path_1.dirname)(dbName));
}
await this.client.raw('pragma foreign_keys = on');
}
createKnex() {

@@ -7,0 +17,0 @@ this.client = this.createKnexClient(knex_1.LibSqlKnexDialect);

8

package.json
{
"name": "@mikro-orm/libsql",
"version": "6.4.11-dev.8",
"version": "6.4.11",
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",

@@ -61,3 +61,3 @@ "main": "index.js",

"dependencies": {
"@mikro-orm/knex": "6.4.11-dev.8",
"@mikro-orm/knex": "6.4.11",
"fs-extra": "11.3.0",

@@ -68,7 +68,7 @@ "libsql": "0.5.1",

"devDependencies": {
"@mikro-orm/core": "^6.4.10"
"@mikro-orm/core": "^6.4.11"
},
"peerDependencies": {
"@mikro-orm/core": "6.4.11-dev.8"
"@mikro-orm/core": "^6.0.0"
}
}