@necrolab/dashboard 0.4.38 → 0.4.39

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 (60) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/backend/api.js +20 -16
  3. package/backend/auth.js +2 -2
  4. package/backend/batching.js +1 -1
  5. package/backend/endpoints.js +5 -5
  6. package/backend/index.js +2 -2
  7. package/backend/mock-data.js +19 -20
  8. package/backend/mock-src/classes/logger.js +5 -7
  9. package/backend/mock-src/classes/utils.js +3 -2
  10. package/backend/mock-src/ticketmaster.js +2 -2
  11. package/backend/validator.js +2 -2
  12. package/dev-server.js +49 -0
  13. package/index.html +1 -1
  14. package/index.js +1 -1
  15. package/package.json +6 -5
  16. package/postcss.config.js +1 -1
  17. package/postinstall.js +5 -3
  18. package/public/android-chrome-192x192.png +0 -0
  19. package/public/android-chrome-512x512.png +0 -0
  20. package/public/apple-touch-icon.png +0 -0
  21. package/public/favicon-16x16.png +0 -0
  22. package/public/favicon-32x32.png +0 -0
  23. package/public/favicon.ico +0 -0
  24. package/public/manifest.json +4 -4
  25. package/src/App.vue +471 -49
  26. package/src/assets/css/_input.scss +25 -25
  27. package/src/assets/css/main.scss +116 -22
  28. package/src/assets/img/android-chrome-192x192.png +0 -0
  29. package/src/assets/img/logo_icon-old.png +0 -0
  30. package/src/assets/img/logo_icon.png +0 -0
  31. package/src/components/Editors/Account/Account.vue +19 -19
  32. package/src/components/Editors/Account/AccountCreator.vue +3 -3
  33. package/src/components/Editors/Account/AccountView.vue +17 -6
  34. package/src/components/Editors/Profile/Profile.vue +24 -24
  35. package/src/components/Editors/Profile/ProfileView.vue +22 -9
  36. package/src/components/Editors/TagLabel.vue +6 -7
  37. package/src/components/Table/Table.vue +15 -0
  38. package/src/components/Tasks/Controls/DesktopControls.vue +1 -1
  39. package/src/components/Tasks/CreateTaskAXS.vue +15 -15
  40. package/src/components/Tasks/CreateTaskTM.vue +5 -4
  41. package/src/components/Tasks/Task.vue +23 -35
  42. package/src/components/Tasks/TaskView.vue +19 -18
  43. package/src/components/Tasks/Utilities.vue +1 -1
  44. package/src/components/icons/Mail.vue +2 -2
  45. package/src/components/ui/Modal.vue +84 -15
  46. package/src/components/ui/Navbar.vue +118 -39
  47. package/src/components/ui/controls/atomic/Dropdown.vue +23 -3
  48. package/src/components/ui/controls/atomic/MultiDropdown.vue +43 -23
  49. package/src/stores/sampleData.js +5 -4
  50. package/src/stores/ui.js +3 -3
  51. package/src/views/Accounts.vue +2 -2
  52. package/src/views/Console.vue +78 -30
  53. package/src/views/Editor.vue +175 -24
  54. package/src/views/FilterBuilder.vue +21 -7
  55. package/src/views/Profiles.vue +8 -8
  56. package/src/views/Tasks.vue +51 -2
  57. package/tailwind.config.js +1 -1
  58. package/vite.config.js +8 -1
  59. package/vue.config.js +1 -1
  60. package/{workbox-config.js → workbox-config.cjs} +1 -4
@@ -44,7 +44,9 @@
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:*)"
48
50
  ],
49
51
  "deny": []
50
52
  }
package/backend/api.js CHANGED
@@ -1,18 +1,22 @@
1
- const enableWs = require("express-ws");
2
- const express = require("express");
3
- const cors = require("cors");
4
- const cookieParser = require("cookie-parser");
5
- const { encode } = require("@msgpack/msgpack");
6
- const fs = require("node:fs");
7
- const path = require("node:path");
8
-
9
- const { createLogger } = require("./mock-src/classes/logger");
10
- const utils = require("./mock-src/classes/utils");
11
-
12
- const Batcher = require("./batching");
13
- const endpoints = require("./endpoints");
14
- const authSystem = require("./auth");
15
- const { users } = require("./mock-data.js");
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
 
@@ -420,7 +424,7 @@ app.get("/api/userconfig/balances", async (req, res) => {
420
424
  return res.send({ CapSolver: 100, TwoCaptcha: 40 });
421
425
  });
422
426
 
