From a614a03250382f37ec41803138db1e11bf0ff6c1 Mon Sep 17 00:00:00 2001 From: onrirr Date: Mon, 9 Oct 2023 21:10:03 +0300 Subject: [PATCH] hmmm --- .vscode/settings.json | 28 ++++++++++++++++++++++++++-- index.ts | 3 ++- nodemon.json | 2 +- package-lock.json | 4 ++-- package.json | 10 ---------- src/Collection.ts | 1 - src/Database.ts | 4 +--- src/Mithril.ts | 5 +++++ src/Toml.ts | 3 +-- tests/tests.test.ts | 2 ++ tests/tests.ts | 2 -- 11 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 src/Mithril.ts create mode 100644 tests/tests.test.ts delete mode 100644 tests/tests.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index be147d9..b1fce0d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,12 +9,36 @@ ".vscode": true, ".github": true, "static": true, - "node_modules": true + "node_modules": true, + "tsconfig.esm.json": true, + "tsconfig.json": true, + "tsconfig.cjs.json": true, + "tsconfig.types.json": true, + "package-lock.json": true, + "CNAME": true, + "CHANGELOG.md": true, + ".npmignore": true, + ".gitignore": true, + "docs": true, + "dist": true, + "nodemon.json": true }, "hide-files.files": [ ".vscode", ".github", "static", - "node_modules" + "node_modules", + "tsconfig.esm.json", + "tsconfig.json", + "tsconfig.cjs.json", + "tsconfig.types.json", + "package-lock.json", + "CNAME", + "CHANGELOG.md", + ".npmignore", + ".gitignore", + "docs", + "dist", + "nodemon.json" ] } \ No newline at end of file diff --git a/index.ts b/index.ts index 6c4285c..d8f96eb 100644 --- a/index.ts +++ b/index.ts @@ -4,5 +4,6 @@ import { Action } from "./src/Action" import { Table } from "./src/Table" import { Database } from "./src/Database" import { Toml } from "./src/Toml" +import { Mithril } from "./src/Mithril" -export { Collection, Database, ElementInData, Action, Table, Toml } \ No newline at end of file +export { Collection, Database, ElementInData, Action, Table, Toml, Mithril } \ No newline at end of file diff --git a/nodemon.json b/nodemon.json index 479a238..1195df1 100644 --- a/nodemon.json +++ b/nodemon.json @@ -2,5 +2,5 @@ "watch": ["./"], "ext": ".ts,.js", "ignore": [], - "exec": "npx ts-node ./tests/tests.ts" + "exec": "npx ts-node ./tests/tests.test.ts" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8452e89..ff8fc30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ydb", - "version": "1.3.4", + "version": "1.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ydb", - "version": "1.3.4", + "version": "1.4.1", "license": "MIT", "dependencies": { "string-crypto": "^2.0.2", diff --git a/package.json b/package.json index 20eb900..563e651 100644 --- a/package.json +++ b/package.json @@ -5,16 +5,6 @@ "url": "https://onrirr.github.io/yDB/#/", "repository": "github:onrirr/ydb", "main": "./dist/esm/index.js", - "categories": [ - "database", - "yaml", - "yml", - "json", - "quick.db", - "quickdb", - "ydb.js", - "ydb" - ], "scripts": { "compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json", "start": "npx nodemon" diff --git a/src/Collection.ts b/src/Collection.ts index 0ab656f..6de4cb5 100644 --- a/src/Collection.ts +++ b/src/Collection.ts @@ -1,6 +1,5 @@ import { formatErrorMessage } from "./util"; export class Collection { - map: Map; constructor(values?: IterableIterator) { this.map = new Map(values ? values : []); diff --git a/src/Database.ts b/src/Database.ts index 959681b..682042d 100644 --- a/src/Database.ts +++ b/src/Database.ts @@ -214,9 +214,7 @@ class Database extends EventEmitter { "debug", `[${new Date().toISOString().substring(11, 19)}][ydb][File ${ this.path - }] An item has been deleted with name ${JSON.stringify( - key - )}` + }] An item has been deleted with name ${JSON.stringify(key)}` ); return true; } diff --git a/src/Mithril.ts b/src/Mithril.ts new file mode 100644 index 0000000..970f83f --- /dev/null +++ b/src/Mithril.ts @@ -0,0 +1,5 @@ +export class Mithril { + constructor() { + console.log("Welcome to Mithril.") + } +} \ No newline at end of file diff --git a/src/Toml.ts b/src/Toml.ts index 64fb93c..15edcea 100644 --- a/src/Toml.ts +++ b/src/Toml.ts @@ -1,13 +1,12 @@ //@ts-nocheck -import { readFileSync } from "fs" +import { readFileSync } from "fs"; export class Toml { static parse = parse; static read = read; } - const indexOf = [].indexOf || function (item: an4y) { diff --git a/tests/tests.test.ts b/tests/tests.test.ts new file mode 100644 index 0000000..b310ba4 --- /dev/null +++ b/tests/tests.test.ts @@ -0,0 +1,2 @@ +import { Mithril } from "../index"; +const a = new Mithril(); \ No newline at end of file diff --git a/tests/tests.ts b/tests/tests.ts deleted file mode 100644 index 43c3e97..0000000 --- a/tests/tests.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Toml } from "../index"; -console.log(Toml.read("tests/test.toml")); \ No newline at end of file