@necrolab/dashboard 0.4.38 → 0.4.40
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/.claude/settings.local.json +7 -1
- package/.prettierrc +14 -1
- package/backend/api.js +25 -16
- package/backend/auth.js +2 -2
- package/backend/batching.js +1 -1
- package/backend/endpoints.js +5 -5
- package/backend/index.js +2 -2
- package/backend/mock-data.js +27 -28
- package/backend/mock-src/classes/logger.js +5 -7
- package/backend/mock-src/classes/utils.js +3 -2
- package/backend/mock-src/ticketmaster.js +2 -2
- package/backend/validator.js +2 -2
- package/dev-server.js +136 -0
- package/index.html +1 -1
- package/index.js +1 -1
- package/package.json +8 -6
- package/postcss.config.js +1 -1
- package/postinstall.js +30 -16
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/manifest.json +4 -4
- package/src/App.vue +471 -49
- package/src/assets/css/_input.scss +37 -37
- package/src/assets/css/main.scss +177 -30
- package/src/assets/img/logo_icon-old.png +0 -0
- package/src/assets/img/logo_icon.png +0 -0
- package/src/components/Auth/LoginForm.vue +12 -5
- package/src/components/Editors/Account/Account.vue +19 -19
- package/src/components/Editors/Account/AccountCreator.vue +53 -24
- package/src/components/Editors/Account/AccountView.vue +79 -17
- package/src/components/Editors/Account/CreateAccount.vue +47 -28
- package/src/components/Editors/Profile/Profile.vue +24 -24
- package/src/components/Editors/Profile/ProfileView.vue +67 -16
- package/src/components/Editors/TagLabel.vue +6 -7
- package/src/components/Filter/FilterPreview.vue +0 -4
- package/src/components/Table/Table.vue +15 -0
- package/src/components/Tasks/Controls/DesktopControls.vue +1 -1
- package/src/components/Tasks/CreateTaskAXS.vue +15 -15
- package/src/components/Tasks/CreateTaskTM.vue +5 -4
- package/src/components/Tasks/Stats.vue +22 -16
- package/src/components/Tasks/Task.vue +100 -81
- package/src/components/Tasks/TaskView.vue +25 -23
- package/src/components/Tasks/Utilities.vue +1 -1
- package/src/components/icons/Mail.vue +2 -2
- package/src/components/ui/Modal.vue +84 -15
- package/src/components/ui/Navbar.vue +118 -39
- package/src/components/ui/controls/atomic/Dropdown.vue +23 -3
- package/src/components/ui/controls/atomic/MultiDropdown.vue +43 -23
- package/src/stores/sampleData.js +89 -64
- package/src/stores/ui.js +30 -4
- package/src/views/Accounts.vue +2 -2
- package/src/views/Console.vue +276 -41
- package/src/views/Editor.vue +175 -28
- package/src/views/FilterBuilder.vue +45 -49
- package/src/views/Login.vue +134 -12
- package/src/views/Profiles.vue +8 -8
- package/src/views/Tasks.vue +51 -2
- package/tailwind.config.js +2 -2
- package/vite.config.js +34 -1
- package/vue.config.js +1 -1
- package/{workbox-config.js → workbox-config.cjs} +1 -4
|
@@ -44,7 +44,13 @@
|
|
|
44
44
|
"Bash(npx eslint:*)",
|
|
45
45
|
"Bash(cp:*)",
|
|
46
46
|
"Bash(sed:*)",
|
|
47
|
-
"Bash(true)"
|
|
47
|
+
"Bash(true)",
|
|
48
|
+
"Bash(./run build)",
|
|
49
|
+
"Bash(mv:*)",
|
|
50
|
+
"Bash(chown:*)",
|
|
51
|
+
"Bash(chmod:*)",
|
|
52
|
+
"Bash(timeout 10s npm run dev)",
|
|
53
|
+
"Bash(gtimeout:*)"
|
|
48
54
|
],
|
|
49
55
|
"deny": []
|
|
50
56
|
}
|
package/.prettierrc
CHANGED
|
@@ -6,5 +6,18 @@
|
|
|
6
6
|
"trailingComma": "none",
|
|
7
7
|
"bracketSpacing": true,
|
|
8
8
|
"arrowParens": "always",
|
|
9
|
-
"printWidth": 120
|
|
9
|
+
"printWidth": 120,
|
|
10
|
+
"vueIndentScriptAndStyle": false,
|
|
11
|
+
"htmlWhitespaceSensitivity": "ignore",
|
|
12
|
+
"bracketSameLine": true,
|
|
13
|
+
"singleAttributePerLine": false,
|
|
14
|
+
"overrides": [
|
|
15
|
+
{
|
|
16
|
+
"files": "*.vue",
|
|
17
|
+
"options": {
|
|
18
|
+
"vueIndentScriptAndStyle": false,
|
|
19
|
+
"htmlWhitespaceSensitivity": "ignore"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
10
23
|
}
|
package/backend/api.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import enableWs from "express-ws";
|
|
2
|
+
import express from "express";
|
|
3
|
+
import cors from "cors";
|
|
4
|
+
import cookieParser from "cookie-parser";
|
|
5
|
+
import { encode } from "@msgpack/msgpack";
|
|
6
|
+
import fs from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
|
|
13
|
+
import { createLogger } from "./mock-src/classes/logger.js";
|
|
14
|
+
import utils from "./mock-src/classes/utils.js";
|
|
15
|
+
|
|
16
|
+
import Batcher from "./batching.js";
|
|
17
|
+
import endpoints from "./endpoints.js";
|
|
18
|
+
import authSystem from "./auth.js";
|
|
19
|
+
import { users } from "./mock-data.js";
|
|
16
20
|
|
|
17
21
|
const logger = createLogger("WEB UI");
|
|
18
22
|
|
|
@@ -175,6 +179,11 @@ app.ws("/api/updates", async function (ws, req) {
|
|
|
175
179
|
}
|
|
176
180
|
});
|
|
177
181
|
|
|
182
|
+
// Root route - serve the main app
|
|
183
|
+
app.get("/", (req, res) => {
|
|
184
|
+
res.sendFile(path.join(__dirname, "../dist/index.html"));
|
|
185
|
+
});
|
|
186
|
+
|
|
178
187
|
// catches vue reloads
|
|
179
188
|
app.use(
|
|
180
189
|
["/login", "/console", "/editor", "/filter", "/profiles", "/accounts"],
|
|
@@ -420,7 +429,7 @@ app.get("/api/userconfig/balances", async (req, res) => {
|
|
|
420
429
|
return res.send({ CapSolver: 100, TwoCaptcha: 40 });
|
|
421
430
|
});
|
|
422
431
|
|
|
423
|
-
|
|
432
|
+
export default {
|
|
424
433
|
start: async () => {
|
|
425
434
|
// onChange = (await import('on-change')).default;
|
|
426
435
|
app.listen(port, "0.0.0.0", () => {
|
package/backend/auth.js
CHANGED
package/backend/batching.js
CHANGED
package/backend/endpoints.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createLogger } from "./mock-src/classes/logger.js";
|
|
2
|
+
import TicketMaster from "./mock-src/ticketmaster.js";
|
|
3
|
+
import utils from "./mock-src/classes/utils.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import validateTaskData from "./validator.js";
|
|
6
6
|
const logger = createLogger("WEB UI");
|
|
7
7
|
|
|
8
8
|
const none = (v) => {
|
|
@@ -326,7 +326,7 @@ async function handleWebsocketMessage(msg) {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
export default {
|
|
330
330
|
continueTask,
|
|
331
331
|
tasksOpen,
|
|
332
332
|
deleteTask,
|
package/backend/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { users, profiles, tmAccounts, axsAccounts } from "./mock-data.js";
|
|
2
2
|
|
|
3
3
|
const Bot = {};
|
|
4
4
|
|
|
@@ -20,4 +20,4 @@ Bot.AXS = {
|
|
|
20
20
|
Accounts: axsAccounts
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
export { default } from "./api.js";
|
package/backend/mock-data.js
CHANGED
|
@@ -2,17 +2,17 @@ const users = [
|
|
|
2
2
|
{
|
|
3
3
|
event: "auth",
|
|
4
4
|
botChannels: {
|
|
5
|
-
splash: "
|
|
6
|
-
carts: "
|
|
7
|
-
checkouts: "
|
|
8
|
-
declines: "
|
|
9
|
-
stockChecker: "
|
|
10
|
-
venueMaps: "
|
|
5
|
+
splash: "-",
|
|
6
|
+
carts: "-",
|
|
7
|
+
checkouts: "-",
|
|
8
|
+
declines: "-",
|
|
9
|
+
stockChecker: "-",
|
|
10
|
+
venueMaps: "-"
|
|
11
11
|
},
|
|
12
12
|
_id: "641a5292b561088b64fe390b",
|
|
13
|
-
name: "
|
|
13
|
+
name: "Admin",
|
|
14
14
|
password: "admin",
|
|
15
|
-
profilePicture: "https://
|
|
15
|
+
profilePicture: "https://cdn.discordapp.com/avatars/435549216304267264/6cfd74ad7c5939a0bcbf218aa08be8cb.png",
|
|
16
16
|
admin: true,
|
|
17
17
|
proxyList: { checkout: "admin-proxies" },
|
|
18
18
|
profileTags: ["Amex", "Citi", "Mercury", "Slash"],
|
|
@@ -44,23 +44,22 @@ const profile = {
|
|
|
44
44
|
const profiles = [];
|
|
45
45
|
for (let i = 0; i < 1000; i++) profiles.push({ ...profile, _id: i });
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
47
|
+
export { users, profiles };
|
|
48
|
+
|
|
49
|
+
export const tmAccounts = [
|
|
50
|
+
{
|
|
51
|
+
tags: ["admin"],
|
|
52
|
+
_id: 1,
|
|
53
|
+
password: "123",
|
|
54
|
+
email: "tm@tm.com"
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
export const axsAccounts = [
|
|
59
|
+
{
|
|
60
|
+
tags: ["admin"],
|
|
61
|
+
_id: 2,
|
|
62
|
+
password: "123",
|
|
63
|
+
email: "axs@axs.com"
|
|
64
|
+
}
|
|
65
|
+
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import util from "node:util";
|
|
2
2
|
|
|
3
3
|
const zeroPadding = (num, length) => String(num).padStart(length, "0");
|
|
4
4
|
|
|
@@ -103,10 +103,8 @@ class Logger {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return logger;
|
|
111
|
-
}
|
|
106
|
+
export const createLogger = (args) => {
|
|
107
|
+
const logger = new Logger();
|
|
108
|
+
logger.defaultArgs = typeof args == "string" ? [args] : typeof args == "object" ? args : undefined;
|
|
109
|
+
return logger;
|
|
112
110
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { createLogger } from "./classes/logger.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export default class TicketMaster {
|
|
4
4
|
constructor(taskData) {
|
|
5
5
|
this.taskId = taskData.taskId || "T-" + ++Bot.CurrentTaskId;
|
|
6
6
|
this.logger = createLogger(this.taskId);
|
package/backend/validator.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import utils from "./mock-src/classes/utils.js";
|
|
2
2
|
|
|
3
3
|
const none = (v) => {
|
|
4
4
|
return v === undefined;
|
|
@@ -59,4 +59,4 @@ const validateTaskData = (task) => {
|
|
|
59
59
|
return task;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
export default validateTaskData;
|
package/dev-server.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createServer } from "vite";
|
|
4
|
+
import process from "process";
|
|
5
|
+
import { spawn } from "child_process";
|
|
6
|
+
|
|
7
|
+
// Start backend server with mock data
|
|
8
|
+
const startBackend = () => {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
const backend = spawn("node", ["index.js"], {
|
|
11
|
+
stdio: ["inherit", "pipe", "pipe"],
|
|
12
|
+
env: { ...process.env, NODE_ENV: "development" }
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
let backendReady = false;
|
|
16
|
+
|
|
17
|
+
backend.stdout.on("data", (data) => {
|
|
18
|
+
const output = data.toString();
|
|
19
|
+
|
|
20
|
+
// Look for backend ready signal
|
|
21
|
+
if (output.includes("Web API started on port") || output.includes("8081")) {
|
|
22
|
+
backendReady = true;
|
|
23
|
+
resolve(backend);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
backend.stderr.on("data", (data) => {
|
|
28
|
+
// Suppress error output unless it's critical
|
|
29
|
+
if (data.toString().includes("Error") || data.toString().includes("EADDRINUSE")) {
|
|
30
|
+
console.error("⚠️ Backend error:", data.toString().trim());
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
backend.on("error", (error) => {
|
|
35
|
+
reject(error);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
backend.on("exit", (code) => {
|
|
39
|
+
if (code !== 0 && !backendReady) {
|
|
40
|
+
reject(new Error(`Backend failed to start`));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Timeout fallback
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
if (!backendReady) {
|
|
47
|
+
resolve(backend);
|
|
48
|
+
}
|
|
49
|
+
}, 5000);
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const startServer = async () => {
|
|
54
|
+
let backend;
|
|
55
|
+
let server;
|
|
56
|
+
let isShuttingDown = false;
|
|
57
|
+
|
|
58
|
+
// Cleanup function
|
|
59
|
+
const cleanup = () => {
|
|
60
|
+
if (isShuttingDown) return;
|
|
61
|
+
isShuttingDown = true;
|
|
62
|
+
|
|
63
|
+
console.log("\n👋 Goodbye!");
|
|
64
|
+
if (backend) {
|
|
65
|
+
backend.kill("SIGTERM");
|
|
66
|
+
setTimeout(() => backend.kill("SIGKILL"), 3000);
|
|
67
|
+
}
|
|
68
|
+
if (server) {
|
|
69
|
+
server.close();
|
|
70
|
+
}
|
|
71
|
+
process.exit(0);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// Handle cleanup on various exit signals
|
|
75
|
+
process.on("SIGINT", cleanup);
|
|
76
|
+
process.on("SIGTERM", cleanup);
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
console.log("🚀 Starting Necro Dashboard...");
|
|
80
|
+
|
|
81
|
+
// Ensure proper permissions for Vite cache
|
|
82
|
+
try {
|
|
83
|
+
const fs = await import('node:fs');
|
|
84
|
+
const path = await import('node:path');
|
|
85
|
+
const cacheDir = path.resolve('./node_modules/.vite');
|
|
86
|
+
if (fs.existsSync(cacheDir)) {
|
|
87
|
+
fs.chmodSync(cacheDir, 0o755);
|
|
88
|
+
}
|
|
89
|
+
} catch (e) {
|
|
90
|
+
// Ignore permission errors
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
backend = await startBackend();
|
|
94
|
+
|
|
95
|
+
server = await createServer({
|
|
96
|
+
configFile: "./vite.config.js",
|
|
97
|
+
server: {
|
|
98
|
+
port: 5173,
|
|
99
|
+
strictPort: true,
|
|
100
|
+
host: true,
|
|
101
|
+
cors: true,
|
|
102
|
+
hmr: {
|
|
103
|
+
overlay: false
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// Handle unhandled errors gracefully
|
|
109
|
+
process.on("uncaughtException", (error) => {
|
|
110
|
+
if (error.code === "ECONNRESET" || error.errno === -54) {
|
|
111
|
+
return; // Silently handle mobile reconnects
|
|
112
|
+
}
|
|
113
|
+
console.error("❌ Server error:", error.message);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
process.on("unhandledRejection", (reason) => {
|
|
117
|
+
if (reason?.code === "ECONNRESET" || reason?.errno === -54) {
|
|
118
|
+
return; // Silently handle mobile reconnects
|
|
119
|
+
}
|
|
120
|
+
console.error("❌ Unhandled error:", reason?.message || reason);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
await server.listen();
|
|
124
|
+
|
|
125
|
+
console.log("\n✨ Necro Dashboard is ready!");
|
|
126
|
+
console.log("🌐 Development: http://localhost:5173");
|
|
127
|
+
console.log("🌐 Staging: http://localhost:8081\n");
|
|
128
|
+
console.log("💀 Happy debugging");
|
|
129
|
+
console.log("\n\n👆 Press Ctrl+C to stop");
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error("Failed to start server:", error);
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
startServer();
|
package/index.html
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<!-- Preload critical PWA manifest -->
|
|
97
97
|
<link rel="preload" as="fetch" href="/manifest.json" crossorigin />
|
|
98
98
|
<link rel="manifest" href="/manifest.json" />
|
|
99
|
-
<meta name="theme-color" content="
|
|
99
|
+
<meta name="theme-color" content="#1a1b1e" />
|
|
100
100
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
101
101
|
|
|
102
102
|
<!-- Prism.js for syntax highlighting -->
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import api from "./backend/index.js";
|
|
2
2
|
api.start();
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@necrolab/dashboard",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.40",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"scripts": {
|
|
5
|
-
"build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.
|
|
6
|
-
"dev": "
|
|
7
|
-
"bot": "
|
|
8
|
-
"expose": "
|
|
6
|
+
"build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.cjs",
|
|
7
|
+
"dev": "node dev-server.js",
|
|
8
|
+
"bot": "node dev-server.js",
|
|
9
|
+
"expose": "node dev-server.js",
|
|
9
10
|
"postinstall": "node postinstall.js",
|
|
10
11
|
"updaterenderer": "npm i @necrolab/tm-renderer@latest",
|
|
11
12
|
"preview": "vite preview",
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"@faker-js/faker": "^7.6.0",
|
|
16
17
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
17
|
-
"@necrolab/tm-renderer": "^0.1.
|
|
18
|
+
"@necrolab/tm-renderer": "^0.1.7",
|
|
18
19
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
19
20
|
"@vueuse/core": "^11.3.0",
|
|
20
21
|
"autoprefixer": "^10.4.21",
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
"dragselect": "^3.1.1",
|
|
25
26
|
"express": "^4.21.2",
|
|
26
27
|
"express-ws": "^5.0.2",
|
|
28
|
+
"ipaddr.js": "^2.2.0",
|
|
27
29
|
"pinia": "^2.3.0",
|
|
28
30
|
"postcss": "^8.4.49",
|
|
29
31
|
"register-service-worker": "^1.7.2",
|
package/postcss.config.js
CHANGED
package/postinstall.js
CHANGED
|
@@ -1,21 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { execSync } from "node:child_process";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
3
5
|
|
|
4
|
-
const
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
7
|
|
|
6
|
-
console.log(
|
|
8
|
+
console.log("🔧 Running postinstall build...");
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
execSync(`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
10
|
+
// Use npx to run vite instead of hardcoded path
|
|
11
|
+
try {
|
|
12
|
+
execSync(`npx vite build`, {
|
|
13
|
+
cwd: __dirname,
|
|
14
|
+
stdio: "inherit"
|
|
15
|
+
});
|
|
16
|
+
console.log("✅ Build completed successfully");
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.log("⚠️ Build failed, but continuing...");
|
|
19
|
+
}
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
recursive: true
|
|
19
|
-
});
|
|
21
|
+
// Only do file operations if we're in a nested structure
|
|
22
|
+
const distPath = path.resolve(path.join(__dirname, "../../../dashboard/dist/"));
|
|
23
|
+
const localDistPath = path.resolve("./dist/");
|
|
20
24
|
|
|
21
|
-
fs.
|
|
25
|
+
if (fs.existsSync(localDistPath) && __dirname.includes("dashboard")) {
|
|
26
|
+
try {
|
|
27
|
+
if (fs.existsSync(distPath)) {
|
|
28
|
+
fs.rmSync(distPath, { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
fs.renameSync(localDistPath, distPath);
|
|
31
|
+
console.log("📁 Moved dist folder");
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.log("⚠️ Could not move dist folder, but that's okay");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/public/favicon-16x16.png
CHANGED
|
Binary file
|
package/public/favicon-32x32.png
CHANGED
|
Binary file
|
package/public/favicon.ico
CHANGED
|
Binary file
|
package/public/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"short_name": "
|
|
3
|
-
"name": "
|
|
2
|
+
"short_name": "Necro",
|
|
3
|
+
"name": "Necro Dashboard",
|
|
4
4
|
"icons": [{
|
|
5
5
|
"src": "/android-chrome-192x192.png",
|
|
6
6
|
"type": "image/png",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"start_url": "/",
|
|
23
|
-
"background_color": "#
|
|
23
|
+
"background_color": "#1a1b1e",
|
|
24
24
|
"display": "standalone",
|
|
25
25
|
"scope": "/",
|
|
26
|
-
"theme_color": "#
|
|
26
|
+
"theme_color": "#1a1b1e"
|
|
27
27
|
}
|