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 1.0.0 to 1.1.0

dist/jeep-sqlite/app-globals-0f993ce5.js

126

dist/jeep-sqlite/jeep-sqlite.esm.js

@@ -1,1 +0,125 @@

import{p as e,b as t}from"./p-6f7210ce.js";(()=>{const t=import.meta.url,s={};return""!==t&&(s.resourcesUrl=new URL(".",t).href),e(s)})().then((e=>t([["p-ee4adaa1",[[1,"jeep-sqlite",{echo:[64],createConnection:[64],closeConnection:[64],open:[64],close:[64],getVersion:[64],execute:[64],executeSet:[64],run:[64],query:[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],addUpgradeStatement:[64],isDatabase:[64],getDatabaseList:[64],checkConnectionsConsistency:[64]}]]]],e)));
import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-bdd5551f.js';
import { g as globalScripts } from './app-globals-0f993ce5.js';
/*
Stencil Client Patch Browser v2.7.0 | MIT Licensed | https://stenciljs.com
*/
const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
const patchBrowser = () => {
// NOTE!! This fn cannot use async/await!
if (BUILD.isDev && !BUILD.isTesting) {
consoleDevInfo('Running in development mode.');
}
if (BUILD.cssVarShim) {
// shim css vars
plt.$cssShim$ = win.__cssshim;
}
if (BUILD.cloneNodeFix) {
// opted-in to polyfill cloneNode() for slot polyfilled components
patchCloneNodeFix(H.prototype);
}
if (BUILD.profile && !performance.mark) {
// not all browsers support performance.mark/measure (Safari 10)
performance.mark = performance.measure = () => {
/*noop*/
};
performance.getEntriesByName = () => [];
}
// @ts-ignore
const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
s.getAttribute('data-stencil-namespace') === NAMESPACE)
: null;
const importMeta = import.meta.url;
const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
// Safari < v11 support: This IF is true if it's Safari below v11.
// This fn cannot use async/await since Safari didn't support it until v11,
// however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
// so both the ESM file and nomodule file would get downloaded. Only Safari
// has 'onbeforeload' in the script, and "history.scrollRestoration" was added
// to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
// IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
return {
then() {
/* promise noop */
},
};
}
if (!BUILD.safari10 && importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
}
else if (BUILD.dynamicImportShim || BUILD.safari10) {
opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
if (BUILD.dynamicImportShim) {
patchDynamicImport(opts.resourcesUrl, scriptElm);
}
if (BUILD.dynamicImportShim && !win.customElements) {
// module support, but no custom elements support (Old Edge)
// @ts-ignore
return import(/* webpackChunkName: "polyfills-dom" */ './dom-3fba5032.js').then(() => opts);
}
}
return promiseResolve(opts);
};
const patchDynamicImport = (base, orgScriptElm) => {
const importFunctionName = getDynamicImportFunction(NAMESPACE);
try {
// test if this browser supports dynamic imports
// There is a caching issue in V8, that breaks using import() in Function
// By generating a random string, we can workaround it
// Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
}
catch (e) {
// this shim is specifically for browsers that do support "esm" imports
// however, they do NOT support "dynamic" imports
// basically this code is for old Edge, v18 and below
const moduleMap = new Map();
win[importFunctionName] = (src) => {
const url = new URL(src, base).href;
let mod = moduleMap.get(url);
if (!mod) {
const script = doc.createElement('script');
script.type = 'module';
script.crossOrigin = orgScriptElm.crossOrigin;
script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
type: 'application/javascript',
}));
mod = new Promise((resolve) => {
script.onload = () => {
resolve(win[importFunctionName].m);
script.remove();
};
});
moduleMap.set(url, mod);
doc.head.appendChild(script);
}
return mod;
};
}
};
const patchCloneNodeFix = (HTMLElementPrototype) => {
const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
HTMLElementPrototype.cloneNode = function (deep) {
if (this.nodeName === 'TEMPLATE') {
return nativeCloneNodeFn.call(this, deep);
}
const clonedNode = nativeCloneNodeFn.call(this, false);
const srcChildNodes = this.childNodes;
if (deep) {
for (let i = 0; i < srcChildNodes.length; i++) {
// Node.ATTRIBUTE_NODE === 2, and checking because IE11
if (srcChildNodes[i].nodeType !== 2) {
clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
}
}
}
return clonedNode;
};
};
patchBrowser().then(options => {
globalScripts();
return bootstrapLazy([["jeep-sqlite",[[1,"jeep-sqlite",{"echo":[64],"createConnection":[64],"closeConnection":[64],"open":[64],"close":[64],"getVersion":[64],"execute":[64],"executeSet":[64],"run":[64],"query":[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],"addUpgradeStatement":[64],"isDatabase":[64],"getDatabaseList":[64],"checkConnectionsConsistency":[64]}]]]], options);
});

