@interopio/iocd-cli 0.0.1

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 (297) hide show
  1. package/README.md +40 -0
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +96 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/apps.command.d.ts +3 -0
  7. package/dist/commands/apps.command.d.ts.map +1 -0
  8. package/dist/commands/apps.command.js +110 -0
  9. package/dist/commands/apps.command.js.map +1 -0
  10. package/dist/commands/components.command.d.ts +3 -0
  11. package/dist/commands/components.command.d.ts.map +1 -0
  12. package/dist/commands/components.command.js +116 -0
  13. package/dist/commands/components.command.js.map +1 -0
  14. package/dist/commands/create.command.d.ts +3 -0
  15. package/dist/commands/create.command.d.ts.map +1 -0
  16. package/dist/commands/create.command.js +19 -0
  17. package/dist/commands/create.command.js.map +1 -0
  18. package/dist/commands/dev.command.d.ts +4 -0
  19. package/dist/commands/dev.command.d.ts.map +1 -0
  20. package/dist/commands/dev.command.js +25 -0
  21. package/dist/commands/dev.command.js.map +1 -0
  22. package/dist/commands/installer.command.d.ts +3 -0
  23. package/dist/commands/installer.command.d.ts.map +1 -0
  24. package/dist/commands/installer.command.js +19 -0
  25. package/dist/commands/installer.command.js.map +1 -0
  26. package/dist/commands/license.command.d.ts +3 -0
  27. package/dist/commands/license.command.d.ts.map +1 -0
  28. package/dist/commands/license.command.js +23 -0
  29. package/dist/commands/license.command.js.map +1 -0
  30. package/dist/commands/modifications.command.d.ts +3 -0
  31. package/dist/commands/modifications.command.d.ts.map +1 -0
  32. package/dist/commands/modifications.command.js +28 -0
  33. package/dist/commands/modifications.command.js.map +1 -0
  34. package/dist/commands/setup.command.d.ts +4 -0
  35. package/dist/commands/setup.command.d.ts.map +1 -0
  36. package/dist/commands/setup.command.js +34 -0
  37. package/dist/commands/setup.command.js.map +1 -0
  38. package/dist/services/app-builder.service.d.ts +2 -0
  39. package/dist/services/app-builder.service.d.ts.map +1 -0
  40. package/dist/services/app-builder.service.js +3 -0
  41. package/dist/services/app-builder.service.js.map +1 -0
  42. package/dist/services/app.service.d.ts +74 -0
  43. package/dist/services/app.service.d.ts.map +1 -0
  44. package/dist/services/app.service.js +328 -0
  45. package/dist/services/app.service.js.map +1 -0
  46. package/dist/services/components/component.config.d.ts +11 -0
  47. package/dist/services/components/component.config.d.ts.map +1 -0
  48. package/dist/services/components/component.config.js +101 -0
  49. package/dist/services/components/component.config.js.map +1 -0
  50. package/dist/services/components/component.d.ts +12 -0
  51. package/dist/services/components/component.d.ts.map +1 -0
  52. package/dist/services/components/component.js +3 -0
  53. package/dist/services/components/component.js.map +1 -0
  54. package/dist/services/components/components.registry.d.ts +40 -0
  55. package/dist/services/components/components.registry.d.ts.map +1 -0
  56. package/dist/services/components/components.registry.js +72 -0
  57. package/dist/services/components/components.registry.js.map +1 -0
  58. package/dist/services/components/components.service.d.ts +20 -0
  59. package/dist/services/components/components.service.d.ts.map +1 -0
  60. package/dist/services/components/components.service.js +171 -0
  61. package/dist/services/components/components.service.js.map +1 -0
  62. package/dist/services/components/file.helper.d.ts +12 -0
  63. package/dist/services/components/file.helper.d.ts.map +1 -0
  64. package/dist/services/components/file.helper.js +124 -0
  65. package/dist/services/components/file.helper.js.map +1 -0
  66. package/dist/services/components/platform.utils.d.ts +72 -0
  67. package/dist/services/components/platform.utils.d.ts.map +1 -0
  68. package/dist/services/components/platform.utils.js +156 -0
  69. package/dist/services/components/platform.utils.js.map +1 -0
  70. package/dist/services/components/stores/github.store.d.ts +35 -0
  71. package/dist/services/components/stores/github.store.d.ts.map +1 -0
  72. package/dist/services/components/stores/github.store.js +157 -0
  73. package/dist/services/components/stores/github.store.js.map +1 -0
  74. package/dist/services/components/stores/local.store.d.ts +69 -0
  75. package/dist/services/components/stores/local.store.d.ts.map +1 -0
  76. package/dist/services/components/stores/local.store.js +300 -0
  77. package/dist/services/components/stores/local.store.js.map +1 -0
  78. package/dist/services/components/stores/s3.store.d.ts +98 -0
  79. package/dist/services/components/stores/s3.store.d.ts.map +1 -0
  80. package/dist/services/components/stores/s3.store.js +368 -0
  81. package/dist/services/components/stores/s3.store.js.map +1 -0
  82. package/dist/services/components/stores/store.d.ts +11 -0
  83. package/dist/services/components/stores/store.d.ts.map +1 -0
  84. package/dist/services/components/stores/store.js +3 -0
  85. package/dist/services/components/stores/store.js.map +1 -0
  86. package/dist/services/config/cli.config.d.ts +57 -0
  87. package/dist/services/config/cli.config.d.ts.map +1 -0
  88. package/dist/services/config/cli.config.js +3 -0
  89. package/dist/services/config/cli.config.js.map +1 -0
  90. package/dist/services/config/config.service.d.ts +14 -0
  91. package/dist/services/config/config.service.d.ts.map +1 -0
  92. package/dist/services/config/config.service.js +170 -0
  93. package/dist/services/config/config.service.js.map +1 -0
  94. package/dist/services/create.service.d.ts +58 -0
  95. package/dist/services/create.service.d.ts.map +1 -0
  96. package/dist/services/create.service.js +318 -0
  97. package/dist/services/create.service.js.map +1 -0
  98. package/dist/services/dev.service.d.ts +2 -0
  99. package/dist/services/dev.service.d.ts.map +1 -0
  100. package/dist/services/dev.service.js +78 -0
  101. package/dist/services/dev.service.js.map +1 -0
  102. package/dist/services/installer/electronBuilder.d.ts +2 -0
  103. package/dist/services/installer/electronBuilder.d.ts.map +1 -0
  104. package/dist/services/installer/electronBuilder.js +3 -0
  105. package/dist/services/installer/electronBuilder.js.map +1 -0
  106. package/dist/services/installer/electronForge.d.ts +2 -0
  107. package/dist/services/installer/electronForge.d.ts.map +1 -0
  108. package/dist/services/installer/electronForge.js +248 -0
  109. package/dist/services/installer/electronForge.js.map +1 -0
  110. package/dist/services/installer/installer.service.d.ts +5 -0
  111. package/dist/services/installer/installer.service.d.ts.map +1 -0
  112. package/dist/services/installer/installer.service.js +101 -0
  113. package/dist/services/installer/installer.service.js.map +1 -0
  114. package/dist/services/installer/macOS.helper.d.ts +3 -0
  115. package/dist/services/installer/macOS.helper.d.ts.map +1 -0
  116. package/dist/services/installer/macOS.helper.js +244 -0
  117. package/dist/services/installer/macOS.helper.js.map +1 -0
  118. package/dist/services/installer/prerequisites.d.ts +2 -0
  119. package/dist/services/installer/prerequisites.d.ts.map +1 -0
  120. package/dist/services/installer/prerequisites.js +73 -0
  121. package/dist/services/installer/prerequisites.js.map +1 -0
  122. package/dist/services/installer/windows.helper.d.ts +10 -0
  123. package/dist/services/installer/windows.helper.d.ts.map +1 -0
  124. package/dist/services/installer/windows.helper.js +394 -0
  125. package/dist/services/installer/windows.helper.js.map +1 -0
  126. package/dist/services/license.service.d.ts +7 -0
  127. package/dist/services/license.service.d.ts.map +1 -0
  128. package/dist/services/license.service.js +14 -0
  129. package/dist/services/license.service.js.map +1 -0
  130. package/dist/services/modifications/macOS.helper.d.ts +13 -0
  131. package/dist/services/modifications/macOS.helper.d.ts.map +1 -0
  132. package/dist/services/modifications/macOS.helper.js +274 -0
  133. package/dist/services/modifications/macOS.helper.js.map +1 -0
  134. package/dist/services/modifications/modifications.service.d.ts +2 -0
  135. package/dist/services/modifications/modifications.service.d.ts.map +1 -0
  136. package/dist/services/modifications/modifications.service.js +376 -0
  137. package/dist/services/modifications/modifications.service.js.map +1 -0
  138. package/dist/services/modifications/windows.helper.d.ts +2 -0
  139. package/dist/services/modifications/windows.helper.d.ts.map +1 -0
  140. package/dist/services/modifications/windows.helper.js +83 -0
  141. package/dist/services/modifications/windows.helper.js.map +1 -0
  142. package/dist/services/template.service.d.ts +116 -0
  143. package/dist/services/template.service.d.ts.map +1 -0
  144. package/dist/services/template.service.js +354 -0
  145. package/dist/services/template.service.js.map +1 -0
  146. package/dist/templates/auto-tests/README.md +31 -0
  147. package/dist/templates/auto-tests/playwright.config.js +19 -0
  148. package/dist/templates/auto-tests/template.json +12 -0
  149. package/dist/templates/auto-tests/tests/basic.test.js +15 -0
  150. package/dist/templates/ioconnect-desktop/.env.example +29 -0
  151. package/dist/templates/ioconnect-desktop/.github/workflows/build-installers.yml +170 -0
  152. package/dist/templates/ioconnect-desktop/LICENSE +0 -0
  153. package/dist/templates/ioconnect-desktop/README.md +0 -0
  154. package/dist/templates/ioconnect-desktop/config/mac-build/entitlements.mac.plist +44 -0
  155. package/dist/templates/ioconnect-desktop/config/win-build/template.nuspectemplate +33 -0
  156. package/dist/templates/ioconnect-desktop/forge.config.js +47 -0
  157. package/dist/templates/ioconnect-desktop/iocd.cli.config.json +45 -0
  158. package/dist/templates/ioconnect-desktop/modifications/iocd/assets/images/logo.icns +0 -0
  159. package/dist/templates/ioconnect-desktop/modifications/iocd/assets/images/logo.ico +0 -0
  160. package/dist/templates/ioconnect-desktop/modifications/iocd/assets/images/logo.png +0 -0
  161. package/dist/templates/ioconnect-desktop/modifications/iocd/config/system.json.merge +3 -0
  162. package/dist/templates/ioconnect-desktop/package.json +43 -0
  163. package/dist/templates/ioconnect-desktop/template.json +7 -0
  164. package/dist/templates/launchpad/apps/launchpad/.eslintrc.json +3 -0
  165. package/dist/templates/launchpad/apps/launchpad/config/iocd.app.def.dev.json +57 -0
  166. package/dist/templates/launchpad/apps/launchpad/config/iocd.app.def.prod.json +2 -0
  167. package/dist/templates/launchpad/apps/launchpad/config/iocd.system.dev.json +3 -0
  168. package/dist/templates/launchpad/apps/launchpad/config/iocd.system.prod.json +3 -0
  169. package/dist/templates/launchpad/apps/launchpad/index.html +16 -0
  170. package/dist/templates/launchpad/apps/launchpad/iocd.app.json +32 -0
  171. package/dist/templates/launchpad/apps/launchpad/package-lock.json +2778 -0
  172. package/dist/templates/launchpad/apps/launchpad/package.json +21 -0
  173. package/dist/templates/launchpad/apps/launchpad/public/favicon.ico +0 -0
  174. package/dist/templates/launchpad/apps/launchpad/src/app/app.tsx +39 -0
  175. package/dist/templates/launchpad/apps/launchpad/src/app/constants.ts +27 -0
  176. package/dist/templates/launchpad/apps/launchpad/src/components/logo.tsx +11 -0
  177. package/dist/templates/launchpad/apps/launchpad/src/components/main-context-menu.tsx +162 -0
  178. package/dist/templates/launchpad/apps/launchpad/src/components/notifications-button.tsx +44 -0
  179. package/dist/templates/launchpad/apps/launchpad/src/main.tsx +6 -0
  180. package/dist/templates/launchpad/apps/launchpad/src/styles.css +17 -0
  181. package/dist/templates/launchpad/apps/launchpad/tsconfig.json +10 -0
  182. package/dist/templates/launchpad/apps/launchpad/vite.config.ts +13 -0
  183. package/dist/templates/launchpad/template.json +12 -0
  184. package/dist/templates/splash-screen/apps/splash-screen/README.md +119 -0
  185. package/dist/templates/splash-screen/apps/splash-screen/config/system-dev.json +9 -0
  186. package/dist/templates/splash-screen/apps/splash-screen/config/system-prod.json +8 -0
  187. package/dist/templates/splash-screen/apps/splash-screen/index.html +55 -0
  188. package/dist/templates/splash-screen/apps/splash-screen/iocd.app.json +20 -0
  189. package/dist/templates/splash-screen/apps/splash-screen/package-lock.json +1059 -0
  190. package/dist/templates/splash-screen/apps/splash-screen/package.json +17 -0
  191. package/dist/templates/splash-screen/apps/splash-screen/public/assets/fonts/PTSans-Regular.ttf +0 -0
  192. package/dist/templates/splash-screen/apps/splash-screen/public/assets/images/logo-light.svg +85 -0
  193. package/dist/templates/splash-screen/apps/splash-screen/public/assets/images/splash-bg.png +0 -0
  194. package/dist/templates/splash-screen/apps/splash-screen/public/assets/styles/style.css +149 -0
  195. package/dist/templates/splash-screen/apps/splash-screen/public/assets/styles/style.css.map +1 -0
  196. package/dist/templates/splash-screen/apps/splash-screen/public/assets/styles/style.scss +90 -0
  197. package/dist/templates/splash-screen/apps/splash-screen/src/main.ts +93 -0
  198. package/dist/templates/splash-screen/apps/splash-screen/src/types.ts +28 -0
  199. package/dist/templates/splash-screen/apps/splash-screen/tsconfig.json +25 -0
  200. package/dist/templates/splash-screen/apps/splash-screen/vite.config.ts +27 -0
  201. package/dist/templates/splash-screen/template.json +12 -0
  202. package/dist/templates/web-groups/apps/web-groups/README.md +15 -0
  203. package/dist/templates/web-groups/apps/web-groups/config/web-group-dev.json +13 -0
  204. package/dist/templates/web-groups/apps/web-groups/config/web-group-prod.json +12 -0
  205. package/dist/templates/web-groups/apps/web-groups/index.html +18 -0
  206. package/dist/templates/web-groups/apps/web-groups/iocd.app.json +24 -0
  207. package/dist/templates/web-groups/apps/web-groups/package.json +28 -0
  208. package/dist/templates/web-groups/apps/web-groups/public/favicon.ico +0 -0
  209. package/dist/templates/web-groups/apps/web-groups/public/logo192.png +0 -0
  210. package/dist/templates/web-groups/apps/web-groups/public/logo512.png +0 -0
  211. package/dist/templates/web-groups/apps/web-groups/public/manifest.json +25 -0
  212. package/dist/templates/web-groups/apps/web-groups/public/robots.txt +3 -0
  213. package/dist/templates/web-groups/apps/web-groups/src/App.css +38 -0
  214. package/dist/templates/web-groups/apps/web-groups/src/App.tsx +11 -0
  215. package/dist/templates/web-groups/apps/web-groups/src/index.css +13 -0
  216. package/dist/templates/web-groups/apps/web-groups/src/index.tsx +25 -0
  217. package/dist/templates/web-groups/apps/web-groups/src/logo.svg +1 -0
  218. package/dist/templates/web-groups/apps/web-groups/src/reportWebVitals.ts +15 -0
  219. package/dist/templates/web-groups/apps/web-groups/tsconfig.json +26 -0
  220. package/dist/templates/web-groups/apps/web-groups/vite.config.ts +8 -0
  221. package/dist/templates/web-groups/template.json +12 -0
  222. package/dist/templates/workspaces/apps/workspaces/README.md +15 -0
  223. package/dist/templates/workspaces/apps/workspaces/config/workspaces-dev.json +21 -0
  224. package/dist/templates/workspaces/apps/workspaces/config/workspaces-prod.json +20 -0
  225. package/dist/templates/workspaces/apps/workspaces/index.html +17 -0
  226. package/dist/templates/workspaces/apps/workspaces/iocd.app.json +24 -0
  227. package/dist/templates/workspaces/apps/workspaces/package.json +29 -0
  228. package/dist/templates/workspaces/apps/workspaces/public/favicon.ico +0 -0
  229. package/dist/templates/workspaces/apps/workspaces/public/logo192.png +0 -0
  230. package/dist/templates/workspaces/apps/workspaces/public/logo512.png +0 -0
  231. package/dist/templates/workspaces/apps/workspaces/public/manifest.json +25 -0
  232. package/dist/templates/workspaces/apps/workspaces/public/robots.txt +3 -0
  233. package/dist/templates/workspaces/apps/workspaces/src/AddWindowButton.tsx +33 -0
  234. package/dist/templates/workspaces/apps/workspaces/src/AfterTabs.tsx +27 -0
  235. package/dist/templates/workspaces/apps/workspaces/src/App.css +38 -0
  236. package/dist/templates/workspaces/apps/workspaces/src/App.tsx +103 -0
  237. package/dist/templates/workspaces/apps/workspaces/src/GroupHeaderButtons.tsx +9 -0
  238. package/dist/templates/workspaces/apps/workspaces/src/index.css +4 -0
  239. package/dist/templates/workspaces/apps/workspaces/src/index.tsx +28 -0
  240. package/dist/templates/workspaces/apps/workspaces/src/logo.svg +7 -0
  241. package/dist/templates/workspaces/apps/workspaces/src/reportWebVitals.ts +15 -0
  242. package/dist/templates/workspaces/apps/workspaces/src/setupTests.ts +5 -0
  243. package/dist/templates/workspaces/apps/workspaces/src/useAddWindowButtonVisible.tsx +30 -0
  244. package/dist/templates/workspaces/apps/workspaces/tsconfig.json +26 -0
  245. package/dist/templates/workspaces/apps/workspaces/vite.config.ts +8 -0
  246. package/dist/templates/workspaces/template.json +12 -0
  247. package/dist/tools/rcedit-x64.exe +0 -0
  248. package/dist/utils/colors.d.ts +57 -0
  249. package/dist/utils/colors.d.ts.map +1 -0
  250. package/dist/utils/colors.js +151 -0
  251. package/dist/utils/colors.js.map +1 -0
  252. package/dist/utils/deep.merge.d.ts +5 -0
  253. package/dist/utils/deep.merge.d.ts.map +1 -0
  254. package/dist/utils/deep.merge.js +27 -0
  255. package/dist/utils/deep.merge.js.map +1 -0
  256. package/dist/utils/electron.builder.config.helper.d.ts +6 -0
  257. package/dist/utils/electron.builder.config.helper.d.ts.map +1 -0
  258. package/dist/utils/electron.builder.config.helper.js +25 -0
  259. package/dist/utils/electron.builder.config.helper.js.map +1 -0
  260. package/dist/utils/ensure.iocd.exists.d.ts +2 -0
  261. package/dist/utils/ensure.iocd.exists.d.ts.map +1 -0
  262. package/dist/utils/ensure.iocd.exists.js +27 -0
  263. package/dist/utils/ensure.iocd.exists.js.map +1 -0
  264. package/dist/utils/error.handler.d.ts +30 -0
  265. package/dist/utils/error.handler.d.ts.map +1 -0
  266. package/dist/utils/error.handler.js +104 -0
  267. package/dist/utils/error.handler.js.map +1 -0
  268. package/dist/utils/file.d.ts +10 -0
  269. package/dist/utils/file.d.ts.map +1 -0
  270. package/dist/utils/file.js +40 -0
  271. package/dist/utils/file.js.map +1 -0
  272. package/dist/utils/find.package.dir.d.ts +2 -0
  273. package/dist/utils/find.package.dir.d.ts.map +1 -0
  274. package/dist/utils/find.package.dir.js +23 -0
  275. package/dist/utils/find.package.dir.js.map +1 -0
  276. package/dist/utils/logger.d.ts +19 -0
  277. package/dist/utils/logger.d.ts.map +1 -0
  278. package/dist/utils/logger.js +184 -0
  279. package/dist/utils/logger.js.map +1 -0
  280. package/dist/utils/nextSteps.d.ts +2 -0
  281. package/dist/utils/nextSteps.d.ts.map +1 -0
  282. package/dist/utils/nextSteps.js +44 -0
  283. package/dist/utils/nextSteps.js.map +1 -0
  284. package/dist/utils/pacakge.json.helper.d.ts +9 -0
  285. package/dist/utils/pacakge.json.helper.d.ts.map +1 -0
  286. package/dist/utils/pacakge.json.helper.js +71 -0
  287. package/dist/utils/pacakge.json.helper.js.map +1 -0
  288. package/dist/utils/path.d.ts +19 -0
  289. package/dist/utils/path.d.ts.map +1 -0
  290. package/dist/utils/path.js +81 -0
  291. package/dist/utils/path.js.map +1 -0
  292. package/dist/utils/version.d.ts +2 -0
  293. package/dist/utils/version.d.ts.map +1 -0
  294. package/dist/utils/version.js +16 -0
  295. package/dist/utils/version.js.map +1 -0
  296. package/package.json +69 -0
  297. package/tools/rcedit-x64.exe +0 -0
