axiodb 22.10.8 → 22.13.1
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/README.md +2 -2
- package/lib/Services/Indexation.operation.js +0 -1
- package/lib/config/Keys/Keys.d.ts +0 -7
- package/lib/config/Keys/Keys.js +1 -9
- package/lib/engine/cli/worker_process.d.ts +19 -0
- package/lib/engine/cli/worker_process.js +92 -0
- package/lib/server/config/keys.d.ts +1 -1
- package/lib/server/config/keys.js +29 -1
- package/package.json +1 -1
- package/electron/electron-builder.json +0 -54
- package/electron/main/main.cts +0 -585
- package/electron/main/preload.cts +0 -51
- package/electron/package-lock.json +0 -8123
- package/electron/package.json +0 -56
- package/electron/public/AXioDB.png +0 -0
- package/electron/resources/after-install.sh +0 -45
- package/electron/resources/after-remove.sh +0 -29
- package/electron/resources/icon.png +0 -0
- package/electron/resources/icons/128x128.png +0 -0
- package/electron/resources/icons/16x16.png +0 -0
- package/electron/resources/icons/24x24.png +0 -0
- package/electron/resources/icons/256x256.png +0 -0
- package/electron/resources/icons/32x32.png +0 -0
- package/electron/resources/icons/48x48.png +0 -0
- package/electron/resources/icons/512x512.png +0 -0
- package/electron/resources/icons/64x64.png +0 -0
- package/electron/src/App.jsx +0 -128
- package/electron/src/api/authApi.js +0 -83
- package/electron/src/api/client.js +0 -102
- package/electron/src/assets/AXioDB.png +0 -0
- package/electron/src/components/auth/CreateRoleModal.jsx +0 -189
- package/electron/src/components/auth/CreateUserModal.jsx +0 -131
- package/electron/src/components/auth/ForcePasswordChangeModal.jsx +0 -132
- package/electron/src/components/auth/ProtectedRoute.jsx +0 -42
- package/electron/src/components/auth/ResetPasswordModal.jsx +0 -90
- package/electron/src/components/auth/UserAvatarMenu.jsx +0 -103
- package/electron/src/components/collection/CreateCollectionModal.jsx +0 -116
- package/electron/src/components/collection/DeleteCollectionModal.jsx +0 -85
- package/electron/src/components/collection/SchemaViewModal.jsx +0 -369
- package/electron/src/components/dashboard/CollectionsChart.jsx +0 -94
- package/electron/src/components/dashboard/DatabaseTreeView.jsx +0 -130
- package/electron/src/components/dashboard/InMemoryCacheCard.jsx +0 -60
- package/electron/src/components/dashboard/StorageDonut.jsx +0 -76
- package/electron/src/components/dashboard/StorageUsageCard.jsx +0 -59
- package/electron/src/components/dashboard/TotalCollectionsCard.jsx +0 -47
- package/electron/src/components/dashboard/TotalDatabasesCard.jsx +0 -43
- package/electron/src/components/dashboard/TotalDocumentsCard.jsx +0 -44
- package/electron/src/components/database/CreateDatabaseModal.jsx +0 -109
- package/electron/src/components/database/DeleteDatabaseModal.jsx +0 -97
- package/electron/src/components/query/CodeEditor.jsx +0 -343
- package/electron/src/components/query/ObjectEditor.jsx +0 -115
- package/electron/src/components/query/ObjectView.jsx +0 -44
- package/electron/src/components/query/QueryEditor.jsx +0 -32
- package/electron/src/components/query/queryLanguage.js +0 -755
- package/electron/src/components/ui/Button.jsx +0 -58
- package/electron/src/components/ui/Card.jsx +0 -29
- package/electron/src/components/ui/ErrorBoundary.jsx +0 -108
- package/electron/src/components/ui/Feedback.jsx +0 -66
- package/electron/src/components/ui/Field.jsx +0 -65
- package/electron/src/components/ui/MetricCard.jsx +0 -104
- package/electron/src/components/ui/Modal.jsx +0 -119
- package/electron/src/components/ui/Page.jsx +0 -40
- package/electron/src/config/key.js +0 -11
- package/electron/src/index.css +0 -181
- package/electron/src/index.html +0 -13
- package/electron/src/layout/Sidebar.jsx +0 -478
- package/electron/src/layout/StatusBar.jsx +0 -70
- package/electron/src/layout/Titlebar.jsx +0 -128
- package/electron/src/main.jsx +0 -42
- package/electron/src/pages/ConnectionHub.jsx +0 -464
- package/electron/src/pages/Dashboard.jsx +0 -128
- package/electron/src/pages/Documents.jsx +0 -823
- package/electron/src/pages/Import.jsx +0 -527
- package/electron/src/pages/UserManagement.jsx +0 -294
- package/electron/src/pages/Welcome.jsx +0 -157
- package/electron/src/store/authStore.js +0 -30
- package/electron/src/store/connectionStore.js +0 -103
- package/electron/src/store/dbStore.js +0 -165
- package/electron/src/store/store.js +0 -8
- package/electron/src/utils/format.js +0 -39
- package/electron/vite.config.js +0 -28
package/README.md
CHANGED
|
@@ -139,14 +139,14 @@ supported.
|
|
|
139
139
|
* **Zero native deps** — pure JS, no `node-gyp`, no `electron-rebuild`
|
|
140
140
|
* **MongoDB-style queries** — `{ age: { $gt: 25 } }`, 19 operators + `hint()` + `findByIds()`
|
|
141
141
|
* **ACID transactions** — `savepoint`/`rollbackTo`/`WAL`, crashes recover via `Transaction.recoverTransactions()`
|
|
142
|
-
* **Aggregation** —
|
|
142
|
+
* **Aggregation** — 19 stages, `$lookup` joins, `OperatorRegistry` custom ops
|
|
143
143
|
* **InMemoryCache + indexes** — per-instance cache, dual-write, auto `IndexCache`
|
|
144
144
|
* **Configurable cache** — `{ Cache, minTTL, maxTTL, cacheClearUp }` controls the per-instance InMemoryCache (default `5–15m` randomized TTL, `Cache: false` disables it) → [axiodb.in/api-reference](https://axiodb.in/api-reference)
|
|
145
145
|
* **Ports:** GUI `27018` · TCP `27019` `AxioDBCloud` · MCP `27020` Docker-only
|
|
146
146
|
|
|
147
147
|
> **Docs:** `axiodb.in` is the single source — this README is a quick start only.
|
|
148
148
|
|
|
149
|
-
* **AxioDBCloud (TCP)** — remote `AxioDBCloud` client,
|
|
149
|
+
* **AxioDBCloud (TCP)** — remote `AxioDBCloud` client, 30 commands, optional `TCPAuth` + `TLS` → [axiodb.in/cloud](https://axiodb.in/cloud)
|
|
150
150
|
* **CLI (Go)** — `axiodb document insert/query` `--hint` `find-by-ids` `transaction begin/commit` `user change-password` (HTTP `27018` for management, TCP `27019` for data) → [axiodb.in/cli](https://axiodb.in/cli)
|
|
151
151
|
* **Docker** — `theankansaha/axiodb` `AXIODB_GUI/TCP/MCP` `27018/27019/27020` → [axiodb.in/docker](https://axiodb.in/docker)
|
|
152
152
|
* **MCP Server** — 43 tools `axiodb_login` → `sessionId` + `withConfirmation` `Docker/mcp/tools/*.js` → [axiodb.in/mcp-server](https://axiodb.in/mcp-server)
|
|
@@ -20,7 +20,6 @@ const Keys_1 = require("../config/Keys/Keys");
|
|
|
20
20
|
const path_1 = __importDefault(require("path"));
|
|
21
21
|
const fs_1 = __importDefault(require("fs"));
|
|
22
22
|
const database_operation_1 = __importDefault(require("./Database/database.operation"));
|
|
23
|
-
// import startWebServer from "../server/Fastify";
|
|
24
23
|
// Helper Classes
|
|
25
24
|
const Converter_helper_1 = __importDefault(require("../Helper/Converter.helper"));
|
|
26
25
|
const Console_helper_1 = __importDefault(require("../Helper/Console.helper"));
|
|
@@ -9,10 +9,3 @@ export declare const General: {
|
|
|
9
9
|
WAL_File_EXT: string;
|
|
10
10
|
DocumentId_Length: number;
|
|
11
11
|
};
|
|
12
|
-
export declare enum WebServer {
|
|
13
|
-
StaticServerPORT = 2025,
|
|
14
|
-
ApiServerPORT = 2026,
|
|
15
|
-
TCPServerPORT = 2027,
|
|
16
|
-
WebSocketServerPORT = 2028,
|
|
17
|
-
GraphQLServerPORT = 2029
|
|
18
|
-
}
|
package/lib/config/Keys/Keys.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.General = void 0;
|
|
4
4
|
exports.General = {
|
|
5
5
|
DBMS_Name: "AxioDB",
|
|
6
6
|
DBMS_GUI_Enable: false,
|
|
@@ -12,11 +12,3 @@ exports.General = {
|
|
|
12
12
|
WAL_File_EXT: ".wal.jsonl",
|
|
13
13
|
DocumentId_Length: 30, // Length of auto-generated alphanumeric document IDs
|
|
14
14
|
};
|
|
15
|
-
var WebServer;
|
|
16
|
-
(function (WebServer) {
|
|
17
|
-
WebServer[WebServer["StaticServerPORT"] = 2025] = "StaticServerPORT";
|
|
18
|
-
WebServer[WebServer["ApiServerPORT"] = 2026] = "ApiServerPORT";
|
|
19
|
-
WebServer[WebServer["TCPServerPORT"] = 2027] = "TCPServerPORT";
|
|
20
|
-
WebServer[WebServer["WebSocketServerPORT"] = 2028] = "WebSocketServerPORT";
|
|
21
|
-
WebServer[WebServer["GraphQLServerPORT"] = 2029] = "GraphQLServerPORT";
|
|
22
|
-
})(WebServer || (exports.WebServer = WebServer = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default class WorkerProcess {
|
|
2
|
+
/**
|
|
3
|
+
* Executes a binary with explicit arguments without a shell, capturing stdout.
|
|
4
|
+
*
|
|
5
|
+
* No shell string is ever constructed, so filenames or paths containing shell
|
|
6
|
+
* metacharacters cannot inject extra commands. Always prefer this over building
|
|
7
|
+
* a shell command when arguments derive from user-controlled paths.
|
|
8
|
+
*
|
|
9
|
+
* @param command - The executable to run (e.g. "du", "wc", "powershell").
|
|
10
|
+
* @param args - Arguments passed verbatim; no quoting or interpolation is applied.
|
|
11
|
+
* @returns The command's captured stdout.
|
|
12
|
+
* @example
|
|
13
|
+
* const size = await worker.execCommandSafely("wc", ["-c", "--", targetPath]);
|
|
14
|
+
*/
|
|
15
|
+
execCommandSafely(command: string, args?: string[]): Promise<string>;
|
|
16
|
+
/** Inherits stdio; rejects if the process exits with a non-zero code. */
|
|
17
|
+
spawnCommand(command: string, args?: string[]): Promise<void>;
|
|
18
|
+
static getOS(): string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const child_process_1 = require("child_process");
|
|
13
|
+
class WorkerProcess {
|
|
14
|
+
/**
|
|
15
|
+
* Executes a binary with explicit arguments without a shell, capturing stdout.
|
|
16
|
+
*
|
|
17
|
+
* No shell string is ever constructed, so filenames or paths containing shell
|
|
18
|
+
* metacharacters cannot inject extra commands. Always prefer this over building
|
|
19
|
+
* a shell command when arguments derive from user-controlled paths.
|
|
20
|
+
*
|
|
21
|
+
* @param command - The executable to run (e.g. "du", "wc", "powershell").
|
|
22
|
+
* @param args - Arguments passed verbatim; no quoting or interpolation is applied.
|
|
23
|
+
* @returns The command's captured stdout.
|
|
24
|
+
* @example
|
|
25
|
+
* const size = await worker.execCommandSafely("wc", ["-c", "--", targetPath]);
|
|
26
|
+
*/
|
|
27
|
+
execCommandSafely(command_1) {
|
|
28
|
+
return __awaiter(this, arguments, void 0, function* (command, args = []) {
|
|
29
|
+
try {
|
|
30
|
+
const stdout = yield new Promise((resolve, reject) => {
|
|
31
|
+
const child = (0, child_process_1.spawn)(command, args, { shell: false });
|
|
32
|
+
let out = "";
|
|
33
|
+
let err = "";
|
|
34
|
+
child.stdout.on("data", (chunk) => {
|
|
35
|
+
out += chunk.toString();
|
|
36
|
+
});
|
|
37
|
+
child.stderr.on("data", (chunk) => {
|
|
38
|
+
err += chunk.toString();
|
|
39
|
+
});
|
|
40
|
+
child.on("error", reject);
|
|
41
|
+
child.on("close", (code) => {
|
|
42
|
+
if (code === 0) {
|
|
43
|
+
resolve(out);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
reject(new Error(`Command failed with exit code ${code}${err ? `: ${err.trim()}` : ""}`));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
return stdout;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
throw new Error(`Failed to execute command: ${error}`);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** Inherits stdio; rejects if the process exits with a non-zero code. */
|
|
58
|
+
spawnCommand(command_1) {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* (command, args = []) {
|
|
60
|
+
try {
|
|
61
|
+
const child = (0, child_process_1.spawn)(command, args, { stdio: "inherit" });
|
|
62
|
+
return new Promise((resolve, reject) => {
|
|
63
|
+
child.on("close", (code) => {
|
|
64
|
+
if (code !== 0) {
|
|
65
|
+
reject(new Error(`Command failed with exit code ${code}`));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
resolve();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
throw new Error(`Failed to spawn command: ${error}`);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
static getOS() {
|
|
79
|
+
const platform = process.platform;
|
|
80
|
+
if (platform === "win32") {
|
|
81
|
+
return "windows";
|
|
82
|
+
}
|
|
83
|
+
if (platform === "darwin") {
|
|
84
|
+
return "macos";
|
|
85
|
+
}
|
|
86
|
+
if (platform === "linux") {
|
|
87
|
+
return "linux";
|
|
88
|
+
}
|
|
89
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.default = WorkerProcess;
|
|
@@ -8,7 +8,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
8
8
|
var ServerKeys;
|
|
9
9
|
(function (ServerKeys) {
|
|
10
10
|
ServerKeys[ServerKeys["PORT"] = 27018] = "PORT";
|
|
11
|
-
ServerKeys["LOCALHOST"] = "127.0.1";
|
|
11
|
+
ServerKeys["LOCALHOST"] = "127.0.0.1";
|
|
12
12
|
ServerKeys["DEFAULT_KEY_EXPIRE"] = "24h";
|
|
13
13
|
ServerKeys["DEFAULT_KEY_ISSUER"] = "AxioDB Server";
|
|
14
14
|
ServerKeys["DEFAULT_KEY_AUDIENCE"] = "AxioDB Client";
|
|
@@ -62,6 +62,16 @@ exports.AvailableRoutes = [
|
|
|
62
62
|
path: "/api/routes",
|
|
63
63
|
description: "List all available API routes",
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
method: "GET",
|
|
67
|
+
path: "/api/system",
|
|
68
|
+
description: "Server runtime details: version, platform, CPU, memory, cache, and running services with their ports",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
method: "GET",
|
|
72
|
+
path: "/api/dashboard-stats",
|
|
73
|
+
description: "Aggregated dashboard statistics for the GUI overview page",
|
|
74
|
+
},
|
|
65
75
|
],
|
|
66
76
|
},
|
|
67
77
|
{
|
|
@@ -179,6 +189,19 @@ exports.AvailableRoutes = [
|
|
|
179
189
|
description: "Get specific documents from a collection by ID",
|
|
180
190
|
path: "/api/operation/all/by-id/?dbName&collectionName&documentId",
|
|
181
191
|
},
|
|
192
|
+
{
|
|
193
|
+
method: "GET",
|
|
194
|
+
description: "Get the total document count of a collection",
|
|
195
|
+
path: "/api/operation/total/?dbName&collectionName",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
method: "POST",
|
|
199
|
+
description: "Get specific documents from a collection by a list of IDs",
|
|
200
|
+
path: "/api/operation/all/by-ids/?dbName&collectionName",
|
|
201
|
+
payload: {
|
|
202
|
+
documentIds: "array",
|
|
203
|
+
},
|
|
204
|
+
},
|
|
182
205
|
{
|
|
183
206
|
method: "POST",
|
|
184
207
|
description: "Create a new document in a collection",
|
|
@@ -311,6 +334,11 @@ exports.AvailableRoutes = [
|
|
|
311
334
|
path: "/api/auth/roles/permissions",
|
|
312
335
|
description: "List the full predefined permission catalogue",
|
|
313
336
|
},
|
|
337
|
+
{
|
|
338
|
+
method: "DELETE",
|
|
339
|
+
path: "/api/auth/roles/:roleName",
|
|
340
|
+
description: "Delete a custom role",
|
|
341
|
+
},
|
|
314
342
|
],
|
|
315
343
|
},
|
|
316
344
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axiodb",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.13.1",
|
|
4
4
|
"description": "The embedded database for Node.js. Replaces SQLite, LowDB, NeDB & raw JSON files with MongoDB-style queries, ACID transactions, zero native dependencies, and built-in InMemoryCache. No compilation, no platform issues. Perfect for desktop apps, CLI tools, and embedded systems.",
|
|
5
5
|
"main": "./lib/config/DB.js",
|
|
6
6
|
"types": "./lib/config/DB.d.ts",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"appId": "com.axiodb.control",
|
|
3
|
-
"productName": "AxioDB Control",
|
|
4
|
-
"copyright": "Copyright © 2026 Ankan Saha",
|
|
5
|
-
"directories": {
|
|
6
|
-
"output": "release",
|
|
7
|
-
"buildResources": "resources"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/**/*",
|
|
11
|
-
"dist-electron/**/*",
|
|
12
|
-
"resources/**/*",
|
|
13
|
-
"package.json"
|
|
14
|
-
],
|
|
15
|
-
"extraResources": [
|
|
16
|
-
{
|
|
17
|
-
"from": "resources/icon.png",
|
|
18
|
-
"to": "icon.png"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"linux": {
|
|
22
|
-
"target": [
|
|
23
|
-
{ "target": "deb", "arch": ["x64", "arm64"] },
|
|
24
|
-
{ "target": "AppImage", "arch": ["x64", "arm64"] }
|
|
25
|
-
],
|
|
26
|
-
"maintainer": "Ankan Saha <dev@axiodb.in>",
|
|
27
|
-
"category": "Development",
|
|
28
|
-
"icon": "resources/icons",
|
|
29
|
-
"synopsis": "Desktop GUI management client for AxioDB",
|
|
30
|
-
"description": "Next-generation desktop interface for managing AxioDB databases, collections, documents, queries, and monitoring.",
|
|
31
|
-
"desktop": {
|
|
32
|
-
"StartupWMClass": "AxioDB Control"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"win": {
|
|
36
|
-
"target": [
|
|
37
|
-
{ "target": "nsis", "arch": ["x64"] }
|
|
38
|
-
],
|
|
39
|
-
"icon": "resources/icon.png"
|
|
40
|
-
},
|
|
41
|
-
"mac": {
|
|
42
|
-
"target": [
|
|
43
|
-
{ "target": "zip", "arch": ["x64", "arm64"] }
|
|
44
|
-
],
|
|
45
|
-
"category": "public.app-category.developer-tools",
|
|
46
|
-
"icon": "resources/icon.png"
|
|
47
|
-
},
|
|
48
|
-
"nsis": {
|
|
49
|
-
"oneClick": false,
|
|
50
|
-
"allowToChangeInstallationDirectory": true,
|
|
51
|
-
"createDesktopShortcut": true,
|
|
52
|
-
"createStartMenuShortcut": true
|
|
53
|
-
}
|
|
54
|
-
}
|