axiodb 22.10.8 → 22.11.0

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.
Files changed (75) hide show
  1. package/lib/engine/cli/worker_process.d.ts +19 -0
  2. package/lib/engine/cli/worker_process.js +92 -0
  3. package/package.json +1 -1
  4. package/electron/electron-builder.json +0 -54
  5. package/electron/main/main.cts +0 -585
  6. package/electron/main/preload.cts +0 -51
  7. package/electron/package-lock.json +0 -8123
  8. package/electron/package.json +0 -56
  9. package/electron/public/AXioDB.png +0 -0
  10. package/electron/resources/after-install.sh +0 -45
  11. package/electron/resources/after-remove.sh +0 -29
  12. package/electron/resources/icon.png +0 -0
  13. package/electron/resources/icons/128x128.png +0 -0
  14. package/electron/resources/icons/16x16.png +0 -0
  15. package/electron/resources/icons/24x24.png +0 -0
  16. package/electron/resources/icons/256x256.png +0 -0
  17. package/electron/resources/icons/32x32.png +0 -0
  18. package/electron/resources/icons/48x48.png +0 -0
  19. package/electron/resources/icons/512x512.png +0 -0
  20. package/electron/resources/icons/64x64.png +0 -0
  21. package/electron/src/App.jsx +0 -128
  22. package/electron/src/api/authApi.js +0 -83
  23. package/electron/src/api/client.js +0 -102
  24. package/electron/src/assets/AXioDB.png +0 -0
  25. package/electron/src/components/auth/CreateRoleModal.jsx +0 -189
  26. package/electron/src/components/auth/CreateUserModal.jsx +0 -131
  27. package/electron/src/components/auth/ForcePasswordChangeModal.jsx +0 -132
  28. package/electron/src/components/auth/ProtectedRoute.jsx +0 -42
  29. package/electron/src/components/auth/ResetPasswordModal.jsx +0 -90
  30. package/electron/src/components/auth/UserAvatarMenu.jsx +0 -103
  31. package/electron/src/components/collection/CreateCollectionModal.jsx +0 -116
  32. package/electron/src/components/collection/DeleteCollectionModal.jsx +0 -85
  33. package/electron/src/components/collection/SchemaViewModal.jsx +0 -369
  34. package/electron/src/components/dashboard/CollectionsChart.jsx +0 -94
  35. package/electron/src/components/dashboard/DatabaseTreeView.jsx +0 -130
  36. package/electron/src/components/dashboard/InMemoryCacheCard.jsx +0 -60
  37. package/electron/src/components/dashboard/StorageDonut.jsx +0 -76
  38. package/electron/src/components/dashboard/StorageUsageCard.jsx +0 -59
  39. package/electron/src/components/dashboard/TotalCollectionsCard.jsx +0 -47
  40. package/electron/src/components/dashboard/TotalDatabasesCard.jsx +0 -43
  41. package/electron/src/components/dashboard/TotalDocumentsCard.jsx +0 -44
  42. package/electron/src/components/database/CreateDatabaseModal.jsx +0 -109
  43. package/electron/src/components/database/DeleteDatabaseModal.jsx +0 -97
  44. package/electron/src/components/query/CodeEditor.jsx +0 -343
  45. package/electron/src/components/query/ObjectEditor.jsx +0 -115
  46. package/electron/src/components/query/ObjectView.jsx +0 -44
  47. package/electron/src/components/query/QueryEditor.jsx +0 -32
  48. package/electron/src/components/query/queryLanguage.js +0 -755
  49. package/electron/src/components/ui/Button.jsx +0 -58
  50. package/electron/src/components/ui/Card.jsx +0 -29
  51. package/electron/src/components/ui/ErrorBoundary.jsx +0 -108
  52. package/electron/src/components/ui/Feedback.jsx +0 -66
  53. package/electron/src/components/ui/Field.jsx +0 -65
  54. package/electron/src/components/ui/MetricCard.jsx +0 -104
  55. package/electron/src/components/ui/Modal.jsx +0 -119
  56. package/electron/src/components/ui/Page.jsx +0 -40
  57. package/electron/src/config/key.js +0 -11
  58. package/electron/src/index.css +0 -181
  59. package/electron/src/index.html +0 -13
  60. package/electron/src/layout/Sidebar.jsx +0 -478
  61. package/electron/src/layout/StatusBar.jsx +0 -70
  62. package/electron/src/layout/Titlebar.jsx +0 -128
  63. package/electron/src/main.jsx +0 -42
  64. package/electron/src/pages/ConnectionHub.jsx +0 -464
  65. package/electron/src/pages/Dashboard.jsx +0 -128
  66. package/electron/src/pages/Documents.jsx +0 -823
  67. package/electron/src/pages/Import.jsx +0 -527
  68. package/electron/src/pages/UserManagement.jsx +0 -294
  69. package/electron/src/pages/Welcome.jsx +0 -157
  70. package/electron/src/store/authStore.js +0 -30
  71. package/electron/src/store/connectionStore.js +0 -103
  72. package/electron/src/store/dbStore.js +0 -165
  73. package/electron/src/store/store.js +0 -8
  74. package/electron/src/utils/format.js +0 -39
  75. package/electron/vite.config.js +0 -28
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axiodb",
3
- "version": "22.10.8",
3
+ "version": "22.11.0",
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
- }