@bananacool467/authtics-host 0.2.8 → 0.2.9

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
@@ -1,6 +1,6 @@
1
1
  # Authtics Host
2
2
 
3
- Version 0.2.8, License: MIT
3
+ Version 0.2.9, License: MIT
4
4
 
5
5
  Authtics Host is a web framework inspired by Next.js. Authtics Host supports SSR (Server-Side Rendering), SSG (Static Site Generation), CSR (Client-Side Rendering) and SRTWS (Site Rendering Through WebSockets) and uses **Esbuild**. This is not to be confused with auth platforms.
6
6
 
package/dist/cli.js CHANGED
@@ -425,6 +425,12 @@ export default class App {
425
425
  message: "ok"
426
426
  }));
427
427
  }
428
+ else {
429
+ res.writeHead(401, { "Content-Type": "application/json" });
430
+ return res.end(JSON.stringify({
431
+ message: "unauthorized"
432
+ }));
433
+ }
428
434
  });
429
435
  this.post('/__authtics_host_apis__/is-users-paused', async (req, res) => {
430
436
  let datMatched = false;
@@ -439,6 +445,12 @@ export default class App {
439
445
  realInfo: usersPaused
440
446
  }));
441
447
  }
448
+ else {
449
+ res.writeHead(401, { "Content-Type": "application/json" });
450
+ return res.end(JSON.stringify({
451
+ message: "unauthorized"
452
+ }));
453
+ }
442
454
  });
443
455
  this.post('/__authtics_host_apis__/get-dat-restriction-missing', async (req, res) => {
444
456
  let datMatched = false;
@@ -457,6 +469,12 @@ export default class App {
457
469
  enabled: datRestrictedEnv
458
470
  }));
459
471
  }
472
+ else {
473
+ res.writeHead(401, { "Content-Type": "application/json" });
474
+ return res.end(JSON.stringify({
475
+ message: "unauthorized"
476
+ }));
477
+ }
460
478
  });
461
479
  this.post('/__authtics_host_apis__/get-dat-matching', async (req, res) => {
462
480
  let datMatched = false;
@@ -487,6 +505,12 @@ export default class App {
487
505
  heapTotal
488
506
  }));
489
507
  }
508
+ else {
509
+ res.writeHead(401, { "Content-Type": "application/json" });
510
+ return res.end(JSON.stringify({
511
+ message: "unauthorized"
512
+ }));
513
+ }
490
514
  });
491
515
  this.post('/__authtics_host_apis__/get-user-settings', async (req, res) => {
492
516
  let datMatched = false;
@@ -500,6 +524,12 @@ export default class App {
500
524
  showError: config_.showError !== undefined ? config_.showError : true
501
525
  }));
502
526
  }
527
+ else {
528
+ res.writeHead(401, { "Content-Type": "application/json" });
529
+ return res.end(JSON.stringify({
530
+ message: "unauthorized"
531
+ }));
532
+ }
503
533
  });
504
534
  this.post("/__authtics_host_apis__/get-server-info", async (req, res) => {
505
535
  let datMatched = false;
@@ -513,6 +543,12 @@ export default class App {
513
543
  uptime, totalRequests, users
514
544
  }));
515
545
  }
546
+ else {
547
+ res.writeHead(401, { "Content-Type": "application/json" });
548
+ return res.end(JSON.stringify({
549
+ message: "unauthorized"
550
+ }));
551
+ }
516
552
  });
517
553
  this.post("/__authtics_host_apis__/restart", async (req, res) => {
518
554
  let datMatched = false;
@@ -522,17 +558,23 @@ export default class App {
522
558
  datMatched = true;
523
559
  if (datMatched) {
524
560
  res.writeHead(200, { "Content-Type": "application/json" });
525
- res.end(JSON.stringify({ message: "Restarting..." }));
526
561
  const { spawn } = await import('node:child_process');
527
562
  const child = spawn(process.argv[0], process.argv.slice(1), {
528
563
  detached: true,
529
564
  stdio: 'inherit'
530
565
  });
531
566
  child.unref();
567
+ res.end(JSON.stringify({ message: "Restarting..." }));
532
568
  this.server?.close(() => {
533
569
  process.kill(process.pid, 'SIGTERM');
534
570
  });
535
571
  }
572
+ else {
573
+ res.writeHead(401, { "Content-Type": "application/json" });
574
+ return res.end(JSON.stringify({
575
+ message: "unauthorized"
576
+ }));
577
+ }
536
578
  });
537
579
  this.post("/__authtics_host_apis__/shutdown", async (req, res) => {
538
580
  let datMatched = false;
@@ -547,6 +589,12 @@ export default class App {
547
589
  process.kill(process.pid, 'SIGTERM');
548
590
  });
549
591
  }
592
+ else {
593
+ res.writeHead(401, { "Content-Type": "application/json" });
594
+ return res.end(JSON.stringify({
595
+ message: "unauthorized"
596
+ }));
597
+ }
550
598
  });
551
599
  this.post("/__authtics_host_apis__/get-render-type", async (req, res) => {
552
600
  let datMatched = false;
@@ -560,6 +608,12 @@ export default class App {
560
608
  renderType: config_.renderType
561
609
  }));
562
610
  }
611
+ else {
612
+ res.writeHead(401, { "Content-Type": "application/json" });
613
+ return res.end(JSON.stringify({
614
+ message: "unauthorized"
615
+ }));
616
+ }
563
617
  });
564
618
  this.post("/__authtics_host_apis__/get-compiler", async (req, res) => {
565
619
  let datMatched = false;
@@ -573,6 +627,12 @@ export default class App {
573
627
  compiler: config_.compilerType
574
628
  }));