@@ -0,0 +1,30 @@
1
+ import { IOConnectDesktop } from "@interopio/desktop";
2
+ import { IOConnectWorkspaces } from "@interopio/workspaces-api";
3
+ import { useEffect, useState } from "react";
4
+
5
+ declare const window: Window & { io: IOConnectDesktop.API };
6
+
7
+ export function useAddWindowButtonVisible(workspaceId: string, groupId: string) {
8
+ const [visible, setVisible] = useState(true);
9
+ useEffect(() => {
10
+ let groupLockConfigUnsub: IOConnectWorkspaces.Unsubscribe = () => { };
11
+ (async () => {
12
+ const workspace = await window.io.workspaces!.getWorkspaceById(workspaceId);
13
+ const group = workspace.getAllGroups().find(g => g.id === groupId);
14
+
15
+ if (!group) {
16
+ return;
17
+ }
18
+
19
+ groupLockConfigUnsub = await group.onLockConfigurationChanged((lockConfig) => {
20
+ setVisible(lockConfig.showAddWindowButton!);
21
+ });
22
+
23
+ setVisible(!!group.showAddWindowButton);
24
+ })();
25
+
26
+ return groupLockConfigUnsub;
27
+ }, [workspaceId, groupId]);
28
+
29
+ return visible;
30
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "allowJs": true,
10
+ "skipLibCheck": true,
11
+ "esModuleInterop": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "strict": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "module": "esnext",
17
+ "moduleResolution": "node",
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "noEmit": true,
21
+ "jsx": "react-jsx"
22
+ },
23
+ "include": [
24
+ "src"
25
+ ]
26
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // https://vite.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ base: './'
8
+ })
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "workspaces",
3
+ "displayName": "Workspaces App",
4
+ "description": "Adds custom workspaces application support to io.Connect Desktop",
5
+ "version": "1.0.0",
6
+ "type": "application",
7
+ "setupUI": {
8
+ "text": "Add a custom workspaces app",
9
+ "separate": false,
10
+ "selected": false
11
+ }
12
+ }
Binary file
@@ -0,0 +1,57 @@
1
+ /**
2
+ * ANSI color utility for terminal output
3
+ * Replaces chalk dependency with native ANSI escape codes
4
+ */
5
+ export declare const red: (text: string) => string;
6
+ export declare const green: (text: string) => string;
7
+ export declare const yellow: (text: string) => string;
8
+ export declare const blue: (text: string) => string;
9
+ export declare const magenta: (text: string) => string;
10
+ export declare const cyan: (text: string) => string;
11
+ export declare const white: (text: string) => string;
12
+ export declare const gray: (text: string) => string;
13
+ export declare const grey: (text: string) => string;
14
+ export declare const black: (text: string) => string;
15
+ export declare const bgRed: (text: string) => string;
16
+ export declare const bgGreen: (text: string) => string;
17
+ export declare const bgYellow: (text: string) => string;
18
+ export declare const bgBlue: (text: string) => string;
19
+ export declare const bgMagenta: (text: string) => string;
20
+ export declare const bgCyan: (text: string) => string;
21
+ export declare const bgWhite: (text: string) => string;
22
+ export declare const bgBlack: (text: string) => string;
23
+ export declare const bold: (text: string) => string;
24
+ export declare const dim: (text: string) => string;
25
+ export declare const italic: (text: string) => string;
26
+ export declare const underline: (text: string) => string;
27
+ export declare const strikethrough: (text: string) => string;
28
+ export declare const bgCyanBlack: (text: string) => string;
29
+ declare const colors: {
30
+ red: (text: string) => string;
31
+ green: (text: string) => string;
32
+ yellow: (text: string) => string;
33
+ blue: (text: string) => string;
34
+ magenta: (text: string) => string;
35
+ cyan: (text: string) => string;
36
+ white: (text: string) => string;
37
+ gray: (text: string) => string;
38
+ grey: (text: string) => string;
39
+ black: (text: string) => string;
40
+ bgRed: (text: string) => string;
41
+ bgGreen: (text: string) => string;
42
+ bgYellow: (text: string) => string;
43
+ bgBlue: (text: string) => string;
44
+ bgMagenta: (text: string) => string;
45
+ bgWhite: (text: string) => string;
46
+ bgBlack: (text: string) => string;
47
+ bold: (text: string) => string;
48
+ dim: (text: string) => string;
49
+ italic: (text: string) => string;
50
+ underline: (text: string) => string;
51
+ strikethrough: (text: string) => string;
52
+ bgCyan: {
53
+ black: (text: string) => string;
54
+ };
55
+ };
56
+ export default colors;
57
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts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AAqC,CAAC;AAC1E,eAAO,MAAM,GAAG,GAAI,MAAM,MAAM,KAAG,MAAoC,CAAC;AACxE,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,KAAG,MAAuC,CAAC;AAC9E,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,MAA0C,CAAC;AACpF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAA8C,CAAC;AAG5F,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,MAA4D,CAAC;AAIxG,QAAA,MAAM,MAAM;gBAjCc,MAAM,KAAG,MAAM;kBACb,MAAM,KAAG,MAAM;mBACd,MAAM,KAAG,MAAM;iBACjB,MAAM,KAAG,MAAM;oBACZ,MAAM,KAAG,MAAM;iBAClB,MAAM,KAAG,MAAM;kBACd,MAAM,KAAG,MAAM;iBAChB,MAAM,KAAG,MAAM;iBACf,MAAM,KAAG,MAAM;kBACd,MAAM,KAAG,MAAM;kBAGf,MAAM,KAAG,MAAM;oBACb,MAAM,KAAG,MAAM;qBACd,MAAM,KAAG,MAAM;mBACjB,MAAM,KAAG,MAAM;sBACZ,MAAM,KAAG,MAAM;oBAEjB,MAAM,KAAG,MAAM;oBACf,MAAM,KAAG,MAAM;iBAGlB,MAAM,KAAG,MAAM;gBAChB,MAAM,KAAG,MAAM;mBACZ,MAAM,KAAG,MAAM;sBACZ,MAAM,KAAG,MAAM;0BACX,MAAM,KAAG,MAAM;;sBAGjB,MAAM,KAAG,MAAM;;CAgChD,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ /**
3
+ * ANSI color utility for terminal output
4
+ * Replaces chalk dependency with native ANSI escape codes
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.bgCyanBlack = exports.strikethrough = exports.underline = exports.italic = exports.dim = exports.bold = exports.bgBlack = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.black = exports.grey = exports.gray = exports.white = exports.cyan = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = void 0;
8
+ // ANSI color codes
9
+ const COLORS = {
10
+ // Text colors
11
+ red: '\x1b[31m',
12
+ green: '\x1b[32m',
13
+ yellow: '\x1b[33m',
14
+ blue: '\x1b[34m',
15
+ magenta: '\x1b[35m',
16
+ cyan: '\x1b[36m',
17
+ white: '\x1b[37m',
18
+ gray: '\x1b[90m',
19
+ grey: '\x1b[90m',
20
+ black: '\x1b[30m',
21
+ // Background colors
22
+ bgRed: '\x1b[41m',
23
+ bgGreen: '\x1b[42m',
24
+ bgYellow: '\x1b[43m',
25
+ bgBlue: '\x1b[44m',
26
+ bgMagenta: '\x1b[45m',
27
+ bgCyan: '\x1b[46m',
28
+ bgWhite: '\x1b[47m',
29
+ bgBlack: '\x1b[40m',
30
+ // Text styles
31
+ bold: '\x1b[1m',
32
+ dim: '\x1b[2m',
33
+ italic: '\x1b[3m',
34
+ underline: '\x1b[4m',
35
+ blink: '\x1b[5m',
36
+ reverse: '\x1b[7m',
37
+ strikethrough: '\x1b[9m',
38
+ // Reset
39
+ reset: '\x1b[0m'
40
+ };
41
+ /**
42
+ * Check if colors should be disabled (for CI environments, non-TTY, etc.)
43
+ */
44
+ function shouldDisableColors() {
45
+ return (process.env["NO_COLOR"] !== undefined ||
46
+ process.env["NODE_DISABLE_COLORS"] === '1' ||
47
+ process.env["CI"] === 'true' ||
48
+ !process.stdout.isTTY);
49
+ }
50
+ /**
51
+ * Apply ANSI color/style to text
52
+ */
53
+ function colorize(color, text) {
54
+ if (shouldDisableColors()) {
55
+ return text;
56
+ }
57
+ return `${color}${text}${COLORS.reset}`;
58
+ }
59
+ /**
60
+ * Combine multiple styles
61
+ */
62
+ function combineStyles(styles, text) {
63
+ if (shouldDisableColors()) {
64
+ return text;
65
+ }
66
+ return `${styles.join('')}${text}${COLORS.reset}`;
67
+ }
68
+ // Main color functions
69
+ const red = (text) => colorize(COLORS.red, text);
70
+ exports.red = red;
71
+ const green = (text) => colorize(COLORS.green, text);
72
+ exports.green = green;
73
+ const yellow = (text) => colorize(COLORS.yellow, text);
74
+ exports.yellow = yellow;
75
+ const blue = (text) => colorize(COLORS.blue, text);
76
+ exports.blue = blue;
77
+ const magenta = (text) => colorize(COLORS.magenta, text);
78
+ exports.magenta = magenta;
79
+ const cyan = (text) => colorize(COLORS.cyan, text);
80
+ exports.cyan = cyan;
81
+ const white = (text) => colorize(COLORS.white, text);
82
+ exports.white = white;
83
+ const gray = (text) => colorize(COLORS.gray, text);
84
+ exports.gray = gray;
85
+ const grey = (text) => colorize(COLORS.grey, text);
86
+ exports.grey = grey;
87
+ const black = (text) => colorize(COLORS.black, text);
88
+ exports.black = black;
89
+ // Background colors
90
+ const bgRed = (text) => colorize(COLORS.bgRed, text);
91
+ exports.bgRed = bgRed;
92
+ const bgGreen = (text) => colorize(COLORS.bgGreen, text);
93
+ exports.bgGreen = bgGreen;
94
+ const bgYellow = (text) => colorize(COLORS.bgYellow, text);
95
+ exports.bgYellow = bgYellow;
96
+ const bgBlue = (text) => colorize(COLORS.bgBlue, text);
97
+ exports.bgBlue = bgBlue;
98
+ const bgMagenta = (text) => colorize(COLORS.bgMagenta, text);
99
+ exports.bgMagenta = bgMagenta;
100
+ const bgCyan = (text) => colorize(COLORS.bgCyan, text);
101
+ exports.bgCyan = bgCyan;
102
+ const bgWhite = (text) => colorize(COLORS.bgWhite, text);
103
+ exports.bgWhite = bgWhite;
104
+ const bgBlack = (text) => colorize(COLORS.bgBlack, text);
105
+ exports.bgBlack = bgBlack;
106
+ // Text styles
107
+ const bold = (text) => colorize(COLORS.bold, text);
108
+ exports.bold = bold;
109
+ const dim = (text) => colorize(COLORS.dim, text);
110
+ exports.dim = dim;
111
+ const italic = (text) => colorize(COLORS.italic, text);
112
+ exports.italic = italic;
113
+ const underline = (text) => colorize(COLORS.underline, text);
114
+ exports.underline = underline;
115
+ const strikethrough = (text) => colorize(COLORS.strikethrough, text);
116
+ exports.strikethrough = strikethrough;
117
+ // Combined styles (like chalk's chaining)
118
+ const bgCyanBlack = (text) => combineStyles([COLORS.bgCyan, COLORS.black], text);
119
+ exports.bgCyanBlack = bgCyanBlack;
120
+ // Default export with chalk-like interface
121
+ const colors = {
122
+ red: exports.red,
123
+ green: exports.green,
124
+ yellow: exports.yellow,
125
+ blue: exports.blue,
126
+ magenta: exports.magenta,
127
+ cyan: exports.cyan,
128
+ white: exports.white,
129
+ gray: exports.gray,
130
+ grey: exports.grey,
131
+ black: exports.black,
132
+ bgRed: exports.bgRed,
133
+ bgGreen: exports.bgGreen,
134
+ bgYellow: exports.bgYellow,
135
+ bgBlue: exports.bgBlue,
136
+ bgMagenta: exports.bgMagenta,
137
+ //bgCyan,
138
+ bgWhite: exports.bgWhite,
139
+ bgBlack: exports.bgBlack,
140
+ bold: exports.bold,
141
+ dim: exports.dim,
142
+ italic: exports.italic,
143
+ underline: exports.underline,
144
+ strikethrough: exports.strikethrough,
145
+ // Special combined styles
146
+ bgCyan: {
147
+ black: exports.bgCyanBlack
148
+ }
149
+ };
150
+ exports.default = colors;
151
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../src/utils/colors.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mBAAmB;AACnB,MAAM,MAAM,GAAG;IACb,cAAc;IACd,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,UAAU;IAEjB,oBAAoB;IACpB,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,UAAU;IAClB,S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cAAM;IACN,SAAS,EAAT,iBAAS;IACT,aAAa,EAAb,qBAAa;IACb,0BAA0B;IAC1B,MAAM,EAAE;QACN,KAAK,EAAE,mBAAW;KACnB;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Deep merge two objects
3
+ */
4
+ export declare function deepMerge(target: any, source: any): any;
5
+ //# sourceMappingURL=deep.merge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep.merge.d.ts","sourceRoot":"","sources":["../../src/utils/deep.merge.ts"],"names":[],"mappings":"AAAC;;EAEE;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,GAAG,CAcvD"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deepMerge = deepMerge;
4
+ /**
5
+ * Deep merge two objects
6
+ */
7
+ function deepMerge(target, source) {
8
+ const result = { ...target };
9
+ for (const key in source) {
10
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
11
+ if (isObject(source[key]) && isObject(result[key])) {
12
+ result[key] = deepMerge(result[key], source[key]);
13
+ }
14
+ else {
15
+ result[key] = source[key];
16
+ }
17
+ }
18
+ }
19
+ return result;
20
+ }
21
+ /**
22
+ * Check if a value is a plain object
23
+ */
24
+ function isObject(obj) {
25
+ return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
26
+ }
27
+ //# sourceMappingURL=deep.merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep.merge.js","sourceRoot":"","sources":["../../src/utils/deep.merge.ts"],"names":[],"mappings":";;AAGA,8BAcC;AAjBA;;EAEE;AACH,SAAgB,SAAS,CAAC,MAAW,EAAE,MAAW;IAC9C,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAE7B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACvB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;YACpD,IAAI,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBACjD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACJ,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,QAAQ,CAAC,GAAQ;IACtB,OAAO,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare class ElectronBuilderConfigHelper {
2
+ private static configPath;
3
+ private static config;
4
+ static getConfig(): any;
5
+ }
6
+ //# sourceMappingURL=electron.builder.config.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"electron.builder.config.helper.d.ts","sourceRoot":"","sources":["../../src/utils/electron.builder.config.helper.ts"],"names":[],"mappings":"AAGA,qBAAa,2BAA2B;IACtC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAgD;IACzE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAa;IAElC,MAAM,CAAC,SAAS,IAAI,GAAG;CAWxB"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ElectronBuilderConfigHelper = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const file_1 = require("./file");
9
+ class ElectronBuilderConfigHelper {
10
+ static configPath = path_1.default.resolve('config/electron-builder.json');
11
+ static config = null;
12
+ static getConfig() {
13
+ if (this.config) {
14
+ return this.config;
15
+ }
16
+ const fileContents = file_1.FileUtils.readJson(this.configPath);
17
+ if (!fileContents) {
18
+ throw new Error('electron-builder.json not found ');
19
+ }
20
+ this.config = fileContents;
21
+ return this.config;
22
+ }
23
+ }
24
+ exports.ElectronBuilderConfigHelper = ElectronBuilderConfigHelper;
25
+ //# sourceMappingURL=electron.builder.config.helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"electron.builder.config.helper.js","sourceRoot":"","sources":["../../src/utils/electron.builder.config.helper.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,iCAAmC;AAEnC,MAAa,2BAA2B;IAC9B,MAAM,CAAC,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACjE,MAAM,CAAC,MAAM,GAAQ,IAAI,CAAC;IAElC,MAAM,CAAC,SAAS;QACd,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC;QACrB,CAAC;QACD,MAAM,YAAY,GAAG,gBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzD,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;;AAdH,kEAeC"}
@@ -0,0 +1,2 @@
1
+ export declare function ensureIOCDComponentExists(): void;
2
+ //# sourceMappingURL=ensure.iocd.exists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure.iocd.exists.d.ts","sourceRoot":"","sources":["../../src/utils/ensure.iocd.exists.ts"],"names":[],"mappings":"AAIA,wBAAgB,yBAAyB,SAoBxC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensureIOCDComponentExists = ensureIOCDComponentExists;
4
+ const fs_1 = require("fs");
5
+ const error_handler_1 = require("./error.handler");
6
+ const path_1 = require("./path");
7
+ function ensureIOCDComponentExists() {
8
+ // Check if components are installed
9
+ const componentsDir = path_1.PathUtils.getComponentsDir();
10
+ if (!((0, fs_1.existsSync)(componentsDir))) {
11
+ throw new error_handler_1.CLIError('Components directory not found.', {
12
+ suggestions: [
13
+ 'Run "npm run setup" to download components.'
14
+ ]
15
+ });
16
+ }
17
+ const iocdDir = path_1.PathUtils.getComponentDir("iocd");
18
+ if (!(0, fs_1.existsSync)(iocdDir)) {
19
+ throw new error_handler_1.CLIError('Required iocd component not found.', {
20
+ suggestions: [
21
+ 'Run "npm run setup" to download components',
22
+ 'Make sure you have iocd component listed in iocd.cli.config.json under "components.list"',
23
+ ]
24
+ });
25
+ }
26
+ }
27
+ //# sourceMappingURL=ensure.iocd.exists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure.iocd.exists.js","sourceRoot":"","sources":["../../src/utils/ensure.iocd.exists.ts"],"names":[],"mappings":";;AAIA,8DAoBC;AAxBD,2BAAgC;AAChC,mDAA2C;AAC3C,iCAAmC;AAEnC,SAAgB,yBAAyB;IACrC,oCAAoC;IACpC,MAAM,aAAa,GAAG,gBAAS,CAAC,gBAAgB,EAAE,CAAC;IACnD,IAAI,CAAC,CAAC,IAAA,eAAU,EAAC,aAAa,CAAC,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,wBAAQ,CAAC,iCAAiC,EAAE;YAClD,WAAW,EAAE;gBACT,6CAA6C;aAChD;SACJ,CAAC,CAAC;IACP,CAAC;IAED,MAAM,OAAO,GAAG,gBAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,CAAC,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,wBAAQ,CAAC,oCAAoC,EAAE;YACrD,WAAW,EAAE;gBACT,4CAA4C;gBAC5C,0FAA0F;aAC7F;SACJ,CAAC,CAAC;IACP,CAAC;AACL,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare enum ErrorCode {
2
+ GENERAL = 1,
3
+ INVALID_CONFIG = 2,
4
+ NETWORK_ERROR = 3,
5
+ FILE_SYSTEM_ERROR = 4,
6
+ COMPONENT_ERROR = 5,
7
+ VALIDATION_ERROR = 6,
8
+ PERMISSION_ERROR = 7,
9
+ NOT_FOUND = 8,
10
+ BUILD_ERROR = 9
11
+ }
12
+ export interface CLIErrorOptions {
13
+ code?: ErrorCode;
14
+ cause?: Error;
15
+ suggestions?: string[];
16
+ showLogPath?: boolean;
17
+ }
18
+ export declare class CLIError extends Error {
19
+ readonly code: ErrorCode;
20
+ readonly cause?: Error | undefined;
21
+ readonly suggestions: string[];
22
+ readonly showLogPath: boolean;
23
+ constructor(message: string, options?: CLIErrorOptions);
24
+ }
25
+ export declare class ErrorHandler {
26
+ private static logger;
27
+ static handle(error: Error | CLIError): void;
28
+ static wrap(fn: () => Promise<any>): Promise<any>;
29
+ }
30
+ //# sourceMappingURL=error.handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.handler.d.ts","sourceRoot":"","sources":["../../src/utils/error.handler.ts"],"names":[],"mappings":"AAIA,oBAAY,SAAS;IACnB,OAAO,IAAI;IACX,cAAc,IAAI;IAClB,aAAa,IAAI;IACjB,iBAAiB,IAAI;IACrB,eAAe,IAAI;IACnB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,SAAS,IAAI;IACb,WAAW,IAAI;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBAAa,QAAS,SAAQ,KAAK;IACjC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAyB,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IACnD,SAAgB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtC,SAAgB,WAAW,EAAE,OAAO,CAAC;gBAEzB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB;CAQ3D;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAwB;WAE/B,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ;WAkC9B,IAAI,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAKzD"}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ErrorHandler = exports.CLIError = exports.ErrorCode = void 0;
37
+ const logger_1 = require("./logger");
38
+ const colors_1 = require("./colors");
39
+ const clack = __importStar(require("@clack/prompts"));
40
+ var ErrorCode;
41
+ (function (ErrorCode) {
42
+ ErrorCode[ErrorCode["GENERAL"] = 1] = "GENERAL";
43
+ ErrorCode[ErrorCode["INVALID_CONFIG"] = 2] = "INVALID_CONFIG";
44
+ ErrorCode[ErrorCode["NETWORK_ERROR"] = 3] = "NETWORK_ERROR";
45
+ ErrorCode[ErrorCode["FILE_SYSTEM_ERROR"] = 4] = "FILE_SYSTEM_ERROR";
46
+ ErrorCode[ErrorCode["COMPONENT_ERROR"] = 5] = "COMPONENT_ERROR";
47
+ ErrorCode[ErrorCode["VALIDATION_ERROR"] = 6] = "VALIDATION_ERROR";
48
+ ErrorCode[ErrorCode["PERMISSION_ERROR"] = 7] = "PERMISSION_ERROR";
49
+ ErrorCode[ErrorCode["NOT_FOUND"] = 8] = "NOT_FOUND";
50
+ ErrorCode[ErrorCode["BUILD_ERROR"] = 9] = "BUILD_ERROR";
51
+ })(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
52
+ class CLIError extends Error {
53
+ code;
54
+ cause;
55
+ suggestions;
56
+ showLogPath;
57
+ constructor(message, options = {}) {
58
+ super(message);
59
+ this.name = 'CLIError';
60
+ this.code = options.code ?? ErrorCode.GENERAL;
61
+ this.cause = options.cause;
62
+ this.suggestions = options.suggestions ?? [];
63
+ this.showLogPath = options.showLogPath ?? true;
64
+ }
65
+ }
66
+ exports.CLIError = CLIError;
67
+ class ErrorHandler {
68
+ static logger = logger_1.Logger.getInstance();
69
+ static handle(error) {
70
+ this.logger.error((0, colors_1.red)('✖'), (0, colors_1.bold)('Error:'), error);
71
+ if (error.cause) {
72
+ this.logger.error('Caused by:', error.cause);
73
+ }
74
+ const exitCode = error instanceof CLIError ? error.code : ErrorCode.GENERAL;
75
+ if (error instanceof CLIError) { // Show suggestions if available
76
+ if (error.suggestions.length > 0) {
77
+ clack.note(error.suggestions.map(suggestion => (0, colors_1.yellow)(` • ${suggestion}`)).join('\n'), "Suggestions:");
78
+ }
79
+ // Show log path for troubleshooting
80
+ if (error.showLogPath) {
81
+ this.logger.error((0, colors_1.gray)('For detailed logs, check:'));
82
+ this.logger.error((0, colors_1.gray)(' ' + this.logger.getLogPath()));
83
+ }
84
+ }
85
+ else {
86
+ // Generic error handling
87
+ this.logger.error((0, colors_1.gray)('For detailed logs, check:'));
88
+ this.logger.error((0, colors_1.gray)(' ' + this.logger.getLogPath()));
89
+ }
90
+ // Ensure all logs are flushed before exit
91
+ this.logger.flush();
92
+ // Give a small delay to ensure flush completes, then exit
93
+ setTimeout(() => {
94
+ process.exit(exitCode);
95
+ }, 50);
96
+ }
97
+ static wrap(fn) {
98
+ return fn().catch(error => {
99
+ this.handle(error);
100
+ });
101
+ }
102
+ }
103
+ exports.ErrorHandler = ErrorHandler;
104
+ //# sourceMappingURL=error.handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.handler.js","sourceRoot":"","sources":["../../src/utils/error.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAkC;AAClC,qCAAmD;AACnD,sDAAwC;AAExC,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,+CAAW,CAAA;IACX,6DAAkB,CAAA;IAClB,2DAAiB,CAAA;IACjB,mEAAqB,CAAA;IACrB,+DAAmB,CAAA;IACnB,iEAAoB,CAAA;IACpB,iEAAoB,CAAA;IACpB,mDAAa,CAAA;IACb,uDAAe,CAAA;AACjB,CAAC,EAVW,SAAS,yBAAT,SAAS,QAUpB;AASD,MAAa,QAAS,SAAQ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EAAC,OAAO,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC,CAAC;YAC1G,CAAC;YAED,oCAAoC;YACpC,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;gBACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAA,aAAI,EAAC,2BAA2B,CAAC,CAAC,CAAC;gBACrD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAA,aAAI,EAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;aAAM,CAAC;YACN,yBAAyB;YACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAA,aAAI,EAAC,2BAA2B,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAA,aAAI,EAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAEpB,0DAA0D;QAC1D,UAAU,CAAC,GAAG,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAEM,MAAM,CAAC,IAAI,CAAC,EAAsB;QACvC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;;AAzCH,oCA0CC"}
@@ -0,0 +1,10 @@
1
+ export declare class FileUtils {
2
+ static exists(filePath: string): Promise<boolean>;
3
+ static ensureDir(dirPath: string): Promise<void>;
4
+ static copyFile(src: string, dest: string): Promise<void>;
5
+ static removeFile(filePath: string): Promise<void>;
6
+ static readJson<T>(filePath: string): T | null;
7
+ static writeJson(filePath: string, data: any): Promise<void>;
8
+ static writeFile(filePath: string, content: string): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;WAEP,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;WAS1C,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAIzC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAIlD,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxD,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;WAIjC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;WAIrD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzE"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FileUtils = void 0;
7
+ const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ class FileUtils {
9
+ static async exists(filePath) {
10
+ try {
11
+ await fs_extra_1.default.access(filePath);
12
+ return true;
13
+ }
14
+ catch {
15
+ return false;
16
+ }
17
+ }
18
+ static async ensureDir(dirPath) {
19
+ await fs_extra_1.default.ensureDir(dirPath);
20
+ }
21
+ static async copyFile(src, dest) {
22
+ await fs_extra_1.default.copy(src, dest);
23
+ }
24
+ static async removeFile(filePath) {
25
+ if (await this.exists(filePath)) {
26
+ await fs_extra_1.default.remove(filePath);
27
+ }
28
+ }
29
+ static readJson(filePath) {
30
+ return fs_extra_1.default.readJsonSync(filePath);
31
+ }
32
+ static async writeJson(filePath, data) {
33
+ await fs_extra_1.default.writeJson(filePath, data, { spaces: 2 });
34
+ }
35
+ static async writeFile(filePath, content) {
36
+ await fs_extra_1.default.writeFile(filePath, content, 'utf8');
37
+ }
38
+ }
39
+ exports.FileUtils = FileUtils;
40
+ //# sourceMappingURL=file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAE1B,MAAa,SAAS;IAEpB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAgB;QAClC,IAAI,CAAC;YACH,MAAM,kBAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,OAAe;QACpC,MAAM,kBAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAW,EAAE,IAAY;QAC7C,MAAM,kBAAE,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,QAAgB;QACtC,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAChC,MAAM,kBAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,MAAM,CAAC,QAAQ,CAAI,QAAgB;QACjC,OAAO,kBAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,QAAgB,EAAE,IAAS;QAChD,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,QAAgB,EAAE,OAAe;QACtD,MAAM,kBAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;CACF;AApCD,8BAoCC"}
@@ -0,0 +1,2 @@
1
+ export declare function findPackageRoot(): string;
2
+ //# sourceMappingURL=find.package.dir.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.package.dir.d.ts","sourceRoot":"","sources":["../../src/utils/find.package.dir.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,WAe9B"}