423
- module.exports = {
427
+ export default {
424
428
  start: async () => {
425
429
  // onChange = (await import('on-change')).default;
426
430
  app.listen(port, "0.0.0.0", () => {
package/backend/auth.js CHANGED
@@ -1,4 +1,4 @@
1
- const crypto = require("node:crypto");
1
+ import crypto from "node:crypto";
2
2
 
3
3
  const generateAuthToken = () => {
4
4
  return crypto.randomUUID();
@@ -59,4 +59,4 @@ class Auth {
59
59
  }
60
60
  }
61
61
 
62
- module.exports = Auth;
62
+ export default Auth;
@@ -40,4 +40,4 @@ class Batcher {
40
40
  }
41
41
  }
42
42
 
43
- module.exports = Batcher;
43
+ export default Batcher;
@@ -1,8 +1,8 @@
1
- const { createLogger } = require("./mock-src/classes/logger");
2
- const TicketMaster = require("./mock-src/ticketmaster");
3
- const utils = require("./mock-src/classes/utils");
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
- const validateTaskData = require("./validator");
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
- module.exports = {
329
+ export default {
330
330
  continueTask,
331
331
  tasksOpen,
332
332
  deleteTask,
package/backend/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const { users, profiles, tmAccounts, axsAccounts } = require("./mock-data");
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
- module.exports = require("./api");
23
+ export { default } from "./api.js";
@@ -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
- module.exports = {
48
- users,
49
- profiles,
50
- tmAccounts: [
51
- {
52
- tags: ["admin"],
53
- _id: 1,
54
- password: "123",
55
- email: "tm@tm.com"
56
- }
57
- ],
58
- axsAccounts: [
59
- {
60
- tags: ["admin"],
61
- _id: 2,
62
- password: "123",
63
- email: "axs@axs.com"
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
- const util = require("node:util");
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
- module.exports = {
107
- createLogger: (args) => {
108
- const logger = new Logger();
109
- logger.defaultArgs = typeof args == "string" ? [args] : typeof args == "object" ? args : undefined;
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,7 +1,8 @@
1
+ import crypto from "node:crypto";
2
+
1
3
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
2
- const crypto = require("node:crypto");
3
4
 
4
- module.exports = {
5
+ export default {
5
6
  pickAccount: () => {
6
7
  return "demo@email.com";
7
8
  },
@@ -1,6 +1,6 @@
1
- const { createLogger } = require("./classes/logger");
1
+ import { createLogger } from "./classes/logger.js";
2
2
 
3
- module.exports = class TicketMaster {
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);
@@ -1,4 +1,4 @@
1
- const utils = require("./mock-src/classes/utils");
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
- module.exports = validateTaskData;
62
+ export default validateTaskData;
package/dev-server.js ADDED
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createServer } from 'vite'
4
+ import process from 'process'
5
+
6
+ const startServer = async () => {
7
+ try {
8
+ const server = await createServer({
9
+ configFile: './vite.config.js',
10
+ server: {
11
+ port: 5173,
12
+ strictPort: true,
13
+ host: true,
14
+ cors: true,
15
+ hmr: {
16
+ overlay: false
17
+ }
18
+ }
19
+ })
20
+
21
+ // Handle unhandled errors gracefully
22
+ process.on('uncaughtException', (error) => {
23
+ if (error.code === 'ECONNRESET' || error.errno === -54) {
24
+ console.log('📱 iPhone disconnected/reconnected - continuing...')
25
+ return
26
+ }
27
+ console.error('Server error:', error)
28
+ })
29
+
30
+ process.on('unhandledRejection', (reason, promise) => {
31
+ if (reason?.code === 'ECONNRESET' || reason?.errno === -54) {
32
+ console.log('📱 iPhone connection reset - continuing...')
33
+ return
34
+ }
35
+ console.error('Unhandled rejection at:', promise, 'reason:', reason)
36
+ })
37
+
38
+ await server.listen()
39
+ server.printUrls()
40
+
41
+ console.log('🚀 Dev server running with iOS connection error handling')
42
+
43
+ } catch (error) {
44
+ console.error('Failed to start server:', error)
45
+ process.exit(1)
46
+ }
47
+ }
48
+
49
+ 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="rgba(28, 28, 49, 1)" />
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
- const api = require("./backend");
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.38",
3
+ "version": "0.4.39",
4
+ "type": "module",
4
5
  "scripts": {
5
- "build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.js",
6
- "dev": "vite",
7
- "bot": "vite",
8
- "expose": "vite --host 0.0.0.0",
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",
package/postcss.config.js CHANGED
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  plugins: {
3
3
  tailwindcss: {},
4
4
  autoprefixer: {},
package/postinstall.js CHANGED
@@ -1,7 +1,9 @@
1
- const fs = require("node:fs");
2
- const { execSync } = require("node:child_process");
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 path = require("node:path");
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
7
 
6
8
  console.log(__dirname);
7
9
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
- "short_name": "Russonoro",
3
- "name": "Russonoro Labs",
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": "#202036",
23
+ "background_color": "#1a1b1e",
24
24
  "display": "standalone",
25
25
  "scope": "/",
26
- "theme_color": "#202036"
26
+ "theme_color": "#1a1b1e"
27
27
  }