@edgible-team/cli 1.0.1 → 1.0.2

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 (228) hide show
  1. package/LICENSE +16 -0
  2. package/README.md +114 -1
  3. package/dist/client/api-client.d.ts +575 -0
  4. package/dist/client/api-client.d.ts.map +1 -0
  5. package/dist/client/api-client.js +196 -2
  6. package/dist/client/index.d.ts +10 -0
  7. package/dist/client/index.d.ts.map +1 -0
  8. package/dist/commands/agent.d.ts +3 -0
  9. package/dist/commands/agent.d.ts.map +1 -0
  10. package/dist/commands/agent.js +18 -34
  11. package/dist/commands/ai.d.ts +3 -0
  12. package/dist/commands/ai.d.ts.map +1 -0
  13. package/dist/commands/ai.js +1660 -274
  14. package/dist/commands/application.d.ts +6 -0
  15. package/dist/commands/application.d.ts.map +1 -0
  16. package/dist/commands/application.js +377 -0
  17. package/dist/commands/auth.d.ts +3 -0
  18. package/dist/commands/auth.d.ts.map +1 -0
  19. package/dist/commands/base/BaseCommand.d.ts +53 -0
  20. package/dist/commands/base/BaseCommand.d.ts.map +1 -0
  21. package/dist/commands/base/CommandHandler.d.ts +28 -0
  22. package/dist/commands/base/CommandHandler.d.ts.map +1 -0
  23. package/dist/commands/base/command-wrapper.d.ts +21 -0
  24. package/dist/commands/base/command-wrapper.d.ts.map +1 -0
  25. package/dist/commands/base/middleware.d.ts +34 -0
  26. package/dist/commands/base/middleware.d.ts.map +1 -0
  27. package/dist/commands/config.d.ts +3 -0
  28. package/dist/commands/config.d.ts.map +1 -0
  29. package/dist/commands/connectivity.d.ts +3 -0
  30. package/dist/commands/connectivity.d.ts.map +1 -0
  31. package/dist/commands/debug.d.ts +3 -0
  32. package/dist/commands/debug.d.ts.map +1 -0
  33. package/dist/commands/debug.js +336 -0
  34. package/dist/commands/discover.d.ts +3 -0
  35. package/dist/commands/discover.d.ts.map +1 -0
  36. package/dist/commands/examples/migrated-command-example.d.ts +31 -0
  37. package/dist/commands/examples/migrated-command-example.d.ts.map +1 -0
  38. package/dist/commands/gateway.d.ts +6 -0
  39. package/dist/commands/gateway.d.ts.map +1 -0
  40. package/dist/commands/managedGateway.d.ts +6 -0
  41. package/dist/commands/managedGateway.d.ts.map +1 -0
  42. package/dist/commands/managedGateway.js +132 -0
  43. package/dist/commands/utils/config-validator.d.ts +29 -0
  44. package/dist/commands/utils/config-validator.d.ts.map +1 -0
  45. package/dist/commands/utils/gateway-prompt.d.ts +23 -0
  46. package/dist/commands/utils/gateway-prompt.d.ts.map +1 -0
  47. package/dist/commands/utils/input-parser.d.ts +34 -0
  48. package/dist/commands/utils/input-parser.d.ts.map +1 -0
  49. package/dist/commands/utils/output-formatter.d.ts +62 -0
  50. package/dist/commands/utils/output-formatter.d.ts.map +1 -0
  51. package/dist/config/app-config.d.ts +44 -0
  52. package/dist/config/app-config.d.ts.map +1 -0
  53. package/dist/detection/SystemCapabilityDetector.d.ts +139 -0
  54. package/dist/detection/SystemCapabilityDetector.d.ts.map +1 -0
  55. package/dist/detection/ToolDetector.d.ts +16 -0
  56. package/dist/detection/ToolDetector.d.ts.map +1 -0
  57. package/dist/detection/WorkloadDetector.d.ts +62 -0
  58. package/dist/detection/WorkloadDetector.d.ts.map +1 -0
  59. package/dist/di/bindings.d.ts +15 -0
  60. package/dist/di/bindings.d.ts.map +1 -0
  61. package/dist/di/container.d.ts +44 -0
  62. package/dist/di/container.d.ts.map +1 -0
  63. package/dist/di/types.d.ts +23 -0
  64. package/dist/di/types.d.ts.map +1 -0
  65. package/dist/index.d.ts +3 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +8 -1
  68. package/dist/interfaces/IDaemonManager.d.ts +67 -0
  69. package/dist/interfaces/IDaemonManager.d.ts.map +1 -0
  70. package/dist/repositories/config-repository.d.ts +46 -0
  71. package/dist/repositories/config-repository.d.ts.map +1 -0
  72. package/dist/repositories/gateway-repository.d.ts +37 -0
  73. package/dist/repositories/gateway-repository.d.ts.map +1 -0
  74. package/dist/services/AgentStatusManager.d.ts +30 -0
  75. package/dist/services/AgentStatusManager.d.ts.map +1 -0
  76. package/dist/services/ConnectivityTester.d.ts +30 -0
  77. package/dist/services/ConnectivityTester.d.ts.map +1 -0
  78. package/dist/services/DependencyInstaller.d.ts +32 -0
  79. package/dist/services/DependencyInstaller.d.ts.map +1 -0
  80. package/dist/services/LocalAgentManager.d.ts +220 -0
  81. package/dist/services/LocalAgentManager.d.ts.map +1 -0
  82. package/dist/services/LocalAgentManager.js +2 -2
  83. package/dist/services/application/ApplicationService.d.ts +54 -0
  84. package/dist/services/application/ApplicationService.d.ts.map +1 -0
  85. package/dist/services/application/ApplicationService.js +10 -3
  86. package/dist/services/auth/AuthService.d.ts +42 -0
  87. package/dist/services/auth/AuthService.d.ts.map +1 -0
  88. package/dist/services/aws.d.ts +136 -0
  89. package/dist/services/aws.d.ts.map +1 -0
  90. package/dist/services/aws.js +2 -2
  91. package/dist/services/daemon/DaemonManagerFactory.d.ts +17 -0
  92. package/dist/services/daemon/DaemonManagerFactory.d.ts.map +1 -0
  93. package/dist/services/daemon/DockerDaemonManager.d.ts +26 -0
  94. package/dist/services/daemon/DockerDaemonManager.d.ts.map +1 -0
  95. package/dist/services/daemon/LaunchdDaemonManager.d.ts +20 -0
  96. package/dist/services/daemon/LaunchdDaemonManager.d.ts.map +1 -0
  97. package/dist/services/daemon/LaunchdDaemonManager.js +6 -0
  98. package/dist/services/daemon/PodmanDaemonManager.d.ts +24 -0
  99. package/dist/services/daemon/PodmanDaemonManager.d.ts.map +1 -0
  100. package/dist/services/daemon/SystemdDaemonManager.d.ts +20 -0
  101. package/dist/services/daemon/SystemdDaemonManager.d.ts.map +1 -0
  102. package/dist/services/daemon/WindowsServiceDaemonManager.d.ts +19 -0
  103. package/dist/services/daemon/WindowsServiceDaemonManager.d.ts.map +1 -0
  104. package/dist/services/daemon/index.d.ts +7 -0
  105. package/dist/services/daemon/index.d.ts.map +1 -0
  106. package/dist/services/edgible.d.ts +304 -0
  107. package/dist/services/edgible.d.ts.map +1 -0
  108. package/dist/services/edgible.js +53 -4
  109. package/dist/services/gateway/GatewayService.d.ts +88 -0
  110. package/dist/services/gateway/GatewayService.d.ts.map +1 -0
  111. package/dist/state/config.d.ts +96 -0
  112. package/dist/state/config.d.ts.map +1 -0
  113. package/dist/types/AgentConfig.d.ts +126 -0
  114. package/dist/types/AgentConfig.d.ts.map +1 -0
  115. package/dist/types/AgentStatus.d.ts +30 -0
  116. package/dist/types/AgentStatus.d.ts.map +1 -0
  117. package/dist/types/ApiClient.d.ts +36 -0
  118. package/dist/types/ApiClient.d.ts.map +1 -0
  119. package/dist/types/ApiRequests.d.ts +269 -0
  120. package/dist/types/ApiRequests.d.ts.map +1 -0
  121. package/dist/types/ApiResponses.d.ts +348 -0
  122. package/dist/types/ApiResponses.d.ts.map +1 -0
  123. package/dist/types/Application.d.ts +13 -0
  124. package/dist/types/Application.d.ts.map +1 -0
  125. package/dist/types/CaddyJson.d.ts +231 -0
  126. package/dist/types/CaddyJson.d.ts.map +1 -0
  127. package/dist/types/DeviceMetrics.d.ts +95 -0
  128. package/dist/types/DeviceMetrics.d.ts.map +1 -0
  129. package/dist/types/DeviceMetrics.js +5 -0
  130. package/dist/types/LogAggregation.d.ts +106 -0
  131. package/dist/types/LogAggregation.d.ts.map +1 -0
  132. package/dist/types/LogAggregation.js +5 -0
  133. package/dist/types/LogEntry.d.ts +60 -0
  134. package/dist/types/LogEntry.d.ts.map +1 -0
  135. package/dist/types/LogEntry.js +5 -0
  136. package/dist/types/UnifiedAgentStatus.d.ts +28 -0
  137. package/dist/types/UnifiedAgentStatus.d.ts.map +1 -0
  138. package/dist/types/WireGuard.d.ts +36 -0
  139. package/dist/types/WireGuard.d.ts.map +1 -0
  140. package/dist/types/Workload.d.ts +9 -0
  141. package/dist/types/Workload.d.ts.map +1 -0
  142. package/dist/types/agent.d.ts +120 -0
  143. package/dist/types/agent.d.ts.map +1 -0
  144. package/dist/types/command-options.d.ts +115 -0
  145. package/dist/types/command-options.d.ts.map +1 -0
  146. package/dist/types/connectivity.d.ts +80 -0
  147. package/dist/types/connectivity.d.ts.map +1 -0
  148. package/dist/types/errors.d.ts +97 -0
  149. package/dist/types/errors.d.ts.map +1 -0
  150. package/dist/types/gateway-types.d.ts +46 -0
  151. package/dist/types/gateway-types.d.ts.map +1 -0
  152. package/dist/types/index.d.ts +28 -0
  153. package/dist/types/index.d.ts.map +1 -0
  154. package/dist/types/models/ApplicationData.d.ts +78 -0
  155. package/dist/types/models/ApplicationData.d.ts.map +1 -0
  156. package/dist/types/models/CertificateData.d.ts +44 -0
  157. package/dist/types/models/CertificateData.d.ts.map +1 -0
  158. package/dist/types/models/DeviceData.d.ts +29 -0
  159. package/dist/types/models/DeviceData.d.ts.map +1 -0
  160. package/dist/types/models/DevicePoolData.d.ts +47 -0
  161. package/dist/types/models/DevicePoolData.d.ts.map +1 -0
  162. package/dist/types/models/LifecycleEvent.d.ts +27 -0
  163. package/dist/types/models/LifecycleEvent.d.ts.map +1 -0
  164. package/dist/types/models/LifecycleEvent.js +5 -0
  165. package/dist/types/models/OrganizationData.d.ts +53 -0
  166. package/dist/types/models/OrganizationData.d.ts.map +1 -0
  167. package/dist/types/models/OrganizationInviteData.d.ts +39 -0
  168. package/dist/types/models/OrganizationInviteData.d.ts.map +1 -0
  169. package/dist/types/models/ProviderConfiguration.d.ts +37 -0
  170. package/dist/types/models/ProviderConfiguration.d.ts.map +1 -0
  171. package/dist/types/models/ResourceData.d.ts +18 -0
  172. package/dist/types/models/ResourceData.d.ts.map +1 -0
  173. package/dist/types/models/ServiceResourceData.d.ts +5 -0
  174. package/dist/types/models/ServiceResourceData.d.ts.map +1 -0
  175. package/dist/types/models/UserData.d.ts +12 -0
  176. package/dist/types/models/UserData.d.ts.map +1 -0
  177. package/dist/types/route.d.ts +67 -0
  178. package/dist/types/route.d.ts.map +1 -0
  179. package/dist/types/validation/schemas.d.ts +606 -0
  180. package/dist/types/validation/schemas.d.ts.map +1 -0
  181. package/dist/types/validation/schemas.js +46 -4
  182. package/dist/types/validation.d.ts +68 -0
  183. package/dist/types/validation.d.ts.map +1 -0
  184. package/dist/utils/FileIntegrityManager.d.ts +37 -0
  185. package/dist/utils/FileIntegrityManager.d.ts.map +1 -0
  186. package/dist/utils/PathMigration.d.ts +45 -0
  187. package/dist/utils/PathMigration.d.ts.map +1 -0
  188. package/dist/utils/PathResolver.d.ts +76 -0
  189. package/dist/utils/PathResolver.d.ts.map +1 -0
  190. package/dist/utils/PlatformDetector.d.ts +60 -0
  191. package/dist/utils/PlatformDetector.d.ts.map +1 -0
  192. package/dist/utils/console-logger.d.ts +37 -0
  193. package/dist/utils/console-logger.d.ts.map +1 -0
  194. package/dist/utils/docker-compose-parser.d.ts +28 -0
  195. package/dist/utils/docker-compose-parser.d.ts.map +1 -0
  196. package/dist/utils/errors.d.ts +63 -0
  197. package/dist/utils/errors.d.ts.map +1 -0
  198. package/dist/utils/health-checker.d.ts +34 -0
  199. package/dist/utils/health-checker.d.ts.map +1 -0
  200. package/dist/utils/json-logger.d.ts +23 -0
  201. package/dist/utils/json-logger.d.ts.map +1 -0
  202. package/dist/utils/log-formatter.d.ts +85 -0
  203. package/dist/utils/log-formatter.d.ts.map +1 -0
  204. package/dist/utils/log-formatter.js +39 -11
  205. package/dist/utils/logger.d.ts +34 -0
  206. package/dist/utils/logger.d.ts.map +1 -0
  207. package/dist/utils/network-utils.d.ts +56 -0
  208. package/dist/utils/network-utils.d.ts.map +1 -0
  209. package/dist/utils/output.d.ts +73 -0
  210. package/dist/utils/output.d.ts.map +1 -0
  211. package/dist/utils/passwordValidation.d.ts +32 -0
  212. package/dist/utils/passwordValidation.d.ts.map +1 -0
  213. package/dist/utils/progress.d.ts +74 -0
  214. package/dist/utils/progress.d.ts.map +1 -0
  215. package/dist/utils/sudo-checker.d.ts +9 -0
  216. package/dist/utils/sudo-checker.d.ts.map +1 -0
  217. package/dist/utils/urls.d.ts +19 -0
  218. package/dist/utils/urls.d.ts.map +1 -0
  219. package/dist/utils/urls.js +3 -3
  220. package/dist/utils/validation.d.ts +19 -0
  221. package/dist/utils/validation.d.ts.map +1 -0
  222. package/dist/validation/schemas.d.ts +197 -0
  223. package/dist/validation/schemas.d.ts.map +1 -0
  224. package/dist/validation/schemas.js +1 -1
  225. package/dist/validation/validator.d.ts +22 -0
  226. package/dist/validation/validator.d.ts.map +1 -0
  227. package/package.json +8 -3
  228. package/recipes/compose/open-webui/docker-compose.yml +17 -0
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Utility functions for parsing and formatting logs
3
+ * Supports both systemd journalctl format and pure JSON lines (launchd)
4
+ */
5
+ export interface ParsedLogEntry {
6
+ timestamp: string;
7
+ level: string;
8
+ module: string;
9
+ message: string;
10
+ service: string;
11
+ [key: string]: unknown;
12
+ }
13
+ /**
14
+ * Parse a single log line to extract JSON log entry
15
+ * Handles two formats:
16
+ * 1. Pure JSON lines (launchd): "{json}"
17
+ * 2. Systemd journal format: "timestamp hostname process: {json}"
18
+ * Example: "Nov 15 23:41:22 hostname node[123]: {\"timestamp\":...}"
19
+ */
20
+ export declare function parseJournalctlLine(line: string): ParsedLogEntry | null;
21
+ /**
22
+ * Parse log output to extract JSON log entries
23
+ * Handles two formats:
24
+ * 1. Pure JSON lines (launchd): one JSON object per line
25
+ * 2. Systemd journal format: "timestamp hostname process: {json}"
26
+ */
27
+ export declare function parseJournalctlOutput(rawLogs: string): ParsedLogEntry[];
28
+ /**
29
+ * Format a single log entry with colors
30
+ */
31
+ export declare function formatLogEntryColored(entry: ParsedLogEntry, singleLine?: boolean): string;
32
+ /**
33
+ * Format log entries as single-line JSON (one per line)
34
+ */
35
+ export declare function formatLogEntries(entries: ParsedLogEntry[]): string;
36
+ /**
37
+ * Format log entries with colors
38
+ */
39
+ export declare function formatLogEntriesColored(entries: ParsedLogEntry[], singleLine?: boolean): string;
40
+ /**
41
+ * Format a single log entry as single-line JSON
42
+ */
43
+ export declare function formatLogEntry(entry: ParsedLogEntry): string;
44
+ /**
45
+ * Filter log entries by level
46
+ * When filtering by a specific level, shows that level and all more severe levels above it
47
+ * - error: shows only error
48
+ * - warn: shows error and warn
49
+ * - info: shows error, warn, and info
50
+ * - debug: shows error, warn, info, and debug
51
+ * - all: shows everything (no filtering)
52
+ */
53
+ export declare function filterByLevel(entries: ParsedLogEntry[], level: string | undefined): ParsedLogEntry[];
54
+ /**
55
+ * Filter log entries by module(s) - supports comma-separated list
56
+ */
57
+ export declare function filterByModule(entries: ParsedLogEntry[], module: string | undefined): ParsedLogEntry[];
58
+ /**
59
+ * Check if a log entry matches the level filter
60
+ * When filtering by a specific level, shows that level and all more severe levels above it
61
+ */
62
+ export declare function matchesLevel(entry: ParsedLogEntry, level: string | undefined): boolean;
63
+ /**
64
+ * Check if a log entry matches the module filter(s) - supports comma-separated list
65
+ */
66
+ export declare function matchesModule(entry: ParsedLogEntry, module: string | undefined): boolean;
67
+ /**
68
+ * Parse, filter (if needed), and format journalctl logs
69
+ */
70
+ export declare function processLogs(rawLogs: string, options?: {
71
+ module?: string;
72
+ level?: string;
73
+ colored?: boolean;
74
+ singleLine?: boolean;
75
+ }): string;
76
+ /**
77
+ * Process logs line by line (for streaming/follow mode)
78
+ */
79
+ export declare function processLogLine(line: string, options?: {
80
+ module?: string;
81
+ level?: string;
82
+ colored?: boolean;
83
+ singleLine?: boolean;
84
+ }): string | null;
85
+ //# sourceMappingURL=log-formatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-formatter.d.ts","sourceRoot":"","sources":["../../src/utils/log-formatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAiDvE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAYvE;AA+CD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,GAAE,OAAe,GAAG,MAAM,CAgChG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAElE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,GAAE,OAAe,GAAG,MAAM,CAEtG;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,EAAE,CA+BpG;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,EAAE,CAYtG;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CA4BtF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAUxF;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,MAAM,GAAG,IAAI,CAqBf"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
- * Utility functions for parsing and formatting journalctl logs
3
+ * Utility functions for parsing and formatting logs
4
+ * Supports both systemd journalctl format and pure JSON lines (launchd)
4
5
  */
