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

verse.db

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verse.db - npm Package Compare versions

Comparing version 2.1.24 to 2.2.0

dist/adapters/cache.adapter.d.ts

5

CHANGELOG.md

@@ -13,3 +13,6 @@ # Verse.db [Beta]

- New branded SQL as JSON.
- Made new secure for data for sql files
- Made new secure for data for sql files.
- Added Session adapter.
- Added Cache Adapter.
- Added Search ability for container/collections.

@@ -16,0 +19,0 @@ ## Version v2.1

9

dist/adapters/export.d.ts

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

import { jsonAdapter } from "./json.adapter";
import { yamlAdapter } from "./yaml.adapter";
import { sqlAdapter } from "./sql.adapter";
export { jsonAdapter, yamlAdapter, sqlAdapter };
export { jsonAdapter } from "./json.adapter";
export { yamlAdapter } from "./yaml.adapter";
export { sqlAdapter } from "./sql.adapter";
export { sessionAdapter } from "./session.adapter";
export { CacheAdapter } from "./cache.adapter";
//# sourceMappingURL=export.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sqlAdapter = exports.yamlAdapter = exports.jsonAdapter = void 0;
const json_adapter_1 = require("./json.adapter");
exports.CacheAdapter = exports.sessionAdapter = exports.sqlAdapter = exports.yamlAdapter = exports.jsonAdapter = void 0;
var json_adapter_1 = require("./json.adapter");
Object.defineProperty(exports, "jsonAdapter", { enumerable: true, get: function () { return json_adapter_1.jsonAdapter; } });
const yaml_adapter_1 = require("./yaml.adapter");
var yaml_adapter_1 = require("./yaml.adapter");
Object.defineProperty(exports, "yamlAdapter", { enumerable: true, get: function () { return yaml_adapter_1.yamlAdapter; } });
const sql_adapter_1 = require("./sql.adapter");
var sql_adapter_1 = require("./sql.adapter");
Object.defineProperty(exports, "sqlAdapter", { enumerable: true, get: function () { return sql_adapter_1.sqlAdapter; } });
var session_adapter_1 = require("./session.adapter");
Object.defineProperty(exports, "sessionAdapter", { enumerable: true, get: function () { return session_adapter_1.sessionAdapter; } });
var cache_adapter_1 = require("./cache.adapter");
Object.defineProperty(exports, "CacheAdapter", { enumerable: true, get: function () { return cache_adapter_1.CacheAdapter; } });
//# sourceMappingURL=export.js.map
import { AdapterOptions, BackupOptions, SecureSystem, DevLogsOptions, CollectionFilter, operationKeys, QueryOptions, JoinSQL, StructureMethods, ModelMethods, ListCollectionOptions } from "../types/connect";
import { AdapterResults, MigrationPath, nearbyOptions, TableOptions } from "../types/adapter";
import Schema from "./functions/schema";
import { jsonAdapter, yamlAdapter, sqlAdapter } from "../adapters/export";
import { jsonAdapter, yamlAdapter, sqlAdapter, sessionAdapter, CacheAdapter } from "../adapters/export";
import EventEmitter from "events";

@@ -11,3 +11,3 @@ import { SQLSchema } from "./functions/SQL-Schemas";

