Socket
Socket
Sign inDemoInstall

jeep-sqlite

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jeep-sqlite - npm Package Compare versions

Comparing version 2.4.2 to 2.5.0

dist/cjs/index-7676cf07.js

9

dist/cjs/jeep-sqlite.cjs.js

@@ -5,6 +5,6 @@ 'use strict';

const index = require('./index-84ebd967.js');
const index = require('./index-7676cf07.js');
/*
Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v4.0.5 | MIT Licensed | https://stenciljs.com
*/

@@ -14,7 +14,4 @@ const patchBrowser = () => {

const opts = {};
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
if (importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
// TODO(STENCIL-661): Remove code related to the dynamic import shim
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
}

@@ -25,3 +22,3 @@ return index.promiseResolve(opts);

patchBrowser().then(options => {
return index.bootstrapLazy([["jeep-sqlite.cjs",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
return index.bootstrapLazy([["jeep-sqlite.cjs",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"typeOrm":[516,"typeorm"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerTypeOrm":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"beginTransaction":[64],"commitTransaction":[64],"rollbackTransaction":[64],"isTransactionActive":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
});

@@ -28,0 +25,0 @@

@@ -5,16 +5,7 @@ 'use strict';

const index = require('./index-84ebd967.js');
const index = require('./index-7676cf07.js');
/*
Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com
*/
const patchEsm = () => {
return index.promiseResolve();
};
const defineCustomElements = (win, options) => {
if (typeof window === 'undefined') return Promise.resolve();
return patchEsm().then(() => {
return index.bootstrapLazy([["jeep-sqlite.cjs",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
});
if (typeof window === 'undefined') return undefined;
return index.bootstrapLazy([["jeep-sqlite.cjs",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"typeOrm":[516,"typeorm"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerTypeOrm":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"beginTransaction":[64],"commitTransaction":[64],"rollbackTransaction":[64],"isTransactionActive":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
};

@@ -21,0 +12,0 @@

{
"entries": [
"./components/jeep-sqlite/jeep-sqlite.js"
"components/jeep-sqlite/jeep-sqlite.js"
],
"compiler": {
"name": "@stencil/core",
"version": "3.4.0",
"version": "4.0.5",
"typescriptVersion": "5.0.4"

@@ -9,0 +9,0 @@ },

@@ -1,2 +0,2 @@

import { newE2EPage } from '@stencil/core/testing';
import { newE2EPage } from "@stencil/core/testing";
describe('jeep-sqlite', () => {

@@ -3,0 +3,0 @@ it('renders', async () => {

@@ -1,3 +0,3 @@

import { newSpecPage } from '@stencil/core/testing';
import { JeepSqlite } from './jeep-sqlite';
import { newSpecPage } from "@stencil/core/testing";
import { JeepSqlite } from "./jeep-sqlite";
describe('jeep-sqlite', () => {

@@ -4,0 +4,0 @@ it('renders', async () => {

@@ -1,8 +0,8 @@

import initSqlJs from 'sql.js';
import { UtilsStore } from './utils-store';
import { UtilsImportJSON } from './utils-importJson';
import { UtilsJSON } from './utils-json';
import { UtilsExportJSON } from './utils-exportJson';
import { UtilsUpgrade } from './utils-upgrade';
import { UtilsSQLite } from './utils-sqlite';
import initSqlJs from "sql.js";
import { UtilsStore } from "./utils-store";
import { UtilsImportJSON } from "./utils-importJson";
import { UtilsJSON } from "./utils-json";
import { UtilsExportJSON } from "./utils-exportJson";
import { UtilsUpgrade } from "./utils-upgrade";
import { UtilsSQLite } from "./utils-sqlite";
export class Database {

@@ -54,3 +54,3 @@ constructor(databaseName, version, upgDict, store, autoSave, wasmPath) {

// execute the upgrade flow process
const changes = await UtilsUpgrade.onUpgrade(this.mDb, this.vUpgDict, curVersion, this.version);
const changes = await UtilsUpgrade.onUpgrade(this, this.vUpgDict, curVersion, this.version);
if (changes === -1) {

@@ -192,2 +192,53 @@ // restore the database from backup

}
async beginTransaction() {
if (!this._isDBOpen) {
let msg = `BeginTransaction: Database ${this.dbName} `;
msg += `not opened`;
return Promise.reject(new Error(msg));
}
try {
this.setIsTransActive(await UtilsSQLite.beginTransaction(this.mDb, true));
return 0;
}
catch (err) {
let msg = `BeginTransaction: ${err.message}`;
return Promise.reject(new Error(`${msg}`));
}
}
async commitTransaction() {
if (!this._isDBOpen) {
let msg = `CommitTransaction: Database ${this.dbName} `;
msg += `not opened`;
return Promise.reject(new Error(msg));
}
try {
this.setIsTransActive(await UtilsSQLite.commitTransaction(this.mDb, true));
return 0;
}
catch (err) {
let msg = `CommitTransaction: ${err.message}`;
return Promise.reject(new Error(`${msg}`));
}
}
async rollbackTransaction() {
if (!this._isDBOpen) {
let msg = `RollbackTransaction: Database ${this.dbName} `;
msg += `not opened`;
return Promise.reject(new Error(msg));
}
try {
this.setIsTransActive(await UtilsSQLite.rollbackTransaction(this.mDb, true));
return 0;
}
catch (err) {
let msg = `RollbackTransaction: ${err.message}`;
return Promise.reject(new Error(`${msg}`));
}
}
isTransActive() {
return this.isTransactionActive;
}
setIsTransActive(value) {
this.isTransactionActive = value;
}
async executeSQL(sql, transaction = true) {

@@ -203,4 +254,3 @@ if (!this._isDBOpen) {

if (transaction && !this.isTransactionActive) {
await UtilsSQLite.beginTransaction(this.mDb, this._isDBOpen);
this.isTransactionActive = true;
await this.beginTransaction();
}

@@ -218,3 +268,3 @@ }

if (transaction && this.isTransactionActive)
await UtilsSQLite.commitTransaction(this.mDb, this._isDBOpen);
await this.commitTransaction();
const changes = (await UtilsSQLite.dbChanges(this.mDb)) - initChanges;

@@ -227,3 +277,3 @@ return Promise.resolve(changes);

if (transaction && this.isTransactionActive)
await UtilsSQLite.rollbackTransaction(this.mDb, this._isDBOpen);
await this.rollbackTransaction();
}

@@ -236,3 +286,4 @@ catch (err) {

finally {
this.isTransactionActive = false;
if (transaction)
this.isTransactionActive = false;
if (this.autoSave) {

@@ -260,4 +311,3 @@ try {

if (transaction && !this.isTransactionActive) {
await UtilsSQLite.beginTransaction(this.mDb, this._isDBOpen);
this.isTransactionActive = true;
await this.beginTransaction();
}

@@ -276,3 +326,3 @@ }

if (transaction && this.isTransactionActive)
await UtilsSQLite.commitTransaction(this.mDb, this._isDBOpen);
await this.commitTransaction();
const changes = (await UtilsSQLite.dbChanges(this.mDb)) - initChanges;

@@ -288,3 +338,3 @@ retRes.changes = changes;

if (transaction && this.isTransactionActive)
await UtilsSQLite.rollbackTransaction(this.mDb, this._isDBOpen);
await this.rollbackTransaction();
}

@@ -297,3 +347,4 @@ catch (err) {

finally {
this.isTransactionActive = false;
if (transaction)
this.isTransactionActive = false;
if (this.autoSave) {

@@ -336,4 +387,3 @@ try {

if (transaction && !this.isTransactionActive) {
await UtilsSQLite.beginTransaction(this.mDb, this._isDBOpen);
this.isTransactionActive = true;
await this.beginTransaction();
}

@@ -352,3 +402,3 @@ }

if (transaction && this.isTransactionActive)
await UtilsSQLite.commitTransaction(this.mDb, this._isDBOpen);
await this.commitTransaction();
const changes = (await UtilsSQLite.dbChanges(this.mDb)) - initChanges;

@@ -364,3 +414,3 @@ retRes.changes = changes;

if (transaction && this.isTransactionActive)
await UtilsSQLite.rollbackTransaction(this.mDb, this._isDBOpen);
await this.rollbackTransaction();
}

@@ -373,3 +423,4 @@ catch (err) {

finally {
this.isTransactionActive = false;
if (transaction)
this.setIsTransActive(false);
if (this.autoSave) {

@@ -505,3 +556,3 @@ try {

// create the database schema
changes = await UtilsImportJSON.createDatabaseSchema(this.mDb, jsonData);
changes = await UtilsImportJSON.createDatabaseSchema(this, jsonData);
let msg = `Schema creation completed changes: ${changes}`;

@@ -511,3 +562,3 @@ importProgress.emit({ progress: msg });

// create the tables data
changes += await UtilsImportJSON.createTablesData(this.mDb, jsonData, importProgress);
changes += await UtilsImportJSON.createTablesData(this, jsonData, importProgress);
let msg = `Tables data creation completed changes: ${changes}`;

@@ -519,3 +570,3 @@ importProgress.emit({ progress: msg });

// create the views
changes += await UtilsImportJSON.createViews(this.mDb, jsonData);
changes += await UtilsImportJSON.createViews(this, jsonData);
}

@@ -522,0 +573,0 @@ // set Foreign Keys On

@@ -180,5 +180,2 @@ import { UtilsSQLite } from "./utils-sqlite";

const t2Names = colNames.map((name) => `t2.${name}`);
console.log(" whStmt ", whStmt);
console.log(" t1Names ", t1Names);
console.log(" t2Names ", t2Names);
try {

@@ -192,3 +189,2 @@ // addPrefix to the whereClause and swap colNames with withRefsNames

}
console.log(" whereClause ", whereClause);
const resultString = t1Names

@@ -200,3 +196,2 @@ .map((t1, index) => `${t1} = ${t2Names[index]}`)

`WHERE ${whereClause} AND t1.sql_deleted = 0;`;
console.log(" sql ", sql);
const vals = await UtilsSQLite.queryAll(mDB, sql, values);

@@ -203,0 +198,0 @@ if (vals.length > 0) {

@@ -1,2 +0,2 @@

import { UtilsSQLite } from './utils-sqlite';
import { UtilsSQLite } from "./utils-sqlite";
export class UtilsDrop {

@@ -3,0 +3,0 @@ static async getTablesNames(db) {

@@ -1,3 +0,3 @@

import { UtilsSQLite } from './utils-sqlite';
import { UtilsJSON } from './utils-json';
import { UtilsSQLite } from "./utils-sqlite";
import { UtilsJSON } from "./utils-json";
export class UtilsExportJSON {

@@ -4,0 +4,0 @@ static async createExportObject(db, sqlObj, exportProgress) {

@@ -1,6 +0,6 @@

import { UtilsSQLite } from './utils-sqlite';
import { UtilsDrop } from './utils-drop';
import { UtilsJSON } from './utils-json';
import { UtilsSQLite } from "./utils-sqlite";
import { UtilsDrop } from "./utils-drop";
import { UtilsJSON } from "./utils-json";
export class UtilsImportJSON {
static async createDatabaseSchema(db, jsonData) {
static async createDatabaseSchema(mDB, jsonData) {
let changes = -1;

@@ -10,9 +10,9 @@ const version = jsonData.version;

// set User Version PRAGMA
await UtilsSQLite.setVersion(db, version);
await UtilsSQLite.setVersion(mDB.mDb, version);
// DROP ALL when mode="full"
if (jsonData.mode === 'full') {
await UtilsDrop.dropAll(db);
await UtilsDrop.dropAll(mDB.mDb);
}
// create database schema
changes = await UtilsImportJSON.createSchema(db, jsonData);
changes = await UtilsImportJSON.createSchema(mDB, jsonData);
return Promise.resolve(changes);

@@ -24,8 +24,9 @@ }

}
static async createSchema(db, jsonData) {
static async createSchema(mDB, jsonData) {
// create the database schema
let changes = 0;
const db = mDB.mDb;
try {
// start a transaction
await UtilsSQLite.beginTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.beginTransaction(db, true));
}

@@ -42,3 +43,3 @@ catch (err) {

try {
await UtilsSQLite.rollbackTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.rollbackTransaction(db, true));
}

@@ -53,3 +54,3 @@ catch (err) {

try {
await UtilsSQLite.rollbackTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.rollbackTransaction(db, true));
return Promise.reject(new Error(`CreateSchema: ${msg}`));

@@ -63,3 +64,3 @@ }

try {
await UtilsSQLite.commitTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.commitTransaction(db, true));
return Promise.resolve(changes);

@@ -158,3 +159,3 @@ }

}
static async createTablesData(db, jsonData, importProgress) {
static async createTablesData(mDB, jsonData, importProgress) {
let changes = 0;

@@ -165,6 +166,7 @@ let isValue = false;

let initChanges = -1;
const db = mDB.mDb;
try {
initChanges = await UtilsSQLite.dbChanges(db);
// start a transaction
await UtilsSQLite.beginTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.beginTransaction(db, true));
}

@@ -194,3 +196,3 @@ catch (err) {

try {
await UtilsSQLite.commitTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.commitTransaction(db, true));
changes = (await UtilsSQLite.dbChanges(db)) - initChanges;

@@ -206,3 +208,3 @@ return Promise.resolve(changes);

try {
await UtilsSQLite.rollbackTransaction(db, true);
mDB.setIsTransActive(await UtilsSQLite.rollbackTransaction(db, true));
return Promise.reject(new Error(`CreateTablesData: ${msg}`));

@@ -439,6 +441,6 @@ }

}
static async createView(mDB, view) {
static async createView(db, view) {
const stmt = `CREATE VIEW IF NOT EXISTS ${view.name} AS ${view.value};`;
try {
const changes = await UtilsSQLite.execute(mDB, stmt, true);
const changes = await UtilsSQLite.execute(db, stmt, true);
if (changes < 0) {

@@ -454,2 +456,3 @@ return Promise.reject(new Error(`CreateView: ${view.name} failed`));

static async createViews(mDB, jsonData) {
const db = mDB.mDb;
let isView = false;

@@ -460,5 +463,5 @@ let msg = '';

try {
initChanges = await UtilsSQLite.dbChanges(mDB);
initChanges = await UtilsSQLite.dbChanges(db);
// start a transaction
await UtilsSQLite.beginTransaction(mDB, true);
mDB.setIsTransActive(await UtilsSQLite.beginTransaction(db, true));
}

@@ -472,3 +475,3 @@ catch (err) {

try {
await UtilsImportJSON.createView(mDB, jView);
await UtilsImportJSON.createView(db, jView);
isView = true;

@@ -485,4 +488,4 @@ }

try {
await UtilsSQLite.commitTransaction(mDB, true);
changes = (await UtilsSQLite.dbChanges(mDB)) - initChanges;
mDB.setIsTransActive(await UtilsSQLite.commitTransaction(db, true));
changes = (await UtilsSQLite.dbChanges(db)) - initChanges;
return Promise.resolve(changes);

@@ -497,3 +500,3 @@ }

try {
await UtilsSQLite.rollbackTransaction(mDB, true);
mDB.setIsTransActive(await UtilsSQLite.rollbackTransaction(db, true));
return Promise.reject(new Error(`createViews: ${msg}`));

@@ -500,0 +503,0 @@ }

@@ -1,2 +0,2 @@

import { UtilsSQLite } from './utils-sqlite';
import { UtilsSQLite } from "./utils-sqlite";
export class UtilsJSON {

@@ -3,0 +3,0 @@ static async isJsonSQLite(obj) {

@@ -1,5 +0,5 @@

import { UtilsDrop } from '../utils/utils-drop';
import { UtilsJSON } from '../utils/utils-json';
import { UtilsDelete } from './utils-delete';
import { UtilsSQLStatement } from './utils-sqlstatement';
import { UtilsDrop } from "../utils/utils-drop";
import { UtilsJSON } from "../utils/utils-json";
import { UtilsDelete } from "./utils-delete";
import { UtilsSQLStatement } from "./utils-sqlstatement";
export class UtilsSQLite {

@@ -14,3 +14,3 @@ static async beginTransaction(db, isOpen) {

db.exec(sql);
return Promise.resolve();
return Promise.resolve(true);
}

@@ -26,6 +26,6 @@ catch (err) {

}
const sql = 'ROLLBACK TRANSACTION;';
const sql = 'ROLLBACK;';
try {
db.exec(sql);
return Promise.resolve();
return Promise.resolve(false);
}

@@ -41,6 +41,6 @@ catch (err) {

}
const sql = 'COMMIT TRANSACTION;';
const sql = 'COMMIT;';
try {
db.exec(sql);
return Promise.resolve();
return Promise.resolve(false);
}

@@ -182,3 +182,2 @@ catch (err) {

static async queryAll(db, sql, values) {
const result = [];
try {

@@ -194,9 +193,9 @@ let retArr = [];

return Promise.resolve([]);
for (const valRow of retArr[0].values) {
const row = {};
for (let i = 0; i < retArr[0].columns.length; i++) {
row[retArr[0].columns[i]] = valRow[i];
}
result.push(row);
}
const result = retArr[0].values.map(entry => {
const obj = {};
retArr[0].columns.forEach((column, index) => {
obj[column] = entry[index];
});
return obj;
});
return Promise.resolve(result);

@@ -203,0 +202,0 @@ }

@@ -26,4 +26,2 @@ class UtilsSQLStatement {

const subSequenceArray = whereClause.split("AND");
console.log(" whereClause", whereClause);
console.log(" subSequenceArray", subSequenceArray);
columnValuePairs = subSequenceArray.map((pair) => pair.trim());

@@ -34,3 +32,2 @@ }

}
console.log(" columnValuePairs", columnValuePairs);
const modifiedPairs = columnValuePairs.map((pair) => {

@@ -37,0 +34,0 @@ const match = pair.match(/(\w+)\s*(=|<|<=|<>|>|>=|IN|BETWEEN|LIKE)\s*(.+)/);

@@ -1,4 +0,4 @@

import { UtilsSQLite } from '../utils/utils-sqlite';
import { UtilsSQLite } from "../utils/utils-sqlite";
export class UtilsUpgrade {
static async onUpgrade(mDb, vUpgDict, curVersion, targetVersion) {
static async onUpgrade(mDB, vUpgDict, curVersion, targetVersion) {
let changes = -1;

@@ -16,9 +16,9 @@ const sortedKeys = new Int32Array(Object.keys(vUpgDict)

// set Foreign Keys Off
await UtilsSQLite.setForeignKeyConstraintsEnabled(mDb, false);
const initChanges = await UtilsSQLite.dbChanges(mDb);
await UtilsUpgrade.executeStatementsProcess(mDb, statements);
await UtilsSQLite.setVersion(mDb, versionKey);
await UtilsSQLite.setForeignKeyConstraintsEnabled(mDB.mDb, false);
const initChanges = await UtilsSQLite.dbChanges(mDB.mDb);
await UtilsUpgrade.executeStatementsProcess(mDB, statements);
await UtilsSQLite.setVersion(mDB.mDb, versionKey);
// set Foreign Keys On
await UtilsSQLite.setForeignKeyConstraintsEnabled(mDb, true);
changes = (await UtilsSQLite.dbChanges(mDb)) - initChanges;
await UtilsSQLite.setForeignKeyConstraintsEnabled(mDB.mDb, true);
changes = (await UtilsSQLite.dbChanges(mDB.mDb)) - initChanges;
}

@@ -33,13 +33,13 @@ catch (err) {

;
static async executeStatementsProcess(mDb, statements) {
static async executeStatementsProcess(mDB, statements) {
try {
await UtilsSQLite.beginTransaction(mDb, true);
mDB.setIsTransActive(await UtilsSQLite.beginTransaction(mDB.mDb, true));
for (const statement of statements) {
await UtilsSQLite.execute(mDb, statement, false);
await UtilsSQLite.execute(mDB.mDb, statement, false);
}
await UtilsSQLite.commitTransaction(mDb, true);
mDB.setIsTransActive(await UtilsSQLite.commitTransaction(mDB.mDb, true));
return Promise.resolve();
}
catch (err) {
await UtilsSQLite.rollbackTransaction(mDb, true);
mDB.setIsTransActive(await UtilsSQLite.rollbackTransaction(mDB.mDb, true));
return Promise.reject(`ExecuteStatementProcess: ${err}`);

@@ -46,0 +46,0 @@ }

@@ -1,6 +0,6 @@

import { p as promiseResolve, b as bootstrapLazy } from './index-b72387db.js';
export { s as setNonce } from './index-b72387db.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-cc96dcf3.js';
export { s as setNonce } from './index-cc96dcf3.js';
/*
Stencil Client Patch Browser v3.4.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v4.0.5 | MIT Licensed | https://stenciljs.com
*/

@@ -10,7 +10,4 @@ const patchBrowser = () => {

const opts = {};
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
if (importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
// TODO(STENCIL-661): Remove code related to the dynamic import shim
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
}

@@ -21,5 +18,5 @@ return promiseResolve(opts);

patchBrowser().then(options => {
return bootstrapLazy([["jeep-sqlite",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
return bootstrapLazy([["jeep-sqlite",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"typeOrm":[516,"typeorm"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerTypeOrm":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"beginTransaction":[64],"commitTransaction":[64],"rollbackTransaction":[64],"isTransactionActive":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
});
//# sourceMappingURL=jeep-sqlite.js.map

@@ -1,16 +0,7 @@

import { p as promiseResolve, b as bootstrapLazy } from './index-b72387db.js';
export { s as setNonce } from './index-b72387db.js';
import { b as bootstrapLazy } from './index-cc96dcf3.js';
export { s as setNonce } from './index-cc96dcf3.js';
/*
Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com
*/
const patchEsm = () => {
return promiseResolve();
};
const defineCustomElements = (win, options) => {
if (typeof window === 'undefined') return Promise.resolve();
return patchEsm().then(() => {
return bootstrapLazy([["jeep-sqlite",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
});
if (typeof window === 'undefined') return undefined;
return bootstrapLazy([["jeep-sqlite",[[1,"jeep-sqlite",{"autoSave":[516,"autosave"],"typeOrm":[516,"typeorm"],"wasmPath":[513,"wasmpath"],"pickText":[513,"picktext"],"saveText":[513,"savetext"],"buttonOptions":[513,"buttonoptions"],"innerAutoSave":[32],"innerTypeOrm":[32],"innerWasmPath":[32],"innerPickText":[32],"innerSaveText":[32],"innerButtonOptions":[32],"echo":[64],"createConnection":[64],"isConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"beginTransaction":[64],"commitTransaction":[64],"rollbackTransaction":[64],"isTransactionActive":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[64],"getTableList":[64],"isDBExists":[64],"isDBOpen":[64],"deleteDatabase":[64],"isStoreOpen":[64],"copyFromAssets":[64],"isTableExists":[64],"createSyncTable":[64],"getSyncDate":[64],"setSyncDate":[64],"isJsonValid":[64],"importFromJson":[64],"exportToJson":[64],"deleteExportedRows":[64],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64],"saveToStore":[64],"saveToLocalDisk":[64],"getFromLocalDiskToStore":[64],"getFromHTTPRequest":[64]}]]]], options);
};

@@ -17,0 +8,0 @@

@@ -1,2 +0,2 @@

import{p as e,b as t}from"./p-68f52286.js";export{s as setNonce}from"./p-68f52286.js";const o=()=>{const t=import.meta.url;const s={};if(t!==""){s.resourcesUrl=new URL(".",t).href}return e(s)};o().then((e=>t([["p-de5e45f7",[[1,"jeep-sqlite",{autoSave:[516,"autosave"],wasmPath:[513,"wasmpath"],pickText:[513,"picktext"],saveText:[513,"savetext"],buttonOptions:[513,"buttonoptions"],innerAutoSave:[32],innerWasmPath:[32],innerPickText:[32],innerSaveText:[32],innerButtonOptions:[32],echo:[64],createConnection:[64],isConnection:[64],closeConnection:[64],open:[64],close:[64],getVersion:[64],execute:[64],executeSet:[64],run:[64],query:[64],getTableList:[64],isDBExists:[64],isDBOpen:[64],deleteDatabase:[64],isStoreOpen:[64],copyFromAssets:[64],isTableExists:[64],createSyncTable:[64],getSyncDate:[64],setSyncDate:[64],isJsonValid:[64],importFromJson:[64],exportToJson:[64],deleteExportedRows:[64],addUpgradeStatement:[64],isDatabase:[64],getDatabaseList:[64],checkConnectionsConsistency:[64],saveToStore:[64],saveToLocalDisk:[64],getFromLocalDiskToStore:[64],getFromHTTPRequest:[64]}]]]],e)));
import{p as e,b as t}from"./p-afe75585.js";export{s as setNonce}from"./p-afe75585.js";const o=()=>{const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};o().then((e=>t([["p-b6434b38",[[1,"jeep-sqlite",{autoSave:[516,"autosave"],typeOrm:[516,"typeorm"],wasmPath:[513,"wasmpath"],pickText:[513,"picktext"],saveText:[513,"savetext"],buttonOptions:[513,"buttonoptions"],innerAutoSave:[32],innerTypeOrm:[32],innerWasmPath:[32],innerPickText:[32],innerSaveText:[32],innerButtonOptions:[32],echo:[64],createConnection:[64],isConnection:[64],closeConnection:[64],open:[64],close:[64],getVersion:[64],beginTransaction:[64],commitTransaction:[64],rollbackTransaction:[64],isTransactionActive:[64],execute:[64],executeSet:[64],run:[64],query:[64],getTableList:[64],isDBExists:[64],isDBOpen:[64],deleteDatabase:[64],isStoreOpen:[64],copyFromAssets:[64],isTableExists:[64],createSyncTable:[64],getSyncDate:[64],setSyncDate:[64],isJsonValid:[64],importFromJson:[64],exportToJson:[64],deleteExportedRows:[64],addUpgradeStatement:[64],isDatabase:[64],getDatabaseList:[64],checkConnectionsConsistency:[64],saveToStore:[64],saveToLocalDisk:[64],getFromLocalDiskToStore:[64],getFromHTTPRequest:[64]}]]]],e)));
//# sourceMappingURL=jeep-sqlite.esm.js.map

@@ -17,2 +17,3 @@ /* eslint-disable */

"autoSave": boolean;
"beginTransaction": (options: SQLiteOptions) => Promise<SQLiteChanges>;
/**

@@ -25,2 +26,3 @@ * Button Options

"closeConnection": (options: SQLiteOptions) => Promise<void>;
"commitTransaction": (options: SQLiteOptions) => Promise<SQLiteChanges>;
"copyFromAssets": (options: SQLiteFromAssetsOptions) => Promise<void>;

@@ -49,2 +51,3 @@ "createConnection": (options: ConnectionOptions) => Promise<void>;

"isTableExists": (options: SQLiteTableOptions) => Promise<SQLiteResult>;
"isTransactionActive": (options: SQLiteOptions) => Promise<SQLiteResult>;
"open": (options: SQLiteOptions) => Promise<void>;

@@ -56,2 +59,3 @@ /**

"query": (options: SQLiteQueryOptions) => Promise<SQLiteValues>;
"rollbackTransaction": (options: SQLiteOptions) => Promise<SQLiteChanges>;
"run": (options: SQLiteRunOptions) => Promise<SQLiteChanges>;

@@ -66,2 +70,6 @@ /**

/**
* in use with TypeOrm
*/
"typeOrm": boolean;
/**
* WasmPath

@@ -111,2 +119,6 @@ */

/**
* in use with TypeOrm
*/
"typeOrm"?: boolean;
/**
* WasmPath

@@ -113,0 +125,0 @@ */

@@ -10,2 +10,6 @@ import { EventEmitter } from '../../stencil-public-runtime';

/**
* in use with TypeOrm
*/
typeOrm: boolean;
/**
* WasmPath

@@ -27,2 +31,3 @@ */

innerAutoSave: boolean;
innerTypeOrm: boolean;
innerWasmPath: string;

@@ -33,2 +38,3 @@ innerPickText: string;

parseAutoSave(newValue: boolean): void;
parseTypeOrm(newValue: boolean): void;
parseWasmPath(newValue: string): void;

@@ -50,2 +56,6 @@ parsePickText(newValue: string): void;

getVersion(options: SQLiteOptions): Promise<SQLiteVersion>;
beginTransaction(options: SQLiteOptions): Promise<SQLiteChanges>;
commitTransaction(options: SQLiteOptions): Promise<SQLiteChanges>;
rollbackTransaction(options: SQLiteOptions): Promise<SQLiteChanges>;
isTransactionActive(options: SQLiteOptions): Promise<SQLiteResult>;
execute(options: SQLiteExecuteOptions): Promise<SQLiteChanges>;

@@ -103,2 +113,6 @@ executeSet(options: SQLiteSetOptions): Promise<SQLiteChanges>;

private _getVersion;
private _beginTransaction;
private _commitTransaction;
private _rollbackTransaction;
private _isTransactionActive;
private _execute;

@@ -105,0 +119,0 @@ private _executeSet;

@@ -435,3 +435,3 @@ declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;

*/
interface HostAttributes {
export interface HostAttributes {
class?: string | {

@@ -934,2 +934,4 @@ [className: string]: boolean;

name?: string;
onSelect?: (event: Event) => void;
onselect?: (event: Event) => void;
pattern?: string;

@@ -1148,2 +1150,4 @@ placeholder?: string;

name?: string;
onSelect?: (event: Event) => void;
onselect?: (event: Event) => void;
placeholder?: string;

@@ -1295,3 +1299,3 @@ readOnly?: boolean;

'color-interpolation'?: number | string;
'color-interpolation-filters'?: 'auto' | 's-rGB' | 'linear-rGB' | 'inherit';
'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB';
'color-profile'?: number | string;

@@ -1626,4 +1630,10 @@ 'color-rendering'?: number | string;

onAnimationIterationCapture?: (event: AnimationEvent) => void;
onTransitionCancel?: (event: TransitionEvent) => void;
onTransitionCancelCapture?: (event: TransitionEvent) => void;
onTransitionEnd?: (event: TransitionEvent) => void;
onTransitionEndCapture?: (event: TransitionEvent) => void;
onTransitionRun?: (event: TransitionEvent) => void;
onTransitionRunCapture?: (event: TransitionEvent) => void;
onTransitionStart?: (event: TransitionEvent) => void;
onTransitionStartCapture?: (event: TransitionEvent) => void;
}

@@ -1630,0 +1640,0 @@ }

@@ -8,3 +8,3 @@ import { EventEmitter } from '../stencil-public-runtime';

private version;
private mDb;
mDb: any;
private vUpgDict;

@@ -24,2 +24,7 @@ private autoSave;

deleteDB(database: string): Promise<void>;
beginTransaction(): Promise<number>;
commitTransaction(): Promise<number>;
rollbackTransaction(): Promise<number>;
isTransActive(): boolean;
setIsTransActive(value: boolean): void;
executeSQL(sql: string, transaction?: boolean): Promise<number>;

@@ -26,0 +31,0 @@ execSet(set: SQLiteSet[], transaction?: boolean, returnMode?: string): Promise<any>;

import { EventEmitter } from '../stencil-public-runtime';
import { JsonSQLite, JsonProgressListener, JsonView } from '../interfaces/interfaces';
import { Database } from './database';
export declare class UtilsImportJSON {
static createDatabaseSchema(db: any, jsonData: JsonSQLite): Promise<number>;
static createSchema(db: any, jsonData: any): Promise<number>;
static createDatabaseSchema(mDB: Database, jsonData: JsonSQLite): Promise<number>;
static createSchema(mDB: Database, jsonData: any): Promise<number>;
static createSchemaStatement(jsonData: any): Promise<string[]>;
static createTablesData(db: any, jsonData: JsonSQLite, importProgress: EventEmitter<JsonProgressListener>): Promise<number>;
static createTablesData(mDB: Database, jsonData: JsonSQLite, importProgress: EventEmitter<JsonProgressListener>): Promise<number>;
static createTableData(db: any, table: any, mode: string): Promise<number>;

@@ -16,4 +17,4 @@ static createRowStatement(db: any, tColNames: string[], row: any[], j: number, tableName: string, mode: string): Promise<string>;

static setNameForUpdate(names: string[]): Promise<string>;
static createView(mDB: any, view: JsonView): Promise<void>;
static createViews(mDB: any, jsonData: JsonSQLite): Promise<number>;
static createView(db: any, view: JsonView): Promise<void>;
static createViews(mDB: Database, jsonData: JsonSQLite): Promise<number>;
}
export declare class UtilsSQLite {
static beginTransaction(db: any, isOpen: boolean): Promise<void>;
static rollbackTransaction(db: any, isOpen: boolean): Promise<void>;
static commitTransaction(db: any, isOpen: boolean): Promise<void>;
static beginTransaction(db: any, isOpen: boolean): Promise<boolean>;
static rollbackTransaction(db: any, isOpen: boolean): Promise<boolean>;
static commitTransaction(db: any, isOpen: boolean): Promise<boolean>;
static dbChanges(db: any): Promise<number>;

@@ -6,0 +6,0 @@ static getLastId(db: any): Promise<number>;

import { SQLiteVersionUpgrade } from '../interfaces/interfaces';
import { Database } from './database';
export declare class UtilsUpgrade {
static onUpgrade(mDb: any, vUpgDict: Record<number, SQLiteVersionUpgrade>, curVersion: number, targetVersion: number): Promise<number>;
static executeStatementsProcess(mDb: any, statements: string[]): Promise<void>;
static onUpgrade(mDB: Database, vUpgDict: Record<number, SQLiteVersionUpgrade>, curVersion: number, targetVersion: number): Promise<number>;
static executeStatementsProcess(mDB: Database, statements: string[]): Promise<void>;
}

@@ -11,3 +11,3 @@ export * from '../dist/types/components';

}
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
export declare function applyPolyfills(): Promise<void>;

@@ -14,0 +14,0 @@

{
"name": "jeep-sqlite",
"version": "2.4.2",
"version": "2.5.0",
"description": "Browser SQLite Stencil Component",

@@ -25,3 +25,3 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@stencil/core": "^3.4.0",
"@stencil/core": "^4.0.5",
"browser-fs-access": "^0.33.0",

@@ -33,6 +33,7 @@ "jszip": "^3.10.1",

"devDependencies": {
"@types/jest": "^27.0.3",
"jest": "^27.0.3",
"jest-cli": "^27.4.5",
"puppeteer": "^19.7.2",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.11",
"jest": "^27.5.1",
"jest-cli": "^27.5.1",
"puppeteer": "^21.0.3",
"rollup-plugin-node-polyfills": "^0.2.1"

@@ -39,0 +40,0 @@ },

@@ -21,2 +21,8 @@ ![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)

- Release 2.5.0 ->>
- add methods to manage the transaction process flow :
`beginTransaction, commitTransaction, rollbackTransaction,
isActiveTransaction` see index_transaction.html
- upgrade to @stencil/core@4.0.5
- Release 2.3.8 ->>

@@ -23,0 +29,0 @@ - add support for RETURNING in sqlite statement

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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