@wxn0brp/db 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/autoCreate.d.ts +4 -0
- package/dist/autoCreate.js +9 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import DataBaseRemote from "./client/database.js";
|
|
2
|
+
import DataBase from "./database.js";
|
|
3
|
+
export function autoCreate(cfg) {
|
|
4
|
+
if (typeof cfg === "object")
|
|
5
|
+
return new DataBaseRemote(cfg);
|
|
6
|
+
if (cfg.startsWith("http"))
|
|
7
|
+
return new DataBaseRemote(cfg);
|
|
8
|
+
return new DataBase(cfg);
|
|
9
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import genId from "./gen.js";
|
|
|
6
6
|
import Relation from "./relation.js";
|
|
7
7
|
import CustomFileCpu from "./file/customFileCpu.js";
|
|
8
8
|
import ValtheraMemory, { createMemoryValthera } from "./memory.js";
|
|
9
|
-
|
|
9
|
+
import { autoCreate } from "./autoCreate.js";
|
|
10
|
+
export { DataBase as Valthera, Graph, DataBaseRemote as ValtheraRemote, GraphRemote, Relation, genId, CustomFileCpu, ValtheraMemory, createMemoryValthera, autoCreate, };
|
|
10
11
|
export type Id = import("./types/Id.js").Id;
|
|
11
12
|
export declare namespace ValtheraTypes {
|
|
12
13
|
type Arg = import("./types/arg.js").Arg;
|
package/dist/index.js
CHANGED
|
@@ -6,4 +6,5 @@ import genId from "./gen.js";
|
|
|
6
6
|
import Relation from "./relation.js";
|
|
7
7
|
import CustomFileCpu from "./file/customFileCpu.js";
|
|
8
8
|
import ValtheraMemory, { createMemoryValthera } from "./memory.js";
|
|
9
|
-
|
|
9
|
+
import { autoCreate } from "./autoCreate.js";
|
|
10
|
+
export { DataBase as Valthera, Graph, DataBaseRemote as ValtheraRemote, GraphRemote, Relation, genId, CustomFileCpu, ValtheraMemory, createMemoryValthera, autoCreate, };
|
package/package.json
CHANGED