export default class connect extends EventEmitter {
adapter: jsonAdapter | yamlAdapter | sqlAdapter | null;
adapter: jsonAdapter | yamlAdapter | sqlAdapter | sessionAdapter | CacheAdapter | null;
devLogs: DevLogsOptions;

@@ -20,2 +20,5 @@ SecureSystem: SecureSystem;

key: string;
maxSize: number;
ttl: number;
useMemory: boolean;
/**

@@ -38,3 +41,3 @@ * Sets up a database with one of the adapters

*/
load(dataname: string): Promise<AdapterResults | undefined>;
load(dataname: string): Promise<AdapterResults | null | undefined>;
/**

@@ -41,0 +44,0 @@ * Watch a data file for realtime database

@@ -11,2 +11,3 @@ import { encodeJSON, decodeJSON, encodeYAML, decodeYAML, encodeSQL, decodeSQL, neutralizer, genObjectId } from "./core/functions/secureData";

import { SQLTypes, SchemaDefinition } from "./types/sql-types";
import { sessionAdapter as session, CacheAdapter as cache } from "./adapters/export";
declare const logger: {

@@ -85,5 +86,9 @@ logError: typeof logError;

SQLTypes: typeof SQLTypes;
session: typeof session;
cache: typeof cache;
};
export { connect, randomID, randomUUID, logger, Schema, verseParser, SchemaTypes, colors, neutralizer, genObjectId, verseConnector, verseManagers, SQLSchema, SQLTypes, SchemaDefinition };
export { connect, randomID, randomUUID, logger, Schema, verseParser, SchemaTypes, colors, neutralizer, genObjectId, verseConnector, verseManagers, SQLSchema, SQLTypes, SchemaDefinition, session, cache, };
export * as AdapterTypes from './types/adapter';
export * as ConnectTypes from './types/connect';
export default versedb;
//# sourceMappingURL=index.d.ts.map

@@ -29,3 +29,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SQLTypes = exports.SQLSchema = exports.genObjectId = exports.neutralizer = exports.colors = exports.SchemaTypes = exports.verseParser = exports.Schema = exports.logger = exports.randomUUID = exports.randomID = exports.connect = void 0;
exports.ConnectTypes = exports.AdapterTypes = exports.cache = exports.session = exports.SQLTypes = exports.SQLSchema = exports.genObjectId = exports.neutralizer = exports.colors = exports.SchemaTypes = exports.verseParser = exports.Schema = exports.logger = exports.randomUUID = exports.randomID = exports.connect = void 0;
/**

@@ -56,2 +56,5 @@ * @params Copyright(c) 2023 marco5dev & jedi.tsx & kmoshax

Object.defineProperty(exports, "SQLTypes", { enumerable: true, get: function () { return sql_types_1.SQLTypes; } });
const export_1 = require("./adapters/export");
Object.defineProperty(exports, "session", { enumerable: true, get: function () { return export_1.sessionAdapter; } });
Object.defineProperty(exports, "cache", { enumerable: true, get: function () { return export_1.CacheAdapter; } });
const packageJsonPath = path.resolve(process.cwd(), "package.json");

@@ -119,4 +122,8 @@ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));

SQLTypes: sql_types_1.SQLTypes,
session: export_1.sessionAdapter,
cache: export_1.CacheAdapter,
};
exports.AdapterTypes = __importStar(require("./types/adapter"));
exports.ConnectTypes = __importStar(require("./types/connect"));
exports.default = versedb;
//# sourceMappingURL=index.js.map

@@ -21,3 +21,3 @@ "use strict";

gray: "\x1b[90m",
offWhite: "\x1b[37;2;28;28;28m"
offWhite: "\x1b[37;2;28;28;28m",
},

@@ -24,0 +24,0 @@ bg: {

@@ -38,2 +38,3 @@ import { FindQuery } from "./sql-types";

currentData?: any[];
session?: SessionData;
}

@@ -246,2 +247,27 @@ export interface MigrationParams {

}
export interface SessionData {
[key: string]: any;
}
export interface SessionAdapter {
load(sessionId: string): Promise<AdapterResults | null>;
add(sessionId: string, sessionData: SessionData): Promise<AdapterResults>;
drop(sessionId: string): Promise<AdapterResults>;
clear(): Promise<AdapterResults>;
stats(): Promise<AdapterResults>;
invalidate(predicate: (key: string, data: SessionData) => boolean): Promise<AdapterResults>;
regenerateSessionId(oldSessionId: string, newSessionId: string): Promise<AdapterResults>;
expressMiddleware(): Function;
nextMiddleware(): Function;
}
export interface CacheData {
[key: string]: any;
}
export interface CacheAdapter {
load(key: string): Promise<AdapterResults | null>;
add(key: string, data: CacheData): Promise<AdapterResults>;
drop(key: string): Promise<AdapterResults>;
stats(): Promise<AdapterResults>;
clear(): Promise<AdapterResults>;
invalidate(predicate: (key: string, data: CacheData) => boolean): Promise<AdapterResults>;
}
//# sourceMappingURL=adapter.d.ts.map
import { FindQuery } from "./sql-types";
import { SQLSchema } from "../core/functions/SQL-Schemas";
import { AdapterResults, MigrationPath, TableOptions } from "./adapter";
import { MigrationPath, SessionData, TableOptions, AdapterResults } from "./adapter";
import { jsonAdapter } from "../adapters/json.adapter";

@@ -99,2 +99,24 @@ import { yamlAdapter } from "../adapters/yaml.adapter";

}
export interface SESSIONAdapter {
load(sessionId: string): Promise<void>;
add(sessionId: string, sessionData: SessionData): Promise<void>;
drop(sessionId: string): Promise<void>;
clear(): Promise<void>;
stats(): Promise<void>;
invalidate(predicate: (key: string, data: SessionData) => boolean): Promise<void>;
regenerateSessionId(oldSessionId: string, newSessionId: string): Promise<void>;
expressMiddleware(): Function;
nextMiddleware(): Function;
}
export interface CacheData {
[key: string]: any;
}
export interface CACHEAdapter {
load(key: string): Promise<void>;
add(key: string, data: CacheData): Promise<void>;
drop(key: string): Promise<void>;
stats(): Promise<void>;
clear(): Promise<void>;
invalidate(predicate: (key: string, data: CacheData) => boolean): Promise<void>;
}
export interface db {

@@ -126,2 +148,5 @@ json: jsonAdapter;

backup?: BackupOptions;
maxSize?: number;
ttl?: number;
useMemory?: boolean;
}

@@ -351,2 +376,7 @@ export interface CollectionFilter {

}
export interface SessionMethods {
load(sessionId: string): Promise<any>;
add(sessionId: string, sessionData: SessionData): Promise<any>;
destroy(sessionId: string): Promise<any>;
}
//# sourceMappingURL=connect.d.ts.map
{
"name": "verse.db",
"version": "2.1.24",
"version": "2.2.0",
"description": "verse.db isn't just a database, it's your universal data bridge. Designed for unmatched flexibility, security, and performance, verse.db empowers you to manage your data with ease.",

@@ -5,0 +5,0 @@ "license": "MIT",

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 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