575
629
  }
630
+ else {
631
+ res.writeHead(401, { "Content-Type": "application/json" });
632
+ return res.end(JSON.stringify({
633
+ message: "unauthorized"
634
+ }));
635
+ }
576
636
  });
577
637
  this.post("/__authtics_host_apis__/get-host-ver", async (req, res) => {
578
638
  let datMatched = false;
@@ -591,6 +651,12 @@ export default class App {
591
651
  version: packageJsonVersion
592
652
  }));
593
653
  }
654
+ else {
655
+ res.writeHead(401, { "Content-Type": "application/json" });
656
+ return res.end(JSON.stringify({
657
+ message: "unauthorized"
658
+ }));
659
+ }
594
660
  });
595
661
  this.post("/__authtics_host_apis__/get-file-by-pathname", async (req, res) => {
596
662
  let datMatched = false;
@@ -628,6 +694,12 @@ export default class App {
628
694
  filePath: (filePath ? filePath : "Cannot find file because autoPage is disabled.")
629
695
  }));
630
696
  }
697
+ else {
698
+ res.writeHead(401, { "Content-Type": "application/json" });
699
+ return res.end(JSON.stringify({
700
+ message: "unauthorized"
701
+ }));
702
+ }
631
703
  });
632
704
  this.post("/__authtics_host_apis__/ping", async (req, res) => {
633
705
  let datMatched = false;
@@ -639,6 +711,12 @@ export default class App {
639
711
  res.setHeader("Content-Type", "application/json");
640
712
  res.end(JSON.stringify({ status: "ok" }));
641
713
  }
714
+ else {
715
+ res.writeHead(401, { "Content-Type": "application/json" });
716
+ return res.end(JSON.stringify({
717
+ message: "unauthorized"
718
+ }));
719
+ }
642
720
  });
643
721
  this.post('/__authtics_host_apis__/get-connection', async (req, res) => {
644
722
  let datMatched = false;
@@ -652,6 +730,12 @@ export default class App {
652
730
  httpVersion: req.httpVersion
653
731
  }));
654
732
  }
733
+ else {
734
+ res.writeHead(401, { "Content-Type": "application/json" });
735
+ return res.end(JSON.stringify({
736
+ message: "unauthorized"
737
+ }));
738
+ }
655
739
  });
656
740
  }
657
741
  async startServer() {
package/dist/devPanel.js CHANGED
@@ -1,7 +1,91 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useRef } from 'react';
3
- import { ShieldCheck, Shield, CircleX, ChevronDown, ChevronUp, Bug, AlertTriangle, Info, ArrowLeft, Wifi, Terminal, Route, Globe, ChevronRight, ChevronLeft, Server, Cog, TriangleAlert, Eye, Zap, Power, Check as Tick, CheckCircle2 } from 'lucide-react';
3
+ import { ShieldCheck, Shield, CircleX, ChevronDown, ChevronUp, Bug, AlertTriangle, Info, ArrowLeft, Wifi, Terminal, Route, Globe, ChevronRight, ChevronLeft, Server, Cog, TriangleAlert, Eye, Zap, Power, Check as Tick, CheckCircle2, EyeOff, Copy, CopyCheck } from 'lucide-react';
4
4
  import { TraceMap, originalPositionFor, sourceContentFor, } from "@jridgewell/trace-mapping";