@@ -253,2 +253,6 @@ export interface EchoOptions {

tables: JsonTable[];
/***
* Array of View (JsonView)
*/
views?: JsonView[];
}

@@ -338,1 +342,11 @@ export interface JsonTable {

}
export interface JsonView {
/**
* The view name
*/
name: string;
/**
* The view statement
*/
value: string;
}
export declare const getTablesNames: (db: any) => Promise<string[]>;
export declare const getViewsNames: (mDb: any) => Promise<string[]>;
export declare const dropElements: (db: any, type: string) => Promise<void>;
export declare const dropAll: (db: any) => Promise<void>;
export declare const dropTempTables: (db: any, alterTables: Record<string, string[]>) => Promise<void>;

3

dist/types/utils/utils-exportJson.d.ts
import { EventEmitter } from '../stencil-public-runtime';
import { JsonSQLite, JsonTable, JsonColumn, JsonIndex, JsonTrigger, JsonProgressListener } from '../interfaces/interfaces';
import { JsonSQLite, JsonTable, JsonColumn, JsonIndex, JsonTrigger, JsonView, JsonProgressListener } from '../interfaces/interfaces';
export declare const createExportObject: (db: any, sqlObj: JsonSQLite, exportProgress: EventEmitter<JsonProgressListener>) => Promise<JsonSQLite>;
export declare const getTablesNameSQL: (db: any) => Promise<any[]>;
export declare const getViewsName: (mDb: any) => Promise<JsonView[]>;
export declare const getTablesFull: (db: any, resTables: any[], exportProgress: EventEmitter<JsonProgressListener>) => Promise<JsonTable[]>;

@@ -6,0 +7,0 @@ export declare const getSchema: (sqlStmt: string) => Promise<JsonColumn[]>;

import { EventEmitter } from '../stencil-public-runtime';
import { JsonSQLite, JsonProgressListener } from '../interfaces/interfaces';
import { JsonSQLite, JsonProgressListener, JsonView } from '../interfaces/interfaces';
export declare const createDatabaseSchema: (db: any, jsonData: JsonSQLite) => Promise<number>;

@@ -13,1 +13,3 @@ export declare const createSchema: (db: any, jsonData: any) => Promise<number>;

export declare const setNameForUpdate: (names: string[]) => Promise<string>;
export declare const createView: (mDB: any, view: JsonView) => Promise<void>;
export declare const createViews: (mDB: any, jsonData: JsonSQLite) => Promise<number>;

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

import { JsonColumn, JsonIndex, JsonTrigger } from '../interfaces/interfaces';
import { JsonColumn, JsonIndex, JsonTrigger, JsonView } from '../interfaces/interfaces';
export declare const isJsonSQLite: (obj: any) => Promise<boolean>;

@@ -7,5 +7,7 @@ export declare const isTable: (obj: any) => Promise<boolean>;

export declare const isTriggers: (obj: any) => Promise<boolean>;
export declare const isView: (obj: any) => Promise<boolean>;
export declare const checkSchemaValidity: (schema: JsonColumn[]) => Promise<void>;
export declare const checkIndexesValidity: (indexes: JsonIndex[]) => Promise<void>;
export declare const checkTriggersValidity: (triggers: JsonTrigger[]) => Promise<void>;
export declare const checkViewsValidity: (views: JsonView[]) => Promise<void>;
export declare const getTableColumnNamesTypes: (db: any, tableName: string) => Promise<any>;
{
"name": "jeep-sqlite",
"version": "1.0.0",
"version": "1.1.0",
"description": "Browser SQLite Stencil Component",

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

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