5
6
  var __importDefault = (this && this.__importDefault) || function (mod) {
6
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -20,16 +21,29 @@ exports.processLogs = processLogs;
20
21
  exports.processLogLine = processLogLine;
21
22
  const chalk_1 = __importDefault(require("chalk"));
22
23
  /**
23
- * Parse a single journalctl line to extract JSON log entry
24
- * Handles systemd journal format: "timestamp hostname process: {json}"
24
+ * Parse a single log line to extract JSON log entry
25
+ * Handles two formats:
26
+ * 1. Pure JSON lines (launchd): "{json}"
27
+ * 2. Systemd journal format: "timestamp hostname process: {json}"
25
28
  * Example: "Nov 15 23:41:22 hostname node[123]: {\"timestamp\":...}"
26
29
  */
27
30
  function parseJournalctlLine(line) {
28
31
  if (!line.trim()) {
29
32
  return null;
30
33
  }
34
+ // First, try to parse as pure JSON (for launchd logs)
35
+ const trimmed = line.trim();
36
+ if (trimmed.startsWith('{')) {
37
+ try {
38
+ const parsed = JSON.parse(trimmed);
39
+ return parsed;
40
+ }
41
+ catch (error) {
42
+ // Not valid JSON, continue to journalctl format parsing
43
+ }
44
+ }
45
+ // If not pure JSON, try journalctl format: "timestamp hostname process: {json}"
31
46
  // Find the JSON part - look for the pattern ": {" which separates the systemd prefix from JSON
32
- // We need to find the last colon before a '{' to handle timestamps that contain colons
33
47
  const jsonStartIndex = line.indexOf(': {');
34
48
  if (jsonStartIndex === -1) {
35
49
  // Try to find just a colon followed by whitespace and then {
@@ -63,8 +77,10 @@ function parseJournalctlLine(line) {
63
77
  }
64
78
  }
65
79
  /**
66
- * Parse journalctl output to extract JSON log entries
67
- * Handles systemd journal format: "timestamp hostname process: {json}"
80
+ * Parse log output to extract JSON log entries
81
+ * Handles two formats:
82
+ * 1. Pure JSON lines (launchd): one JSON object per line
83
+ * 2. Systemd journal format: "timestamp hostname process: {json}"
68
84
  */
69
85
  function parseJournalctlOutput(rawLogs) {
70
86
  const lines = rawLogs.split('\n');
@@ -81,6 +97,9 @@ function parseJournalctlOutput(rawLogs) {
81
97
  * Get color for log level
82
98
  */
83
99
  function getLevelColor(level) {
100
+ if (!level) {
101
+ return chalk_1.default.whiteBright;
102
+ }
84
103
  const levelUpper = level.toUpperCase();
85
104
  switch (levelUpper) {
86
105
  case 'ERROR':
@@ -99,6 +118,9 @@ function getLevelColor(level) {
99
118
  * Get color for module name
100
119
  */
101
120
  function getModuleColor(module) {
121
+ if (!module) {
122
+ return chalk_1.default.whiteBright.bold;
123
+ }
102
124
  // Use vibrant, punchy colors for modules
103
125
  const moduleColors = {
104
126
  'agent': chalk_1.default.blueBright.bold,
@@ -123,11 +145,11 @@ function formatLogEntryColored(entry, singleLine = false) {
123
145
  const timestamp = entry.timestamp ? new Date(entry.timestamp).toLocaleString() : '';
124
146
  const timestampStr = chalk_1.default.gray.dim(timestamp);
125
147
  // Format level with color
126
- const levelStr = levelColor(`[${entry.level.toUpperCase().padEnd(5)}]`);
148
+ const levelStr = levelColor(`[${(entry.level || 'UNKNOWN').toUpperCase().padEnd(5)}]`);
127
149
  // Format module with color
128
- const moduleStr = moduleColor(`[${entry.module}]`);
150
+ const moduleStr = moduleColor(`[${entry.module || 'unknown'}]`);
129
151
  // Format message
130
- const messageStr = chalk_1.default.whiteBright(entry.message);
152
+ const messageStr = chalk_1.default.whiteBright(entry.message || '');
131
153
  // Build the formatted line
132
154
  let formatted = `${timestampStr} ${levelStr} ${moduleStr} ${messageStr}`;
133
155
  // Add data if present and not in single-line mode
@@ -169,7 +191,7 @@ function formatLogEntry(entry) {
169
191
  * - all: shows everything (no filtering)
170
192
  */
171
193
  function filterByLevel(entries, level) {
172
- if (level === 'all') {
194
+ if (!level || level === 'all') {
173
195
  return entries;
174
196
  }
175
197
  const levelUpper = level.toUpperCase();
@@ -201,6 +223,9 @@ function filterByLevel(entries, level) {
201
223
  * Filter log entries by module(s) - supports comma-separated list
202
224
  */
203
225
  function filterByModule(entries, module) {
226
+ if (!module) {
227
+ return entries;
228
+ }
204
229
  const modules = module.split(',').map(m => m.trim().toLowerCase()).filter(m => m.length > 0);
205
230
  if (modules.length === 0) {
206
231
  return entries;
@@ -215,7 +240,7 @@ function filterByModule(entries, module) {
215
240
  * When filtering by a specific level, shows that level and all more severe levels above it
216
241
  */
217
242
  function matchesLevel(entry, level) {
218
- if (level === 'all') {
243
+ if (!level || level === 'all') {
219
244
  return true;
220
245
  }
221
246
  const levelUpper = level.toUpperCase();
@@ -243,6 +268,9 @@ function matchesLevel(entry, level) {
243
268
  * Check if a log entry matches the module filter(s) - supports comma-separated list
244
269
  */
245
270
  function matchesModule(entry, module) {
271
+ if (!module) {
272
+ return true;
273
+ }
246
274
  const modules = module.split(',').map(m => m.trim().toLowerCase()).filter(m => m.length > 0);
247
275
  if (modules.length === 0) {
248
276
  return true;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Logger interface for abstracting logging operations
3
+ * Allows for different implementations (console, JSON, file, etc.)
4
+ */
5
+ export declare enum LogLevel {
6
+ DEBUG = 0,
7
+ INFO = 1,
8
+ WARN = 2,
9
+ ERROR = 3,
10
+ NONE = 4
11
+ }
12
+ export interface Logger {
13
+ debug(message: string, ...args: unknown[]): void;
14
+ info(message: string, ...args: unknown[]): void;
15
+ warn(message: string, ...args: unknown[]): void;
16
+ error(message: string, ...args: unknown[]): void;
17
+ setLevel(level: LogLevel): void;
18
+ getLevel(): LogLevel;
19
+ }
20
+ export interface LogEntry {
21
+ timestamp: Date;
22
+ level: LogLevel;
23
+ message: string;
24
+ args: unknown[];
25
+ }
26
+ /**
27
+ * Get log level from string
28
+ */
29
+ export declare function parseLogLevel(level: string): LogLevel;
30
+ /**
31
+ * Get log level name
32
+ */
33
+ export declare function getLogLevelName(level: LogLevel): string;
34
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;CACT;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,QAAQ,IAAI,QAAQ,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAkBrD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAevD"}
@@ -0,0 +1,56 @@
1
+ export declare class NetworkUtils {
2
+ /**
3
+ * Test TCP port connectivity
4
+ */
5
+ static testTcpPort(host: string, port: number, timeout?: number): Promise<{
6
+ success: boolean;
7
+ latency?: number;
8
+ error?: string;
9
+ }>;
10
+ /**
11
+ * Test UDP port connectivity (basic check)
12
+ */
13
+ static testUdpPort(host: string, port: number, timeout?: number): Promise<{
14
+ success: boolean;
15
+ latency?: number;
16
+ error?: string;
17
+ }>;
18
+ /**
19
+ * Resolve hostname to IP address
20
+ */
21
+ static resolveHostname(hostname: string): Promise<{
22
+ success: boolean;
23
+ ip?: string;
24
+ error?: string;
25
+ }>;
26
+ /**
27
+ * Check if a port is available locally
28
+ */
29
+ static isPortAvailable(port: number, host?: string): Promise<boolean>;
30
+ /**
31
+ * Get local IP addresses
32
+ */
33
+ static getLocalIPs(): string[];
34
+ /**
35
+ * Format network error messages for user-friendly display
36
+ */
37
+ static formatNetworkError(error: string): string;
38
+ /**
39
+ * Validate IP address format
40
+ */
41
+ static isValidIP(ip: string): boolean;
42
+ /**
43
+ * Validate port number
44
+ */
45
+ static isValidPort(port: number): boolean;
46
+ /**
47
+ * Generate network diagnostic information
48
+ */
49
+ static generateNetworkDiagnostics(host: string, port: number): Promise<{
50
+ dnsResolution: boolean;
51
+ portConnectivity: boolean;
52
+ localIPs: string[];
53
+ error?: string;
54
+ }>;
55
+ }
56
+ //# sourceMappingURL=network-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-utils.d.ts","sourceRoot":"","sources":["../../src/utils/network-utils.ts"],"names":[],"mappings":"AAMA,qBAAa,YAAY;IACvB;;OAEG;WACU,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAa,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAsC7I;;OAEG;WACU,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAa,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAwC7I;;OAEG;WACU,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAe1G;;OAEG;WACU,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBxF;;OAEG;IACH,MAAM,CAAC,WAAW,IAAI,MAAM,EAAE;IAe9B;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAmBhD;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAMrC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIzC;;OAEG;WACU,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAC3E,aAAa,EAAE,OAAO,CAAC;QACvB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CAYH"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Configuration for output formatting
3
+ */
4
+ declare class OutputConfig {
5
+ colorEnabled: boolean;
6
+ plainMode: boolean;
7
+ emojiEnabled: boolean;
8
+ setNoColor(): void;
9
+ setPlainMode(): void;
10
+ reset(): void;
11
+ }
12
+ export declare const outputConfig: OutputConfig;
13
+ /**
14
+ * Format success message
15
+ */
16
+ export declare function success(message: string): string;
17
+ /**
18
+ * Format error message
19
+ */
20
+ export declare function error(message: string): string;
21
+ /**
22
+ * Format warning message
23
+ */
24
+ export declare function warning(message: string): string;
25
+ /**
26
+ * Format info message
27
+ */
28
+ export declare function info(message: string): string;
29
+ /**
30
+ * Format gray message
31
+ */
32
+ export declare function gray(message: string): string;
33
+ /**
34
+ * Format cyan message
35
+ */
36
+ export declare function cyan(message: string): string;
37
+ /**
38
+ * Format white message
39
+ */
40
+ export declare function white(message: string): string;
41
+ /**
42
+ * Format heading
43
+ */
44
+ export declare function heading(message: string): string;
45
+ /**
46
+ * Format section header
47
+ */
48
+ export declare function section(title: string): string;
49
+ /**
50
+ * Format field label and value
51
+ */
52
+ export declare function field(label: string, value: string, highlight?: boolean): string;
53
+ /**
54
+ * Output structured data as formatted text
55
+ */
56
+ export declare function formatOutput(data: Record<string, any>): string[];
57
+ /**
58
+ * Output JSON
59
+ */
60
+ export declare function outputJSON(data: any): void;
61
+ /**
62
+ * Detect if color should be enabled
63
+ */
64
+ export declare function detectColorSupport(): boolean;
65
+ /**
66
+ * Apply global output configuration based on flags
67
+ */
68
+ export declare function applyOutputConfig(flags: {
69
+ noColor?: boolean;
70
+ plain?: boolean;
71
+ }): void;
72
+ export {};
73
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,cAAM,YAAY;IACT,YAAY,EAAE,OAAO,CAAQ;IAC7B,SAAS,EAAE,OAAO,CAAS;IAC3B,YAAY,EAAE,OAAO,CAAQ;IAEpC,UAAU,IAAI,IAAI;IAMlB,YAAY,IAAI,IAAI;IAMpB,KAAK,IAAI,IAAI;CAKd;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,GAAE,OAAe,GAAG,MAAM,CAYtF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EAAE,CAEhE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAiB5C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAQrF"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Password validation utility for Cognito requirements
3
+ * Based on AWS Cognito password policy requirements
4
+ */
5
+ export interface PasswordValidationResult {
6
+ isValid: boolean;
7
+ errors: string[];
8
+ }
9
+ /**
10
+ * Validates password against Cognito password policy requirements
11
+ * @param password - Password to validate
12
+ * @returns PasswordValidationResult with validation status and errors
13
+ */
14
+ export declare function validateCognitoPassword(password: string): PasswordValidationResult;
15
+ /**
16
+ * Generates a secure password that meets Cognito requirements
17
+ * @returns A secure password string
18
+ */
19
+ export declare function generateSecurePassword(): string;
20
+ /**
21
+ * Validates email format
22
+ * @param email - Email to validate
23
+ * @returns boolean indicating if email is valid
24
+ */
25
+ export declare function validateEmail(email: string): boolean;
26
+ /**
27
+ * Determines if input is an email or device ID
28
+ * @param input - Input to check
29
+ * @returns boolean indicating if input is an email
30
+ */
31
+ export declare function isEmail(input: string): boolean;
32
+ //# sourceMappingURL=passwordValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passwordValidation.d.ts","sourceRoot":"","sources":["../../src/utils/passwordValidation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,wBAAwB,CA0ClF;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAqB/C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE9C"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Simple spinner implementation for progress indication
3
+ */
4
+ export declare class Spinner {
5
+ private interval;
6
+ private frames;
7
+ private currentFrame;
8
+ private message;
9
+ private startTime;
10
+ constructor(message: string);
11
+ /**
12
+ * Start the spinner
13
+ */
14
+ start(): void;
15
+ /**
16
+ * Update the spinner message
17
+ */
18
+ update(message: string): void;
19
+ /**
20
+ * Stop the spinner with success message
21
+ */
22
+ succeed(message?: string): void;
23
+ /**
24
+ * Stop the spinner with failure message
25
+ */
26
+ fail(message?: string): void;
27
+ /**
28
+ * Stop the spinner with info message
29
+ */
30
+ info(message?: string): void;
31
+ /**
32
+ * Stop the spinner without any message
33
+ */
34
+ stop(): void;
35
+ /**
36
+ * Get elapsed time in milliseconds
37
+ */
38
+ elapsed(): number;
39
+ }
40
+ /**
41
+ * Create and start a new spinner
42
+ */
43
+ export declare function spinner(message: string): Spinner;
44
+ /**
45
+ * Progress bar implementation
46
+ */
47
+ export declare class ProgressBar {
48
+ private total;
49
+ private current;
50
+ private width;
51
+ private message;
52
+ constructor(total: number, filled?: number, message?: string);
53
+ /**
54
+ * Update progress and render
55
+ */
56
+ update(current: number): void;
57
+ /**
58
+ * Increment progress and render
59
+ */
60
+ increment(amount?: number): void;
61
+ /**
62
+ * Render the progress bar
63
+ */
64
+ render(): void;
65
+ /**
66
+ * Complete the progress bar
67
+ */
68
+ complete(message?: string): void;
69
+ }
70
+ /**
71
+ * Create a new progress bar
72
+ */
73
+ export declare function progressBar(total: number, message?: string): ProgressBar;
74
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/utils/progress.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,MAAM,CAAgE;IAC9E,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAO;gBAEZ,OAAO,EAAE,MAAM;IAK3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAmBb;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAS/B;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAS5B;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAS5B;;OAEG;IACH,IAAI,IAAI,IAAI;IAQZ;;OAEG;IACH,OAAO,IAAI,MAAM;CAGlB;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAIhD;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAS;gBAEZ,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,MAAU,EAAE,OAAO,GAAE,MAAW;IAMnE;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK7B;;OAEG;IACH,SAAS,CAAC,MAAM,GAAE,MAAU,GAAG,IAAI;IAKnC;;OAEG;IACH,MAAM,IAAI,IAAI;IAgBd;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;CAQjC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,MAAW,GAAG,WAAW,CAE5E"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Utility to check if the current process is running with elevated permissions (sudo/root)
3
+ */
4
+ /**
5
+ * Check if the current process is running with elevated permissions
6
+ * @returns true if running as root/sudo, false otherwise
7
+ */
8
+ export declare function checkSudoPermissions(): boolean;
9
+ //# sourceMappingURL=sudo-checker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sudo-checker.d.ts","sourceRoot":"","sources":["../../src/utils/sudo-checker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAS9C"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * URL utilities for building stage-based URLs
3
+ */
4
+ /**
5
+ * Get the current stage from environment variables
6
+ * @returns Stage string (dev, staging, prod, or default 'prod')
7
+ */
8
+ export declare function getStage(): string;
9
+ /**
10
+ * Build the agent distribution URL based on stage
11
+ * @returns Distribution URL (e.g., https://distribution.prod.edgible.com)
12
+ */
13
+ export declare function getDistributionUrl(): string;
14
+ /**
15
+ * Build the API base URL based on stage
16
+ * @returns API URL (e.g., https://api.v2.prod.edgible.com)
17
+ */
18
+ export declare function getApiBaseUrl(): string;
19
+ //# sourceMappingURL=urls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../../src/utils/urls.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC"}
@@ -8,14 +8,14 @@ exports.getDistributionUrl = getDistributionUrl;
8
8
  exports.getApiBaseUrl = getApiBaseUrl;
9
9
  /**
10
10
  * Get the current stage from environment variables
11
- * @returns Stage string (dev, staging, production, or default 'production')
11
+ * @returns Stage string (dev, staging, prod, or default 'prod')
12
12
  */
13
13
  function getStage() {
14
14
  return process.env['STAGE'] || process.env['SST_STAGE'] || 'prod';
15
15
  }
16
16
  /**
17
17
  * Build the agent distribution URL based on stage
18
- * @returns Distribution URL (e.g., https://distribution.production.edgible.com)
18
+ * @returns Distribution URL (e.g., https://distribution.prod.edgible.com)
19
19
  */
20
20
  function getDistributionUrl() {
21
21
  const stage = getStage();
@@ -23,7 +23,7 @@ function getDistributionUrl() {
23
23
  }
24
24
  /**
25
25
  * Build the API base URL based on stage
26
- * @returns API URL (e.g., https://api.v2.production.edgible.com)
26
+ * @returns API URL (e.g., https://api.v2.prod.edgible.com)
27
27
  */
28
28
  function getApiBaseUrl() {
29
29
  const stage = getStage();
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Email validation utility
3
+ * @param email - Email address to validate
4
+ * @returns boolean indicating if email is valid
5
+ */
6
+ export declare function validateEmail(email: string): boolean;
7
+ /**
8
+ * Name validation utility
9
+ * @param name - Name to validate
10
+ * @returns boolean indicating if name is valid
11
+ */
12
+ export declare function validateName(name: string): boolean;
13
+ /**
14
+ * Determines if input is an email or device ID
15
+ * @param input - Input to check
16
+ * @returns boolean indicating if input is an email
17
+ */
18
+ export declare function isEmail(input: string): boolean;
19
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE9C"}