5
+ let pT, rT, sT;
6
+ function Tab({ children }) {
7
+ return _jsx(_Fragment, { children: children });
8
+ }
9
+ function TabBody({ children }) {
10
+ return (_jsx("div", { style: { overflowY: 'auto', maxHeight: '260px', padding: '10px', display: 'flex', flexDirection: 'column', gap: '8px' }, children: children }));
11
+ }
12
+ function TabData({ title, titleColor, content, contentColor }) {
13
+ return (_jsxs("div", { style: {
14
+ display: 'flex',
15
+ justifyContent: 'space-between',
16
+ padding: '6px 10px',
17
+ background: '#fff',
18
+ borderRadius: '50px',
19
+ border: '1px solid #eee',
20
+ fontSize: '12px',
21
+ color: '#333',
22
+ }, children: [_jsx("span", { style: { fontSize: '12px', color: titleColor ?? '#333' }, children: title }), _jsx("span", { style: { fontSize: '12px', color: contentColor ?? 'blue' }, children: content })] }));
23
+ }
24
+ function TabHeader({ title, icon, onBack, children }) {
25
+ return (_jsxs("div", { style: {
26
+ padding: '6px 8px',
27
+ borderBottom: '1px solid #ddd',
28
+ background: '#fff',
29
+ display: 'flex',
30
+ alignItems: 'center',
31
+ gap: '6px',
32
+ margin: '10px',
33
+ borderRadius: '100px'
34
+ }, children: [_jsxs("div", { style: {
35
+ alignItems: 'center',
36
+ display: 'flex'
37
+ }, children: [_jsx(PanelButton, { onClick: () => { onBack(); }, style: { color: '#555' }, children: _jsx(ArrowLeft, { size: 12 }) }), _jsxs("span", { style: { fontSize: '12px', display: 'flex', alignItems: 'center', gap: '4px', color: '#333' }, children: [icon, " ", title] })] }), _jsx("div", { style: {
38
+ alignItems: 'center',
39
+ display: 'flex'
40
+ }, children: children })] }));
41
+ }
42
+ async function increaseDots(dots, setter, type) {
43
+ return new Promise((r) => {
44
+ const t = setTimeout(() => {
45
+ if (type == 1) {
46
+ if (pT == null)
47
+ r(0);
48
+ }
49
+ if (type == 2) {
50
+ if (rT == null)
51
+ r(0);
52
+ }
53
+ if (type == 3) {
54
+ if (sT == null)
55
+ r(0);
56
+ }
57
+ if (dots == 0)
58
+ r(0);
59
+ let newDots = dots;
60
+ if (dots < 6)
61
+ newDots++;
62
+ else
63
+ newDots = 1;
64
+ r(newDots);
65
+ }, 250);
66
+ if (type === 1)
67
+ pT = t;
68
+ if (type === 2)
69
+ rT = t;
70
+ if (type === 3)
71
+ sT = t;
72
+ setter(t);
73
+ });
74
+ }
75
+ function finalizeDots(text, dots) {
76
+ if (dots === 1)
77
+ return text + " ";
78
+ if (dots === 2)
79
+ return text + ". ";
80
+ if (dots === 3)
81
+ return text + ".. ";
82
+ if (dots === 4)
83
+ return text + "...";
84
+ if (dots === 5)
85
+ return text + " ..";
86
+ if (dots === 6)
87
+ return text + " .";
88
+ }
5
89
  export async function mapGeneratedLocation(location) {
6
90
  try {
7
91
  if (!location.file || !location.line || !location.column) {
@@ -458,7 +542,7 @@ function SecuredTab() {
458
542
  return (_jsxs("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column', padding: '10px 10px', textAlign: 'center', gap: '8px' }, children: [_jsx(CircleX, { size: 32, color: '#ff7d7d' }), _jsx("span", { style: { color: '#ff7d7d', fontSize: 24 }, children: "This tab is currently not accessible" }), _jsx("span", { style: { color: '#ff7d7d', fontSize: 12 }, children: "To access this tab, you need to set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart." })] }));
459
543
  }
460
544
  function ShutdownTab() {
461
- return (_jsxs("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column', padding: '10px 10px', textAlign: 'center', gap: '8px' }, children: [_jsx(Power, { size: 32, color: 'grey' }), _jsx("span", { style: { color: 'grey', fontSize: 24 }, children: "The server was shutdown by you." })] }));
545
+ return (_jsx(Tab, { children: _jsx(TabBody, { children: _jsxs("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexDirection: 'column', padding: '10px 10px', textAlign: 'center', gap: '8px' }, children: [_jsx(Power, { size: 32, color: 'grey' }), _jsx("span", { style: { color: 'grey', fontSize: 24 }, children: "The server was shutdown by you." })] }) }) }));
462
546
  }
463
547
  function PanelButton({ onClick, onClick2, children, style, fullWidth, disabled, background }) {
464
548
  const [hovered, setHovered] = useState(false);
@@ -472,7 +556,7 @@ function PanelButton({ onClick, onClick2, children, style, fullWidth, disabled,
472
556
  }
473
557
  }, onMouseEnter: () => setHovered(true), onMouseLeave: () => { setHovered(false); setPressed(false); }, onMouseDown: () => setPressed(true), onMouseUp: () => setPressed(false), style: {
474
558
  cursor: 'pointer',
475
- borderRadius: '10px',
559
+ borderRadius: '50px',
476
560
  padding: '6px 10px',
477
561
  fontSize: '11px',
478
562
  display: 'flex',
@@ -484,9 +568,9 @@ function PanelButton({ onClick, onClick2, children, style, fullWidth, disabled,
484
568
  background: disabled
485
569
  ? '#bdbdbd'
486
570
  : pressed
487
- ? `color-mix(in srgb, ${background} 12%, transparent)`
571
+ ? `color-mix(in srgb, ${background} 85%, transparent)`
488
572
  : hovered
489
- ? `color-mix(in srgb, ${background} 6%, transparent)`
573
+ ? `color-mix(in srgb, ${background} 95%, transparent)`
490
574
  : background ?? '#fff',
491
575
  transition: 'background 0.15s ease',
492
576
  ...style,
@@ -512,7 +596,9 @@ export default function DevPanel() {
512
596
  const [panelCustomOpen, setPanelCustomOpen] = useState(false);
513
597
  const [settingsOpen, setSettingsOpen] = useState(false);
514
598
  const [shutdown, setShutdown] = useState(false);
515
- const [shuttingDown, setShuttingDown] = useState(false);
599
+ const [shuttingDown, setShuttingDown] = useState(0);
600
+ const [restarting, setRestarting] = useState(0);
601
+ const [pausing, setPausing] = useState(0);
516
602
  const [packageSecurityOpen, setPackageSecurityOpen] = useState(false);
517
603
  const [highRiskDeps, setHighRiskDeps] = useState([]);
518
604
  const [mediumRiskDeps, setMediumRiskDeps] = useState([]);
@@ -551,6 +637,7 @@ export default function DevPanel() {
551
637
  const [tokenHidden, setTokenHidden] = useState(true);
552
638
  const [locationMode, setLocationMode] = useState("approximate");
553
639
  const NOTIFICATION_SLEEP_MS = 10 * 60 * 1000;
640
+ const [copied, setCopied] = useState(false);
554
641
  const notificationSleepingUntilRef = useRef(0);
555
642
  const [notificationSleepingUntil, setNotificationSleepingUntil] = useState(0);
556
643
  const sleepErrorNotifications = () => {
@@ -567,6 +654,9 @@ export default function DevPanel() {
567
654
  const [isAtBottom, setIsAtBottom] = useState(true);
568
655
  const [datRestrictionMissing, setDatRestrictionMissing] = useState(true);
569
656
  const [heapResult, setHeapResult] = useState("0 Bytes / 0 Bytes");
657
+ const [shuttingDownTimeout, setShuttingDownTimeout] = useState();
658
+ const [restartingTimeout, setRestartingTimeout] = useState();
659
+ const [pausingTimeout, setPausingTimeout] = useState();
570
660
  const cookie = {
571
661
  set: (k, v, sS = "Lax", s = true, mA = null) => {
572
662
  const cookieParts = [`${encodeURIComponent(k)}=${encodeURIComponent(v)}`, "path=/"];
@@ -615,6 +705,32 @@ export default function DevPanel() {
615
705
  consoleScrollRef.current.scrollTop = consoleScrollRef.current.scrollHeight;
616
706
  }
617
707
  }, [filteredLogs, isAtBottom]);
708
+ useEffect(() => {
709
+ if (pausing == 0) {
710
+ clearTimeout(pausingTimeout);
711
+ clearTimeout(pT);
712
+ pT = null;
713
+ }
714
+ if (restarting == 0) {
715
+ clearTimeout(restartingTimeout);
716
+ clearTimeout(rT);
717
+ rT = null;
718
+ }
719
+ if (shuttingDown == 0) {
720
+ clearTimeout(shuttingDownTimeout);
721
+ clearTimeout(sT);
722
+ sT = null;
723
+ }
724
+ async function run() {
725
+ if (pausing != 0)
726
+ setPausing(await increaseDots(pausing, setPausingTimeout, 1));
727
+ if (restarting != 0)
728
+ setRestarting(await increaseDots(restarting, setRestartingTimeout, 2));
729
+ if (shuttingDown != 0)
730
+ setShuttingDown(await increaseDots(shuttingDown, setShuttingDownTimeout, 3));
731
+ }
732
+ run();
733
+ }, [pausing, restarting, shuttingDown]);
618
734
  const loop = () => {
619
735
  frameCount.current++;
620
736
  requestAnimationFrame(loop);
@@ -776,20 +892,27 @@ export default function DevPanel() {
776
892
  }, 250);
777
893
  }, []);
778
894
  const restart = async () => {
895
+ setRestarting(1);
779
896
  await fetch('/__authtics_host_apis__/restart', {
780
897
  method: 'POST',
781
898
  headers: { 'Content-Type': 'application/json' },
782
899
  body: JSON.stringify({})
783
900
  });
901
+ setRestarting(0);
902
+ clearTimeout(restartingTimeout);
903
+ setRestartingTimeout(undefined);
904
+ window.location.reload();
784
905
  };
785
906
  const shutDown = async () => {
786
- setShuttingDown(true);
907
+ setShuttingDown(1);
787
908
  await fetch('/__authtics_host_apis__/shutdown', {
788
909
  method: 'POST',
789
910
  headers: { 'Content-Type': 'application/json' },
790
911
  body: JSON.stringify({})
791
912
  });
792
913
  setShutdown(true);
914
+ clearTimeout(shuttingDownTimeout);
915
+ setShuttingDownTimeout(undefined);
793
916
  };
794
917
  useEffect(() => {
795
918
  const animationId = requestAnimationFrame(loop);
@@ -877,6 +1000,16 @@ export default function DevPanel() {
877
1000
  }, Math.max(remaining, 0));
878
1001
  return () => window.clearTimeout(timer);
879
1002
  }, [notificationSleepingUntil]);
1003
+ const handleCopy = async (text) => {
1004
+ try {
1005
+ await navigator.clipboard.writeText(text);
1006
+ setCopied(true);
1007
+ setTimeout(() => setCopied(false), 2000);
1008
+ }
1009
+ catch (err) {
1010
+ console.error('Failed to copy text: ', err);
1011
+ }
1012
+ };
880
1013
  useEffect(() => {
881
1014
  installConsoleInterceptor();
882
1015
  installNetworkInterceptor((f) => setNetworkFetches(prev => [...prev.slice(-499), f]), (f) => setNetworkFetches(prev => prev.map(p => p.id === f.id ? f : p)), (f) => setEventSources(prev => [...prev.slice(-499), f]), (f) => setEventSources(prev => prev.map(p => p.id === f.id ? f : p)), (f) => setWebSockets(prev => [...prev.slice(-499), f]), (f) => setWebSockets(prev => prev.map(p => p.id === f.id ? f : p)), (f) => setResourcesFound(prev => [...prev.slice(-499), f]), (f) => setResourcesFound(prev => prev.map(p => p.id === f.id ? f : p)), (f) => setResourcesFound(prev => prev.filter(p => p.id !== f.id)), (sent) => {
@@ -1016,6 +1149,7 @@ export default function DevPanel() {
1016
1149
  __();
1017
1150
  }, []);
1018
1151
  const pause_Resume_Users = async () => {
1152
+ setPausing(1);
1019
1153
  if (usersPausedRealInfo) {
1020
1154
  const resp = await fetch('/__authtics_host_apis__/set-users-paused', {
1021
1155
  method: 'POST',
@@ -1040,6 +1174,9 @@ export default function DevPanel() {
1040
1174
  setUsersPausedRealInfo(true);
1041
1175
  }
1042
1176
  }
1177
+ setPausing(0);
1178
+ clearTimeout(pausingTimeout);
1179
+ setPausingTimeout(undefined);
1043
1180
  };
1044
1181
  return (_jsxs(_Fragment, { children: [_jsx("div", { style: {
1045
1182
  position: 'absolute',
@@ -1173,10 +1310,10 @@ export default function DevPanel() {
1173
1310
  maxHeight: drawerHeight,
1174
1311
  opacity: open ? 1 : 0,
1175
1312
  pointerEvents: open ? 'auto' : 'none',
1176
- overflow: (!consoleOpen && !networkOpen && !aboutHostOpen && !webpageInfoOpen && !clientInfoOpen ? 'hidden auto' : 'hidden'),
1177
1313
  borderRadius: '10px',
1178
1314
  transition: 'max-height 0.35s ease, opacity 0.25s ease',
1179
1315
  border: '1px solid #e6e3e3',
1316
+ overflow: (!consoleOpen && !packageSecurityOpen && !settingsOpen && !panelCustomOpen && !serverInfoOpen && !routeOpen && !networkOpen && !aboutHostOpen && !webpageInfoOpen && !clientInfoOpen ? 'hidden auto' : 'hidden'),
1180
1317
  }, children: _jsxs("div", { style: {
1181
1318
  background: '#f7f7f7',
1182
1319
  borderRadius: '10px',
@@ -1193,7 +1330,7 @@ export default function DevPanel() {
1193
1330
  display: 'flex',
1194
1331
  alignItems: 'center',
1195
1332
  gap: '6px',
1196
- }, children: [_jsxs(PanelButton, { onClick: () => setConsoleOpen(false), style: { color: '#555' }, children: [_jsx(ArrowLeft, { size: 12 }), " Back"] }), _jsxs("span", { style: { fontSize: '12px', display: 'flex', alignItems: 'center', gap: '4px', color: '#333' }, children: [_jsx(Terminal, { size: 12, color: "#16a34a" }), " Console"] }), _jsxs("span", { style: { fontSize: '10px', color: '#aaa', marginLeft: '2px' }, children: [filteredLogs.length, " message", filteredLogs.length !== 1 ? 's' : '', " shown, ", logs.length, " in total"] }), _jsx(PanelButton, { onClick: () => setLogs([]), style: { color: '#aaa', marginLeft: 'auto' }, children: "Clear" })] }), _jsx("div", { style: {
1333
+ }, children: [_jsxs(PanelButton, { onClick: () => setConsoleOpen(false), style: { color: '#555' }, children: [_jsx(ArrowLeft, { size: 12 }), " Back"] }), _jsxs("span", { style: { fontSize: '12px', display: 'flex', alignItems: 'center', gap: '4px', color: '#333' }, children: [_jsx(Terminal, { size: 12, color: "#16a34a" }), " Console"] }), _jsxs("span", { style: { fontSize: '10px', color: '#aaa', marginLeft: '2px' }, children: [logs.length, " log", logs.length !== 1 ? 's' : ''] }), _jsx(PanelButton, { onClick: () => setLogs([]), style: { color: '#aaa', marginLeft: 'auto' }, children: "Clear" })] }), _jsx("div", { style: {
1197
1334
  display: 'flex',
1198
1335
  gap: '4px',
1199
1336
  padding: '5px 8px',
@@ -1242,7 +1379,7 @@ export default function DevPanel() {
1242
1379
  justifyContent: 'space-between',
1243
1380
  padding: '6px 10px',
1244
1381
  background: '#fff',
1245
- borderRadius: '10px',
1382
+ borderRadius: '50px',
1246
1383
  border: '1px solid #eee',
1247
1384
  fontSize: '12px',
1248
1385
  color: '#333',
@@ -1300,7 +1437,7 @@ export default function DevPanel() {
1300
1437
  justifyContent: 'space-between',
1301
1438
  padding: '6px 10px',
1302
1439
  background: '#fff',
1303
- borderRadius: '10px',
1440
+ borderRadius: '50px',
1304
1441
  border: '1px solid #eee',
1305
1442
  fontSize: '12px',
1306
1443
  color: '#333',
@@ -1309,16 +1446,17 @@ export default function DevPanel() {
1309
1446
  justifyContent: 'space-between',
1310
1447
  padding: '6px 10px',
1311
1448
  background: '#fff',
1312
- borderRadius: '10px',
1449
+ borderRadius: '50px',
1313
1450
  border: '1px solid #eee',
1314
1451
  fontSize: '12px',
1315
1452
  color: '#333',
1453
+ overflowWrap: 'break-word', wordBreak: 'break-word',
1316
1454
  }, children: [_jsx("span", { style: { fontSize: '12px', color: '#333' }, children: "File Path" }), _jsx("span", { style: { color: 'blue', fontFamily: 'monospace' }, children: path })] }), _jsxs("div", { style: {
1317
1455
  display: 'flex',
1318
1456
  justifyContent: 'space-between',
1319
1457
  padding: '6px 10px',
1320
1458
  background: '#fff',
1321
- borderRadius: '10px',
1459
+ borderRadius: '50px',
1322
1460
  border: '1px solid #eee',
1323
1461
  fontSize: '12px',
1324
1462
  color: '#333',
@@ -1334,7 +1472,7 @@ export default function DevPanel() {
1334
1472
  justifyContent: 'space-between',
1335
1473
  padding: '6px 10px',
1336
1474
  background: '#fff',
1337
- borderRadius: '10px',
1475
+ borderRadius: '50px',
1338
1476
  border: '1px solid #eee',
1339
1477
  fontSize: '12px',
1340
1478
  color: '#333',
@@ -1343,7 +1481,7 @@ export default function DevPanel() {
1343
1481
  justifyContent: 'space-between',
1344
1482
  padding: '6px 10px',
1345
1483
  background: '#fff',
1346
- borderRadius: '10px',
1484
+ borderRadius: '50px',
1347
1485
  border: '1px solid #eee',
1348
1486
  fontSize: '12px',
1349
1487
  color: '#333',
@@ -1352,7 +1490,7 @@ export default function DevPanel() {
1352
1490
  justifyContent: 'space-between',
1353
1491
  padding: '6px 10px',
1354
1492
  background: '#fff',
1355
- borderRadius: '10px',
1493
+ borderRadius: '50px',
1356
1494
  border: '1px solid #eee',
1357
1495
  fontSize: '12px',
1358
1496
  color: '#333',
@@ -1361,7 +1499,7 @@ export default function DevPanel() {
1361
1499
  justifyContent: 'space-between',
1362
1500
  padding: '6px 10px',
1363
1501
  background: '#fff',
1364
- borderRadius: '10px',
1502
+ borderRadius: '50px',
1365
1503
  border: '1px solid #eee',
1366
1504
  fontSize: '12px',
1367
1505
  color: '#333',
@@ -1377,7 +1515,7 @@ export default function DevPanel() {
1377
1515
  justifyContent: 'space-between',
1378
1516
  padding: '6px 10px',
1379
1517
  background: '#fff',
1380
- borderRadius: '10px',
1518
+ borderRadius: '50px',
1381
1519
  border: '1px solid #eee',
1382
1520
  fontSize: '12px',
1383
1521
  color: '#333',
@@ -1386,7 +1524,7 @@ export default function DevPanel() {
1386
1524
  justifyContent: 'space-between',
1387
1525
  padding: '6px 10px',
1388
1526
  background: '#fff',
1389
- borderRadius: '10px',
1527
+ borderRadius: '50px',
1390
1528
  border: '1px solid #eee',
1391
1529
  fontSize: '12px',
1392
1530
  color: '#333',
@@ -1395,7 +1533,7 @@ export default function DevPanel() {
1395
1533
  justifyContent: 'space-between',
1396
1534
  padding: '6px 10px',
1397
1535
  background: '#fff',
1398
- borderRadius: '10px',
1536
+ borderRadius: '50px',
1399
1537
  border: '1px solid #eee',
1400
1538
  fontSize: '12px',
1401
1539
  color: '#333',
@@ -1406,12 +1544,12 @@ export default function DevPanel() {
1406
1544
  display: 'flex',
1407
1545
  alignItems: 'center',
1408
1546
  gap: '6px',
1409
- }, children: [_jsxs(PanelButton, { onClick: () => setPanelCustomOpen(false), style: { color: '#555' }, children: [_jsx(ArrowLeft, { size: 12 }), " Back"] }), _jsxs("span", { style: { fontSize: '12px', display: 'flex', alignItems: 'center', gap: '4px', color: '#333' }, children: [_jsx(Cog, { size: 12, color: "#3b82f6" }), " Panel Configuration"] })] }), _jsxs("div", { style: { overflowY: 'auto', maxHeight: '260px', padding: '10px', display: 'flex', flexDirection: 'column', gap: '8px' }, children: [_jsx("span", { style: { fontSize: '12px', color: '#333' }, children: "Colors" }), _jsxs("div", { style: {
1547
+ }, children: [_jsxs(PanelButton, { onClick: () => setPanelCustomOpen(false), style: { color: '#555' }, children: [_jsx(ArrowLeft, { size: 12 }), " Back"] }), _jsxs("span", { style: { fontSize: '12px', display: 'flex', alignItems: 'center', gap: '4px', color: '#333' }, children: [_jsx(Cog, { size: 12, color: "#3b82f6" }), " Panel Customization"] })] }), _jsxs("div", { style: { overflowY: 'auto', maxHeight: '260px', padding: '10px', display: 'flex', flexDirection: 'column', gap: '8px' }, children: [_jsx("span", { style: { fontSize: '12px', color: '#333' }, children: "Colors" }), _jsxs("div", { style: {
1410
1548
  display: 'flex',
1411
1549
  justifyContent: 'space-between',
1412
1550
  padding: '6px 10px',
1413
1551
  background: '#fff',
1414
- borderRadius: '10px',
1552
+ borderRadius: '50px',
1415
1553
  border: '1px solid #eee',
1416
1554
  alignItems: 'center'
1417
1555
  }, children: [_jsxs("div", { style: { background: '#16a34a', width: '50px', height: '50px', borderRadius: '100px', cursor: 'pointer', alignItems: 'center', textAlign: 'center', justifyContent: 'center', flexDirection: 'column', display: 'flex', border: '1px solid #15803d', gap: '8px' }, onClick: () => {
@@ -1450,7 +1588,7 @@ export default function DevPanel() {
1450
1588
  justifyContent: 'space-between',
1451
1589
  padding: '6px 10px',
1452
1590
  background: '#fff',
1453
- borderRadius: '10px',
1591
+ borderRadius: '50px',
1454
1592
  border: '1px solid #eee',
1455
1593
  fontSize: '12px',
1456
1594
  color: '#333',
@@ -1459,16 +1597,16 @@ export default function DevPanel() {
1459
1597
  justifyContent: 'space-between',
1460
1598
  padding: '6px 10px',
1461
1599
  background: '#fff',
1462
- borderRadius: '10px',
1600
+ borderRadius: '50px',
1463
1601
  border: '1px solid #eee',
1464
1602
  fontSize: '12px',
1465
1603
  color: '#333',
1466
- }, children: [_jsx("span", { style: { fontSize: '12px', color: '#333' }, children: "Made By" }), _jsx("span", { style: { fontSize: '12px', color: 'orange' }, children: "bananakitssu" })] }), _jsxs("a", { style: {
1604
+ }, children: [_jsx("span", { style: { fontSize: '12px', color: '#333' }, children: "Made By" }), _jsx("span", { style: { fontSize: '12px', color: 'orange' }, children: "bananakitssu ( bananacool467 )" })] }), _jsxs("a", { style: {
1467
1605
  display: 'flex',
1468
1606
  justifyContent: 'space-between',
1469
1607
  padding: '6px 10px',
1470
1608
  background: '#fff',
1471
- borderRadius: '10px',
1609
+ borderRadius: '50px',
1472
1610
  border: '1px solid #eee',
1473
1611
  fontSize: '12px',
1474
1612
  color: '#333',
@@ -1486,7 +1624,7 @@ export default function DevPanel() {
1486
1624
  justifyContent: 'space-between',
1487
1625
  padding: '6px 10px',
1488
1626
  background: '#fff',
1489
- borderRadius: '10px',
1627
+ borderRadius: '50px',
1490
1628
  border: '1px solid #eee',
1491
1629
  fontSize: '12px',
1492
1630
  color: '#333',
@@ -1495,7 +1633,7 @@ export default function DevPanel() {
1495
1633
  justifyContent: 'space-between',
1496
1634
  padding: '6px 10px',
1497
1635
  background: '#fff',
1498
- borderRadius: '10px',
1636
+ borderRadius: '50px',
1499
1637
  border: '1px solid #eee',
1500
1638
  fontSize: '12px',
1501
1639
  color: '#333',
@@ -1504,7 +1642,7 @@ export default function DevPanel() {
1504
1642
  justifyContent: 'space-between',
1505
1643
  padding: '6px 10px',
1506
1644
  background: '#fff',
1507
- borderRadius: '10px',
1645
+ borderRadius: '50px',
1508
1646
  border: '1px solid #eee',
1509
1647
  fontSize: '12px',
1510
1648
  color: '#333',
@@ -1535,16 +1673,34 @@ export default function DevPanel() {
1535
1673
  maxHeight: '260px',
1536
1674
  flexDirection: 'column',
1537
1675
  }, children: [_jsxs("div", { style: {
1538
- justifyContent: 'space-between',
1676
+ flexDirection: "column",
1539
1677
  padding: '6px 10px',
1540
1678
  background: '#fff',
1541
1679
  borderRadius: '10px',
1542
1680
  border: '1px solid #eee',
1543
1681
  fontSize: '12px',
1544
1682
  color: '#333',
1545
- display: 'flex'
1683
+ display: 'flex',
1684
+ gap: "8px"
1546
1685
  }, children: [_jsx("span", { style: { fontSize: '12px', color: '#333', position: 'relative' }, children: "DAT (Developer Access Token)" }), _jsxs("div", { style: { position: 'relative',
1547
- display: 'inline-flex' }, children: [_jsx("span", { style: { fontSize: '12px', color: 'blue' }, children: token }), tokenHidden && (_jsxs("div", { style: {
1686
+ display: 'inline-flex' }, children: [_jsxs("span", { style: { fontSize: '12px', color: 'blue', display: "flex", justifyContent: "space-between" }, children: [token, !tokenHidden && (_jsxs("div", { style: {
1687
+ position: 'absolute',
1688
+ marginTop: '-2.5px',
1689
+ height: '100%',
1690
+ backdropFilter: 'blur(10px)',
1691
+ backgroundColor: 'rgba(255,255,255,0.3)',
1692
+ cursor: 'pointer',
1693
+ padding: '2.5px 2.5px',
1694
+ borderRadius: '8px',
1695
+ textAlign: 'center',
1696
+ display: 'flex',
1697
+ justifyContent: 'center',
1698
+ alignItems: 'center',
1699
+ gap: '4px',
1700
+ paddingLeft: 5,
1701
+ paddingRight: 5,
1702
+ right: 0
1703
+ }, onClick: () => setTokenHidden(true), children: [_jsx(EyeOff, { size: 12 }), "Hide"] }))] }), tokenHidden && (_jsxs("div", { style: {
1548
1704
  position: 'absolute',
1549
1705
  top: 0, left: 0,
1550
1706
  marginTop: '-2.5px',
@@ -1559,7 +1715,9 @@ export default function DevPanel() {
1559
1715
  justifyContent: 'center',
1560
1716
  alignItems: 'center',
1561
1717
  gap: '4px'
1562
- }, onClick: () => setTokenHidden(false), children: [_jsx(Eye, { size: 12 }), "Click to reveal"] }))] })] }), tokenLength !== 16 ? (_jsx(_Fragment, { children: _jsxs("div", { style: {
1718
+ }, onClick: () => setTokenHidden(false), children: [_jsx(Eye, { size: 12 }), "Click to reveal"] }))] }), _jsxs(PanelButton, { onClick: () => {
1719
+ handleCopy(token || "");
1720
+ }, fullWidth: true, style: { color: '#fff', justifyContent: 'center', height: '32px', background: '#00b2ed' }, children: [copied ? (_jsx(CopyCheck, { size: 16 })) : (_jsx(Copy, { size: 16 })), " ", copied ? "Copied!" : "Copy"] })] }), tokenLength !== 16 ? (_jsx(_Fragment, { children: _jsxs("div", { style: {
1563
1721
  display: 'flex',
1564
1722
  background: '#ba4e4e',
1565
1723
  borderRadius: '10px',
@@ -1579,7 +1737,7 @@ export default function DevPanel() {
1579
1737
  gap: '6px',
1580
1738
  color: '#fff',
1581
1739
  flexDirection: 'row',
1582
- }, children: "Updates to security. Apps with version 0.0.1-beta.9 and over will now require DAT restriction to access remote features like restarting and shutting down the app." }) })) : (_jsx(_Fragment, {})), _jsx(PanelButton, { onClick: () => { restart(); }, fullWidth: true, style: { color: '#fff', justifyContent: 'center', height: '32px', background: (datRestrictionMissing ? '#bdbdbd' : '#ba4e4e') }, disabled: datRestrictionMissing, children: _jsx("span", { style: { display: 'flex', alignItems: 'center', gap: '6px', textAlign: 'center' }, children: "Restart App" }) }), datRestrictionMissing ? (_jsxs("span", { style: { display: 'flex', opacity: 0.5, fontSize: 10, justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(Info, { size: 30 }), "Restarting the app is unavaliable. Set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart."] })) : (_jsx(_Fragment, {})), _jsx(PanelButton, { onClick: () => { shutDown(); }, fullWidth: true, style: { color: '#fff', justifyContent: 'center', height: '32px', background: (datRestrictionMissing ? '#bdbdbd' : '#ba4e4e') }, disabled: datRestrictionMissing, children: _jsx("span", { style: { display: 'flex', alignItems: 'center', gap: '6px', textAlign: 'center' }, children: shuttingDown ? "Shutting Down App" : "Shut Down App" }) }), datRestrictionMissing ? (_jsxs("span", { style: { display: 'flex', opacity: 0.5, fontSize: 10, justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(Info, { size: 30 }), "Shutting down the app is unavaliable. Set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart."] })) : (_jsx(_Fragment, {})), _jsx(PanelButton, { onClick: () => { pause_Resume_Users(); }, fullWidth: true, style: { color: (datRestrictionMissing ? '#fff' : '#333'), justifyContent: 'center', height: '32px', background: (datRestrictionMissing ? '#bdbdbd' : '#f2f2f2') }, disabled: datRestrictionMissing, children: _jsx("span", { style: { display: 'flex', alignItems: 'center', gap: '6px', textAlign: 'center' }, children: usersPausedRealInfo ? "Resume Users" : "Pause Users" }) }), datRestrictionMissing ? (_jsxs("span", { style: { display: 'flex', opacity: 0.5, fontSize: 10, justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(Info, { size: 30 }), "Pausing users from accessing the app is unavaliable. Set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart."] })) : (_jsx(_Fragment, {}))] })] })) : (_jsx(_Fragment, {}))] }) }), datMatch ? (_jsxs("div", { onClick: () => setOpen(o => !o), style: {
1740
+ }, children: "Updates to security. Apps with version 0.0.1-beta.9 and over will now require DAT restriction to access remote features like restarting and shutting down the app." }) })) : (_jsx(_Fragment, {})), _jsx(PanelButton, { onClick: () => { restart(); }, fullWidth: true, style: { color: '#fff', justifyContent: 'center', height: '32px', background: (datRestrictionMissing ? '#bdbdbd' : '#ba4e4e') }, disabled: datRestrictionMissing, children: _jsx("span", { style: { display: 'flex', alignItems: 'center', gap: '6px', textAlign: 'center' }, children: _jsx("pre", { children: restarting ? String(finalizeDots("Restarting App", restarting)) : "Restart App" }) }) }), datRestrictionMissing ? (_jsxs("span", { style: { display: 'flex', opacity: 0.5, fontSize: 10, justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(Info, { size: 30 }), "Restarting the app is unavaliable. Set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart."] })) : (_jsx(_Fragment, {})), _jsx(PanelButton, { onClick: () => { shutDown(); }, fullWidth: true, style: { color: '#fff', justifyContent: 'center', height: '32px', background: (datRestrictionMissing ? '#bdbdbd' : '#ba4e4e') }, disabled: datRestrictionMissing, children: _jsx("span", { style: { display: 'flex', alignItems: 'center', gap: '6px', textAlign: 'center' }, children: _jsx("pre", { children: shuttingDown ? String(finalizeDots("Shutting Down App", shuttingDown)) : "Shut Down App" }) }) }), datRestrictionMissing ? (_jsxs("span", { style: { display: 'flex', opacity: 0.5, fontSize: 10, justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(Info, { size: 30 }), "Shutting down the app is unavaliable. Set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart."] })) : (_jsx(_Fragment, {})), _jsx(PanelButton, { onClick: () => { pause_Resume_Users(); }, fullWidth: true, style: { color: (datRestrictionMissing ? '#fff' : '#333'), justifyContent: 'center', height: '32px', background: (datRestrictionMissing ? '#bdbdbd' : '#f2f2f2') }, disabled: datRestrictionMissing, children: _jsx("span", { style: { display: 'flex', alignItems: 'center', gap: '6px', textAlign: 'center' }, children: _jsx("pre", { children: pausing ? String(finalizeDots("Pausing", pausing)) : usersPausedRealInfo ? "Resume Users" : "Pause Users" }) }) }), datRestrictionMissing ? (_jsxs("span", { style: { display: 'flex', opacity: 0.5, fontSize: 10, justifyContent: 'center', alignItems: 'center', gap: '8px' }, children: [_jsx(Info, { size: 30 }), "Pausing users from accessing the app is unavaliable. Set \"dat\" to your current DAT in the Authtics Host config to set restriction and then restart."] })) : (_jsx(_Fragment, {}))] })] })) : (_jsx(_Fragment, {}))] }) }), datMatch ? (_jsxs("div", { onClick: () => setOpen(o => !o), style: {
1583
1741
  display: 'flex',
1584
1742
  flexDirection: 'row',
1585
1743
  alignItems: 'center',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananacool467/authtics-host",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Authtics Host, A Next.js-inspired web framework for Node.js and React with TypeScript and JSX support.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",