axiodb 22.11.0 → 22.14.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 CHANGED
@@ -93,15 +93,39 @@ Set `CHOICE` before piping to select without the menu:
93
93
  curl -fsSL https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.sh | CHOICE=2 bash
94
94
 
95
95
  # GUI (Desktop app) — Windows
96
- irm https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.ps1 | CHOICE=2 iex
96
+ $env:CHOICE=2; irm https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.ps1 | iex
97
97
 
98
- # Both CLI + GUI
98
+ # Both CLI + GUI — Linux
99
99
  curl -fsSL https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.sh | CHOICE=3 bash
100
+
101
+ # Both CLI + GUI — Windows
102
+ $env:CHOICE=3; irm https://raw.githubusercontent.com/nexoral/AxioDB/main/cli/Scripts/install.ps1 | iex
100
103
  ```
101
104
 
102
105
  You can also download installers directly from
103
106
  [GitHub Releases](https://github.com/nexoral/AxioDB/releases).
104
107
 
108
+ #### Start a temporary local server
109
+
110
+ The CLI can start a disposable local AxioDB server for development. It installs
111
+ the published `axiodb` npm package into a temporary directory, keeps the server
112
+ attached to the terminal, and deletes its data when you press `Ctrl+C`.
113
+ Node.js ≥20 and npm are required; the command offers platform-specific
114
+ installation help when they are missing.
115
+
116
+ ```bash
117
+ axiodb serve http # HTTP API only: http://localhost:27018/api
118
+ axiodb serve tcp # TCP without authentication: axiodb://localhost:27019
119
+ axiodb serve tcp-auth # TCP authentication only
120
+ axiodb serve full # HTTP + authenticated TCP, GUI disabled
121
+ ```
122
+
123
+ The HTTP and TCP ports are fixed at `27018` and `27019`. The `tcp-auth` preset
124
+ seeds `admin/admin`, but the server requires the first password change through
125
+ HTTP/GUI and TCP currently has no password-change command, so this preset is
126
+ intended for inspecting the authentication server setup rather than immediate
127
+ authenticated client access.
128
+
105
129
 
106
130
  ## Basic CRUD
107
131
 
@@ -139,14 +163,14 @@ supported.
139
163
  * **Zero native deps** — pure JS, no `node-gyp`, no `electron-rebuild`
140
164
  * **MongoDB-style queries** — `{ age: { $gt: 25 } }`, 19 operators + `hint()` + `findByIds()`
141
165
  * **ACID transactions** — `savepoint`/`rollbackTo`/`WAL`, crashes recover via `Transaction.recoverTransactions()`
142
- * **Aggregation** — 60+ stages, `$lookup` joins, `OperatorRegistry` custom ops
166
+ * **Aggregation** — 19 stages, `$lookup` joins, `OperatorRegistry` custom ops
143
167
  * **InMemoryCache + indexes** — per-instance cache, dual-write, auto `IndexCache`
144
168
  * **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
169
  * **Ports:** GUI `27018` · TCP `27019` `AxioDBCloud` · MCP `27020` Docker-only
146
170
 
147
171
  > **Docs:** `axiodb.in` is the single source — this README is a quick start only.
148
172
 
149
- * **AxioDBCloud (TCP)** — remote `AxioDBCloud` client, 32 commands, optional `TCPAuth` + `TLS` → [axiodb.in/cloud](https://axiodb.in/cloud)
173
+ * **AxioDBCloud (TCP)** — remote `AxioDBCloud` client, 30 commands, optional `TCPAuth` + `TLS` → [axiodb.in/cloud](https://axiodb.in/cloud)
150
174
  * **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
175
  * **Docker** — `theankansaha/axiodb` `AXIODB_GUI/TCP/MCP` `27018/27019/27020` → [axiodb.in/docker](https://axiodb.in/docker)
152
176
  * **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
- }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebServer = exports.General = void 0;
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 = {}));
@@ -1,6 +1,6 @@
1
1
  export declare enum ServerKeys {
2
2
  PORT = 27018,
3
- LOCALHOST = "127.0.1",
3
+ LOCALHOST = "127.0.0.1",
4
4
  DEFAULT_KEY_EXPIRE = "24h",
5
5
  DEFAULT_KEY_ISSUER = "AxioDB Server",
6
6
  DEFAULT_KEY_AUDIENCE = "AxioDB Client",
@@ -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.11.0",
3
+ "version": "22.14.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",