@vforsh/argus 0.1.2 → 0.1.3

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 (249) hide show
  1. package/README.md +263 -16
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/bin.js +712 -9
  4. package/dist/bin.js.map +1 -1
  5. package/dist/cdp/resolveCdpEndpoint.d.ts +15 -0
  6. package/dist/cdp/resolveCdpEndpoint.d.ts.map +1 -0
  7. package/dist/cdp/resolveCdpEndpoint.js +56 -0
  8. package/dist/cdp/resolveCdpEndpoint.js.map +1 -0
  9. package/dist/cdp/selectTarget.d.ts +26 -0
  10. package/dist/cdp/selectTarget.d.ts.map +1 -0
  11. package/dist/cdp/selectTarget.js +87 -0
  12. package/dist/cdp/selectTarget.js.map +1 -0
  13. package/dist/cdp/types.d.ts +13 -0
  14. package/dist/cdp/types.d.ts.map +1 -0
  15. package/dist/cdp/types.js +2 -0
  16. package/dist/cdp/types.js.map +1 -0
  17. package/dist/commands/chrome.d.ts +41 -0
  18. package/dist/commands/chrome.d.ts.map +1 -0
  19. package/dist/commands/chrome.js +463 -0
  20. package/dist/commands/chrome.js.map +1 -0
  21. package/dist/commands/chromeStart.d.ts +9 -0
  22. package/dist/commands/chromeStart.d.ts.map +1 -0
  23. package/dist/commands/chromeStart.js +310 -0
  24. package/dist/commands/chromeStart.js.map +1 -0
  25. package/dist/commands/configInit.d.ts +6 -0
  26. package/dist/commands/configInit.d.ts.map +1 -0
  27. package/dist/commands/configInit.js +88 -0
  28. package/dist/commands/configInit.js.map +1 -0
  29. package/dist/commands/contexts.d.ts +7 -0
  30. package/dist/commands/contexts.d.ts.map +1 -0
  31. package/dist/commands/contexts.js +54 -0
  32. package/dist/commands/contexts.js.map +1 -0
  33. package/dist/commands/doctor.d.ts +5 -0
  34. package/dist/commands/doctor.d.ts.map +1 -0
  35. package/dist/commands/doctor.js +142 -0
  36. package/dist/commands/doctor.js.map +1 -0
  37. package/dist/commands/domAdd.d.ts +17 -0
  38. package/dist/commands/domAdd.d.ts.map +1 -0
  39. package/dist/commands/domAdd.js +203 -0
  40. package/dist/commands/domAdd.js.map +1 -0
  41. package/dist/commands/domClick.d.ts +9 -0
  42. package/dist/commands/domClick.d.ts.map +1 -0
  43. package/dist/commands/domClick.js +75 -0
  44. package/dist/commands/domClick.js.map +1 -0
  45. package/dist/commands/domDiff.d.ts +43 -0
  46. package/dist/commands/domDiff.d.ts.map +1 -0
  47. package/dist/commands/domDiff.js +279 -0
  48. package/dist/commands/domDiff.js.map +1 -0
  49. package/dist/commands/domHover.d.ts +9 -0
  50. package/dist/commands/domHover.d.ts.map +1 -0
  51. package/dist/commands/domHover.js +75 -0
  52. package/dist/commands/domHover.js.map +1 -0
  53. package/dist/commands/domInfo.d.ts +10 -0
  54. package/dist/commands/domInfo.d.ts.map +1 -0
  55. package/dist/commands/domInfo.js +93 -0
  56. package/dist/commands/domInfo.js.map +1 -0
  57. package/dist/commands/domModify.d.ts +35 -0
  58. package/dist/commands/domModify.d.ts.map +1 -0
  59. package/dist/commands/domModify.js +203 -0
  60. package/dist/commands/domModify.js.map +1 -0
  61. package/dist/commands/domRemove.d.ts +9 -0
  62. package/dist/commands/domRemove.d.ts.map +1 -0
  63. package/dist/commands/domRemove.js +75 -0
  64. package/dist/commands/domRemove.js.map +1 -0
  65. package/dist/commands/domTree.d.ts +11 -0
  66. package/dist/commands/domTree.d.ts.map +1 -0
  67. package/dist/commands/domTree.js +100 -0
  68. package/dist/commands/domTree.js.map +1 -0
  69. package/dist/commands/eval.d.ts +22 -0
  70. package/dist/commands/eval.d.ts.map +1 -0
  71. package/dist/commands/eval.js +292 -0
  72. package/dist/commands/eval.js.map +1 -0
  73. package/dist/commands/extension/attach.d.ts +8 -0
  74. package/dist/commands/extension/attach.d.ts.map +1 -0
  75. package/dist/commands/extension/attach.js +171 -0
  76. package/dist/commands/extension/attach.js.map +1 -0
  77. package/dist/commands/extension/detach.d.ts +6 -0
  78. package/dist/commands/extension/detach.d.ts.map +1 -0
  79. package/dist/commands/extension/detach.js +132 -0
  80. package/dist/commands/extension/detach.js.map +1 -0
  81. package/dist/commands/extension/info.d.ts +5 -0
  82. package/dist/commands/extension/info.d.ts.map +1 -0
  83. package/dist/commands/extension/info.js +68 -0
  84. package/dist/commands/extension/info.js.map +1 -0
  85. package/dist/commands/extension/nativeHost.d.ts +21 -0
  86. package/dist/commands/extension/nativeHost.d.ts.map +1 -0
  87. package/dist/commands/extension/nativeHost.js +106 -0
  88. package/dist/commands/extension/nativeHost.js.map +1 -0
  89. package/dist/commands/extension/remove.d.ts +5 -0
  90. package/dist/commands/extension/remove.d.ts.map +1 -0
  91. package/dist/commands/extension/remove.js +75 -0
  92. package/dist/commands/extension/remove.js.map +1 -0
  93. package/dist/commands/extension/setup.d.ts +6 -0
  94. package/dist/commands/extension/setup.d.ts.map +1 -0
  95. package/dist/commands/extension/setup.js +89 -0
  96. package/dist/commands/extension/setup.js.map +1 -0
  97. package/dist/commands/extension/status.d.ts +5 -0
  98. package/dist/commands/extension/status.d.ts.map +1 -0
  99. package/dist/commands/extension/status.js +82 -0
  100. package/dist/commands/extension/status.js.map +1 -0
  101. package/dist/commands/extension/targets.d.ts +13 -0
  102. package/dist/commands/extension/targets.d.ts.map +1 -0
  103. package/dist/commands/extension/targets.js +77 -0
  104. package/dist/commands/extension/targets.js.map +1 -0
  105. package/dist/commands/frames.d.ts +7 -0
  106. package/dist/commands/frames.d.ts.map +1 -0
  107. package/dist/commands/frames.js +90 -0
  108. package/dist/commands/frames.js.map +1 -0
  109. package/dist/commands/iframeHelper.d.ts +13 -0
  110. package/dist/commands/iframeHelper.d.ts.map +1 -0
  111. package/dist/commands/iframeHelper.js +63 -0
  112. package/dist/commands/iframeHelper.js.map +1 -0
  113. package/dist/commands/list.d.ts.map +1 -1
  114. package/dist/commands/list.js +8 -6
  115. package/dist/commands/list.js.map +1 -1
  116. package/dist/commands/logs.d.ts +6 -2
  117. package/dist/commands/logs.d.ts.map +1 -1
  118. package/dist/commands/logs.js +72 -16
  119. package/dist/commands/logs.js.map +1 -1
  120. package/dist/commands/net.d.ts +11 -0
  121. package/dist/commands/net.d.ts.map +1 -0
  122. package/dist/commands/net.js +90 -0
  123. package/dist/commands/net.js.map +1 -0
  124. package/dist/commands/netTail.d.ts +12 -0
  125. package/dist/commands/netTail.d.ts.map +1 -0
  126. package/dist/commands/netTail.js +112 -0
  127. package/dist/commands/netTail.js.map +1 -0
  128. package/dist/commands/page.d.ts +13 -0
  129. package/dist/commands/page.d.ts.map +1 -0
  130. package/dist/commands/page.js +340 -0
  131. package/dist/commands/page.js.map +1 -0
  132. package/dist/commands/reload.d.ts +8 -0
  133. package/dist/commands/reload.d.ts.map +1 -0
  134. package/dist/commands/reload.js +50 -0
  135. package/dist/commands/reload.js.map +1 -0
  136. package/dist/commands/screenshot.d.ts +9 -0
  137. package/dist/commands/screenshot.d.ts.map +1 -0
  138. package/dist/commands/screenshot.js +52 -0
  139. package/dist/commands/screenshot.js.map +1 -0
  140. package/dist/commands/storageLocal.d.ts +18 -0
  141. package/dist/commands/storageLocal.d.ts.map +1 -0
  142. package/dist/commands/storageLocal.js +119 -0
  143. package/dist/commands/storageLocal.js.map +1 -0
  144. package/dist/commands/tail.d.ts +6 -2
  145. package/dist/commands/tail.d.ts.map +1 -1
  146. package/dist/commands/tail.js +71 -15
  147. package/dist/commands/tail.js.map +1 -1
  148. package/dist/commands/trace.d.ts +27 -0
  149. package/dist/commands/trace.d.ts.map +1 -0
  150. package/dist/commands/trace.js +139 -0
  151. package/dist/commands/trace.js.map +1 -0
  152. package/dist/commands/watcherNativeHost.d.ts +13 -0
  153. package/dist/commands/watcherNativeHost.d.ts.map +1 -0
  154. package/dist/commands/watcherNativeHost.js +45 -0
  155. package/dist/commands/watcherNativeHost.js.map +1 -0
  156. package/dist/commands/watcherPrune.d.ts +9 -0
  157. package/dist/commands/watcherPrune.d.ts.map +1 -0
  158. package/dist/commands/watcherPrune.js +83 -0
  159. package/dist/commands/watcherPrune.js.map +1 -0
  160. package/dist/commands/watcherStart.d.ts +23 -0
  161. package/dist/commands/watcherStart.d.ts.map +1 -0
  162. package/dist/commands/watcherStart.js +182 -0
  163. package/dist/commands/watcherStart.js.map +1 -0
  164. package/dist/commands/watcherStatus.d.ts +7 -0
  165. package/dist/commands/watcherStatus.d.ts.map +1 -0
  166. package/dist/commands/watcherStatus.js +44 -0
  167. package/dist/commands/watcherStatus.js.map +1 -0
  168. package/dist/commands/watcherStop.d.ts +5 -0
  169. package/dist/commands/watcherStop.d.ts.map +1 -0
  170. package/dist/commands/watcherStop.js +103 -0
  171. package/dist/commands/watcherStop.js.map +1 -0
  172. package/dist/config/argusConfig.d.ts +67 -0
  173. package/dist/config/argusConfig.d.ts.map +1 -0
  174. package/dist/config/argusConfig.js +338 -0
  175. package/dist/config/argusConfig.js.map +1 -0
  176. package/dist/eval/evalClient.d.ts +35 -0
  177. package/dist/eval/evalClient.d.ts.map +1 -0
  178. package/dist/eval/evalClient.js +71 -0
  179. package/dist/eval/evalClient.js.map +1 -0
  180. package/dist/frame/frameSelector.d.ts +14 -0
  181. package/dist/frame/frameSelector.d.ts.map +1 -0
  182. package/dist/frame/frameSelector.js +31 -0
  183. package/dist/frame/frameSelector.js.map +1 -0
  184. package/dist/httpClient.d.ts +6 -1
  185. package/dist/httpClient.d.ts.map +1 -1
  186. package/dist/httpClient.js +54 -1
  187. package/dist/httpClient.js.map +1 -1
  188. package/dist/index.d.ts +1 -1
  189. package/dist/index.d.ts.map +1 -1
  190. package/dist/index.js +1 -1
  191. package/dist/index.js.map +1 -1
  192. package/dist/output/dom.d.ts +14 -0
  193. package/dist/output/dom.d.ts.map +1 -0
  194. package/dist/output/dom.js +92 -0
  195. package/dist/output/dom.js.map +1 -0
  196. package/dist/output/domDiff.d.ts +14 -0
  197. package/dist/output/domDiff.d.ts.map +1 -0
  198. package/dist/output/domDiff.js +151 -0
  199. package/dist/output/domDiff.js.map +1 -0
  200. package/dist/output/format.d.ts +3 -2
  201. package/dist/output/format.d.ts.map +1 -1
  202. package/dist/output/format.js +11 -3
  203. package/dist/output/format.js.map +1 -1
  204. package/dist/output/io.d.ts +14 -0
  205. package/dist/output/io.d.ts.map +1 -0
  206. package/dist/output/io.js +28 -0
  207. package/dist/output/io.js.map +1 -0
  208. package/dist/output/preview.d.ts +3 -0
  209. package/dist/output/preview.d.ts.map +1 -0
  210. package/dist/output/preview.js +6 -0
  211. package/dist/output/preview.js.map +1 -0
  212. package/dist/plugins/argusApi.d.ts +22 -0
  213. package/dist/plugins/argusApi.d.ts.map +1 -0
  214. package/dist/plugins/argusApi.js +92 -0
  215. package/dist/plugins/argusApi.js.map +1 -0
  216. package/dist/plugins/loader.d.ts +12 -0
  217. package/dist/plugins/loader.d.ts.map +1 -0
  218. package/dist/plugins/loader.js +92 -0
  219. package/dist/plugins/loader.js.map +1 -0
  220. package/dist/plugins/registry.d.ts +17 -0
  221. package/dist/plugins/registry.d.ts.map +1 -0
  222. package/dist/plugins/registry.js +44 -0
  223. package/dist/plugins/registry.js.map +1 -0
  224. package/dist/plugins/resolver.d.ts +6 -0
  225. package/dist/plugins/resolver.d.ts.map +1 -0
  226. package/dist/plugins/resolver.js +86 -0
  227. package/dist/plugins/resolver.js.map +1 -0
  228. package/dist/registry.d.ts +2 -0
  229. package/dist/registry.d.ts.map +1 -1
  230. package/dist/registry.js +12 -0
  231. package/dist/registry.js.map +1 -1
  232. package/dist/utils/chromeBin.d.ts +3 -0
  233. package/dist/utils/chromeBin.d.ts.map +1 -0
  234. package/dist/utils/chromeBin.js +46 -0
  235. package/dist/utils/chromeBin.js.map +1 -0
  236. package/dist/utils/ports.d.ts +3 -0
  237. package/dist/utils/ports.d.ts.map +1 -0
  238. package/dist/utils/ports.js +39 -0
  239. package/dist/utils/ports.js.map +1 -0
  240. package/dist/watchers/candidates.d.ts +4 -0
  241. package/dist/watchers/candidates.d.ts.map +1 -0
  242. package/dist/watchers/candidates.js +7 -0
  243. package/dist/watchers/candidates.js.map +1 -0
  244. package/dist/watchers/resolveWatcher.d.ts +16 -0
  245. package/dist/watchers/resolveWatcher.d.ts.map +1 -0
  246. package/dist/watchers/resolveWatcher.js +50 -0
  247. package/dist/watchers/resolveWatcher.js.map +1 -0
  248. package/package.json +7 -3
  249. package/schemas/argus.config.schema.json +115 -0
@@ -0,0 +1,132 @@
1
+ import { fetchJson } from '../../httpClient.js';
2
+ import { createOutput } from '../../output/io.js';
3
+ import { resolveWatcher } from '../../watchers/resolveWatcher.js';
4
+ import { writeWatcherCandidates } from '../../watchers/candidates.js';
5
+ export const runExtensionDetach = async (id, options) => {
6
+ const output = createOutput(options);
7
+ const resolved = await resolveWatcher({ id });
8
+ if (!resolved.ok) {
9
+ output.writeWarn(resolved.error);
10
+ if (resolved.candidates && resolved.candidates.length > 0) {
11
+ writeWatcherCandidates(resolved.candidates, output);
12
+ }
13
+ process.exitCode = resolved.exitCode;
14
+ return;
15
+ }
16
+ const { watcher } = resolved;
17
+ const baseUrl = `http://${watcher.host}:${watcher.port}`;
18
+ // If tabId is provided directly, use it
19
+ if (options.tabId) {
20
+ const tabIdNum = parseInt(options.tabId, 10);
21
+ if (isNaN(tabIdNum)) {
22
+ output.writeWarn(`Invalid tabId: ${options.tabId}`);
23
+ process.exitCode = 2;
24
+ return;
25
+ }
26
+ await detachFromTab(baseUrl, tabIdNum, options.tabId, output, options.json);
27
+ return;
28
+ }
29
+ // Otherwise, find attached tabs and detach from the first one (or all)
30
+ let targetsResponse;
31
+ try {
32
+ targetsResponse = await fetchJson(`${baseUrl}/targets`, { timeoutMs: 5_000, returnErrorResponse: true });
33
+ }
34
+ catch (error) {
35
+ output.writeWarn(`Failed to fetch targets: ${error instanceof Error ? error.message : error}`);
36
+ process.exitCode = 1;
37
+ return;
38
+ }
39
+ if (!targetsResponse.ok || !targetsResponse.targets) {
40
+ const message = targetsResponse.error?.message ?? 'Unknown error';
41
+ if (targetsResponse.error?.code === 'not_available' || targetsResponse.error?.code === 'not_found') {
42
+ output.writeWarn(`Watcher "${watcher.id}" is not in extension mode.`);
43
+ output.writeWarn('Start the watcher with --source extension to use this command.');
44
+ }
45
+ else {
46
+ output.writeWarn(`Failed to list targets: ${message}`);
47
+ }
48
+ process.exitCode = 1;
49
+ return;
50
+ }
51
+ const { targets } = targetsResponse;
52
+ const attached = targets.filter((t) => t.attached);
53
+ if (attached.length === 0) {
54
+ if (options.json) {
55
+ output.writeJson({ success: false, error: 'No tabs currently attached' });
56
+ }
57
+ else {
58
+ output.writeWarn('No tabs currently attached.');
59
+ }
60
+ process.exitCode = 1;
61
+ return;
62
+ }
63
+ if (attached.length > 1) {
64
+ output.writeWarn(`Multiple tabs attached (${attached.length}). Use --tab-id to specify which one.`);
65
+ output.writeWarn('');
66
+ output.writeWarn('Attached tabs:');
67
+ for (const target of attached) {
68
+ output.writeWarn(` [${target.id}] ${truncate(target.title, 40)} - ${truncate(target.url, 50)}`);
69
+ }
70
+ process.exitCode = 1;
71
+ return;
72
+ }
73
+ // Detach from the single attached tab
74
+ const target = attached[0];
75
+ const tabIdNum = parseInt(target.id, 10);
76
+ await detachFromTab(baseUrl, tabIdNum, target.id, output, options.json, target);
77
+ };
78
+ const detachFromTab = async (baseUrl, tabId, tabIdStr, output, json, target) => {
79
+ let response;
80
+ try {
81
+ response = await fetchJson(`${baseUrl}/detach`, {
82
+ method: 'POST',
83
+ body: { tabId },
84
+ timeoutMs: 5_000,
85
+ returnErrorResponse: true,
86
+ });
87
+ }
88
+ catch (error) {
89
+ if (json) {
90
+ output.writeJson({ success: false, error: error instanceof Error ? error.message : String(error) });
91
+ }
92
+ else {
93
+ output.writeWarn(`Failed to detach: ${error instanceof Error ? error.message : error}`);
94
+ }
95
+ process.exitCode = 1;
96
+ return;
97
+ }
98
+ if (!response.ok) {
99
+ const message = response.error?.message ?? 'Unknown error';
100
+ if (json) {
101
+ output.writeJson({ success: false, error: message });
102
+ }
103
+ else {
104
+ output.writeWarn(`Failed to detach: ${message}`);
105
+ }
106
+ process.exitCode = 1;
107
+ return;
108
+ }
109
+ if (json) {
110
+ output.writeJson({
111
+ success: true,
112
+ tabId: tabIdStr,
113
+ title: target?.title ?? null,
114
+ url: target?.url ?? null,
115
+ });
116
+ }
117
+ else {
118
+ output.writeHuman('');
119
+ output.writeHuman(`Detach request sent for tab ${tabIdStr}`);
120
+ if (target) {
121
+ output.writeHuman(` Title: ${target.title}`);
122
+ output.writeHuman(` URL: ${target.url}`);
123
+ }
124
+ output.writeHuman('');
125
+ }
126
+ };
127
+ const truncate = (str, maxLen) => {
128
+ if (str.length <= maxLen)
129
+ return str;
130
+ return str.slice(0, maxLen - 3) + '...';
131
+ };
132
+ //# sourceMappingURL=detach.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detach.js","sourceRoot":"","sources":["../../../src/commands/extension/detach.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAoBrE,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EAAE,EAAsB,EAAE,OAA+B,EAAiB,EAAE;IAClH,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;IACpC,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IAC7C,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QAClB,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAChC,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3D,sBAAsB,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QACpD,CAAC;QACD,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E;IACxD,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,GAAG,CAAA;IACpC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA;AACxC,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type ExtensionInfoOptions = {
2
+ json?: boolean;
3
+ };
4
+ export declare const runExtensionInfo: (options: ExtensionInfoOptions) => Promise<void>;
5
+ //# sourceMappingURL=info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/extension/info.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAU,SAAS,oBAAoB,KAAG,OAAO,CAAC,IAAI,CAqElF,CAAA"}
@@ -0,0 +1,68 @@
1
+ import fs from 'node:fs';
2
+ import { createOutput } from '../../output/io.js';
3
+ import { HOST_NAME, getPlatform, getManifestPath, getWrapperPath, readManifest, shortenPath } from './nativeHost.js';
4
+ export const runExtensionInfo = async (options) => {
5
+ const output = createOutput(options);
6
+ let platform;
7
+ try {
8
+ platform = getPlatform();
9
+ }
10
+ catch (error) {
11
+ if (options.json) {
12
+ output.writeJson({ error: error.message });
13
+ }
14
+ else {
15
+ console.error(error.message);
16
+ }
17
+ process.exitCode = 1;
18
+ return;
19
+ }
20
+ const manifestPath = getManifestPath(platform);
21
+ const wrapperPath = getWrapperPath(platform);
22
+ const manifestExists = fs.existsSync(manifestPath);
23
+ const wrapperExists = fs.existsSync(wrapperPath);
24
+ let extensionId = null;
25
+ let argusPath = null;
26
+ if (manifestExists) {
27
+ const manifest = readManifest(manifestPath);
28
+ if (manifest) {
29
+ argusPath = manifest.path;
30
+ const origin = manifest.allowed_origins?.[0];
31
+ if (origin) {
32
+ const match = origin.match(/^chrome-extension:\/\/([^/]+)\/$/);
33
+ if (match) {
34
+ extensionId = match[1];
35
+ }
36
+ }
37
+ }
38
+ }
39
+ const installed = manifestExists && wrapperExists;
40
+ if (options.json) {
41
+ output.writeJson({
42
+ hostName: HOST_NAME,
43
+ platform,
44
+ manifestPath,
45
+ wrapperPath,
46
+ installed,
47
+ extensionId,
48
+ argusPath,
49
+ });
50
+ return;
51
+ }
52
+ output.writeHuman('');
53
+ output.writeHuman('Native Messaging Host Info');
54
+ output.writeHuman('');
55
+ output.writeHuman(` Host name: ${HOST_NAME}`);
56
+ output.writeHuman(` Platform: ${platform}`);
57
+ output.writeHuman(` Manifest path: ${shortenPath(manifestPath)}`);
58
+ output.writeHuman(` Wrapper path: ${shortenPath(wrapperPath)}`);
59
+ output.writeHuman('');
60
+ output.writeHuman('Current configuration:');
61
+ output.writeHuman(` Installed: ${installed ? 'yes' : 'no'}`);
62
+ if (installed) {
63
+ output.writeHuman(` Extension ID: ${extensionId ?? '(unknown)'}`);
64
+ output.writeHuman(` Argus path: ${argusPath ?? '(unknown)'}`);
65
+ }
66
+ output.writeHuman('');
67
+ };
68
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/extension/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAMpH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,OAA6B,EAAiB,EAAE;IACtF,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;IAEpC,IAAI,QAAQ,CAAA;IACZ,IAAI,CAAC;QACJ,QAAQ,GAAG,WAAW,EAAE,CAAA;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CA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ACR,YAAY;YACZ,WAAW;YACX,SAAS;YACT,WAAW;YACX,SAAS;SACT,CAAC,CAAA;QACF,OAAM;IACP,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IACrB,MAAM,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAA;IAC/C,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IACrB,MAAM,CAAC,UAAU,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAA;IAClD,MAAM,CAAC,UAAU,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAA;IACjD,MAAM,CAAC,UAAU,CAAC,oBAAoB,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IAClE,MAAM,CAAC,UAAU,CAAC,oBAAoB,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACjE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IACrB,MAAM,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAA;IAC3C,MAAM,CAAC,UAAU,CAAC,oBAAoB,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;IACjE,IAAI,SAAS,EAAE,CAAC;QACf,MAAM,CAAC,UAAU,CAAC,oBAAoB,WAAW,IAAI,WAAW,EAAE,CAAC,CAAA;QACnE,MAAM,CAAC,UAAU,CAAC,oBAAoB,SAAS,IAAI,WAAW,EAAE,CAAC,CAAA;IAClE,CAAC;IACD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;AACtB,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ export declare const HOST_NAME = "com.vforsh.argus.bridge";
2
+ export type Platform = 'darwin' | 'linux' | 'win32';
3
+ export declare const getManifestDir: (platform: Platform) => string;
4
+ export declare const getManifestPath: (platform: Platform) => string;
5
+ export declare const getWrapperPath: (platform: Platform) => string;
6
+ export declare const getPlatform: () => Platform;
7
+ export declare const findArgusExecutable: () => string;
8
+ export declare const findNodePath: () => string;
9
+ export type NativeHostManifest = {
10
+ name: string;
11
+ description: string;
12
+ path: string;
13
+ type: 'stdio';
14
+ allowed_origins: string[];
15
+ };
16
+ export declare const createManifest: (extensionId: string, executablePath: string) => NativeHostManifest;
17
+ export declare const createWrapperScript: (platform: Platform, executablePath: string) => string;
18
+ export declare const readManifest: (manifestPath: string) => NativeHostManifest | null;
19
+ export declare const isWrapperExecutable: (wrapperPath: string) => boolean;
20
+ export declare const shortenPath: (filePath: string) => string;
21
+ //# sourceMappingURL=nativeHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeHost.d.ts","sourceRoot":"","sources":["../../../src/commands/extension/nativeHost.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,4BAA4B,CAAA;AAElD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAA;AAEnD,eAAO,MAAM,cAAc,GAAI,UAAU,QAAQ,KAAG,MAWnD,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,UAAU,QAAQ,KAAG,MAEpD,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,UAAU,QAAQ,KAAG,MAEnD,CAAA;AAED,eAAO,MAAM,WAAW,QAAO,QAM9B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAAO,MAuBtC,CAAA;AAED,eAAO,MAAM,YAAY,QAAO,MAI/B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;IACb,eAAe,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,EAAE,gBAAgB,MAAM,KAAG,kBAQ5E,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,UAAU,QAAQ,EAAE,gBAAgB,MAAM,KAAG,MAahF,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,cAAc,MAAM,KAAG,kBAAkB,GAAG,IAOxE,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,KAAG,OAOzD,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MAM9C,CAAA"}
@@ -0,0 +1,106 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import os from 'node:os';
4
+ import { execSync } from 'node:child_process';
5
+ export const HOST_NAME = 'com.vforsh.argus.bridge';
6
+ export const getManifestDir = (platform) => {
7
+ switch (platform) {
8
+ case 'darwin':
9
+ return path.join(os.homedir(), 'Library/Application Support/Google/Chrome/NativeMessagingHosts');
10
+ case 'linux':
11
+ return path.join(os.homedir(), '.config/google-chrome/NativeMessagingHosts');
12
+ case 'win32':
13
+ return path.join(process.env.LOCALAPPDATA ?? os.homedir(), 'Google/Chrome/User Data/NativeMessagingHosts');
14
+ default:
15
+ throw new Error(`Unsupported platform: ${platform}`);
16
+ }
17
+ };
18
+ export const getManifestPath = (platform) => {
19
+ return path.join(getManifestDir(platform), `${HOST_NAME}.json`);
20
+ };
21
+ export const getWrapperPath = (platform) => {
22
+ return path.join(getManifestDir(platform), 'argus-native-host.sh');
23
+ };
24
+ export const getPlatform = () => {
25
+ const platform = os.platform();
26
+ if (platform !== 'darwin' && platform !== 'linux' && platform !== 'win32') {
27
+ throw new Error(`Unsupported platform: ${platform}`);
28
+ }
29
+ return platform;
30
+ };
31
+ export const findArgusExecutable = () => {
32
+ // Check for globally installed argus
33
+ try {
34
+ const npmGlobalPrefix = execSync('npm config get prefix', { encoding: 'utf8' }).trim();
35
+ const globalBinPath = path.join(npmGlobalPrefix, 'bin', 'argus');
36
+ if (fs.existsSync(globalBinPath)) {
37
+ return globalBinPath;
38
+ }
39
+ }
40
+ catch {
41
+ // Ignore
42
+ }
43
+ // Check if argus is in PATH
44
+ try {
45
+ const whichPath = execSync('which argus', { encoding: 'utf8' }).trim();
46
+ if (whichPath) {
47
+ return whichPath;
48
+ }
49
+ }
50
+ catch {
51
+ // Ignore
52
+ }
53
+ throw new Error('Could not find argus executable. Please install argus globally (npm install -g @vforsh/argus) or ensure it is in your PATH.');
54
+ };
55
+ export const findNodePath = () => {
56
+ // Get the current node executable path and resolve any symlinks
57
+ // This is important for fnm/nvm which use symlinks in temporary directories
58
+ return fs.realpathSync(process.execPath);
59
+ };
60
+ export const createManifest = (extensionId, executablePath) => {
61
+ return {
62
+ name: HOST_NAME,
63
+ description: 'Argus Watcher Native Messaging Host',
64
+ path: executablePath,
65
+ type: 'stdio',
66
+ allowed_origins: [`chrome-extension://${extensionId}/`],
67
+ };
68
+ };
69
+ export const createWrapperScript = (platform, executablePath) => {
70
+ const wrapperDir = getManifestDir(platform);
71
+ const wrapperPath = path.join(wrapperDir, 'argus-native-host.sh');
72
+ const nodePath = findNodePath();
73
+ // Create a wrapper script that launches argus in native-host mode
74
+ // Use absolute path to node since Chrome spawns without shell profile
75
+ const script = `#!/bin/bash
76
+ exec "${nodePath}" "${executablePath}" watcher native-host
77
+ `;
78
+ fs.writeFileSync(wrapperPath, script, { mode: 0o755 });
79
+ return wrapperPath;
80
+ };
81
+ export const readManifest = (manifestPath) => {
82
+ try {
83
+ const content = fs.readFileSync(manifestPath, 'utf8');
84
+ return JSON.parse(content);
85
+ }
86
+ catch {
87
+ return null;
88
+ }
89
+ };
90
+ export const isWrapperExecutable = (wrapperPath) => {
91
+ try {
92
+ fs.accessSync(wrapperPath, fs.constants.X_OK);
93
+ return true;
94
+ }
95
+ catch {
96
+ return false;
97
+ }
98
+ };
99
+ export const shortenPath = (filePath) => {
100
+ const home = os.homedir();
101
+ if (filePath.startsWith(home)) {
102
+ return filePath.replace(home, '~');
103
+ }
104
+ return filePath;
105
+ };
106
+ //# sourceMappingURL=nativeHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeHost.js","sourceRoot":"","sources":["../../../src/commands/extension/nativeHost.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M,WAAW,GAAG,CAAC,QAAgB,EAAU,EAAE;IACvD,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAA;IACzB,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IACnC,CAAC;IACD,OAAO,QAAQ,CAAA;AAChB,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type ExtensionRemoveOptions = {
2
+ json?: boolean;
3
+ };
4
+ export declare const runExtensionRemove: (options: ExtensionRemoveOptions) => Promise<void>;
5
+ //# sourceMappingURL=remove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/commands/extension/remove.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,sBAAsB,GAAG;IACpC,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAU,SAAS,sBAAsB,KAAG,OAAO,CAAC,IAAI,CAuEtF,CAAA"}
@@ -0,0 +1,75 @@
1
+ import fs from 'node:fs';
2
+ import { execSync } from 'node:child_process';
3
+ import { createOutput } from '../../output/io.js';
4
+ import { HOST_NAME, getPlatform, getManifestPath, getWrapperPath, shortenPath } from './nativeHost.js';
5
+ export const runExtensionRemove = async (options) => {
6
+ const output = createOutput(options);
7
+ let platform;
8
+ try {
9
+ platform = getPlatform();
10
+ }
11
+ catch (error) {
12
+ if (options.json) {
13
+ output.writeJson({ success: false, error: error.message });
14
+ }
15
+ else {
16
+ console.error(error.message);
17
+ }
18
+ process.exitCode = 1;
19
+ return;
20
+ }
21
+ const manifestPath = getManifestPath(platform);
22
+ const wrapperPath = getWrapperPath(platform);
23
+ let manifestRemoved = false;
24
+ let wrapperRemoved = false;
25
+ // Remove manifest
26
+ if (fs.existsSync(manifestPath)) {
27
+ fs.unlinkSync(manifestPath);
28
+ manifestRemoved = true;
29
+ }
30
+ // Remove wrapper script
31
+ if (fs.existsSync(wrapperPath)) {
32
+ fs.unlinkSync(wrapperPath);
33
+ wrapperRemoved = true;
34
+ }
35
+ // Windows: Remove registry key
36
+ if (platform === 'win32') {
37
+ const regKey = `HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts\\${HOST_NAME}`;
38
+ try {
39
+ execSync(`reg delete "${regKey}" /f`, { stdio: 'pipe' });
40
+ }
41
+ catch {
42
+ // Key might not exist
43
+ }
44
+ }
45
+ if (options.json) {
46
+ output.writeJson({
47
+ success: true,
48
+ manifestRemoved,
49
+ wrapperRemoved,
50
+ manifestPath,
51
+ wrapperPath,
52
+ });
53
+ }
54
+ else {
55
+ output.writeHuman('');
56
+ if (manifestRemoved || wrapperRemoved) {
57
+ output.writeHuman('Native messaging host removed');
58
+ output.writeHuman('');
59
+ if (manifestRemoved) {
60
+ output.writeHuman(` Removed manifest: ${shortenPath(manifestPath)}`);
61
+ }
62
+ if (wrapperRemoved) {
63
+ output.writeHuman(` Removed wrapper: ${shortenPath(wrapperPath)}`);
64
+ }
65
+ }
66
+ else {
67
+ output.writeHuman('Native messaging host was not installed');
68
+ output.writeHuman('');
69
+ output.writeHuman(` Manifest not found: ${shortenPath(manifestPath)}`);
70
+ output.writeHuman(` Wrapper not found: ${shortenPath(wrapperPath)}`);
71
+ }
72
+ output.writeHuman('');
73
+ }
74
+ };
75
+ //# sourceMappingURL=remove.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../src/commands/extension/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAMtG,MAAM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EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;QACzD,CAAC;QAAC,MAAM,CAAC;YACR,sBAAsB;QACvB,CAAC;IACF,CAAC;IAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QAClB,MAAM,CAAC,SAAS,CAAC;YAChB,OAAO,EAAE,IAAI;YACb,eAAe;YACf,cAAc;YACd,YAAY;YACZ,WAAW;SACX,CAAC,CAAA;IACH,CAAC;SAAM,CAAC;QACP,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;QACrB,IAAI,eAAe,IAAI,cAAc,EAAE,CAAC;YACvC,MAAM,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAA;YAClD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;YACrB,IAAI,eAAe,EAAE,CAAC;gBACrB,MAAM,CAAC,UAAU,CAAC,uBAAuB,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;YACtE,CAAC;YACD,IAAI,cAAc,EAAE,CAAC;gBACpB,MAAM,CAAC,UAAU,CAAC,uBAAuB,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;YACrE,CAAC;QACF,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,UAAU,CAAC,yCAAyC,CAAC,CAAA;YAC5D,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;YACrB,MAAM,CAAC,UAAU,CAAC,yBAAyB,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;YACvE,MAAM,CAAC,UAAU,CAAC,yBAAyB,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;QACvE,CAAC;QACD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC;AACF,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export type ExtensionSetupOptions = {
2
+ extensionId: string;
3
+ json?: boolean;
4
+ };
5
+ export declare const runExtensionSetup: (options: ExtensionSetupOptions) => Promise<void>;
6
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/commands/extension/setup.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAU,SAAS,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAoFpF,CAAA"}
@@ -0,0 +1,89 @@
1
+ import fs from 'node:fs';
2
+ import { execSync } from 'node:child_process';
3
+ import { createOutput } from '../../output/io.js';
4
+ import { HOST_NAME, getPlatform, getManifestDir, getManifestPath, getWrapperPath, findArgusExecutable, createManifest, createWrapperScript, shortenPath, } from './nativeHost.js';
5
+ export const runExtensionSetup = async (options) => {
6
+ const output = createOutput(options);
7
+ const { extensionId } = options;
8
+ let platform;
9
+ try {
10
+ platform = getPlatform();
11
+ }
12
+ catch (error) {
13
+ if (options.json) {
14
+ output.writeJson({ success: false, error: error.message });
15
+ }
16
+ else {
17
+ console.error(error.message);
18
+ }
19
+ process.exitCode = 1;
20
+ return;
21
+ }
22
+ const manifestDir = getManifestDir(platform);
23
+ const manifestPath = getManifestPath(platform);
24
+ const wrapperPath = getWrapperPath(platform);
25
+ // Ensure directory exists
26
+ fs.mkdirSync(manifestDir, { recursive: true });
27
+ // Find argus executable
28
+ let executablePath;
29
+ try {
30
+ executablePath = findArgusExecutable();
31
+ }
32
+ catch (error) {
33
+ if (options.json) {
34
+ output.writeJson({ success: false, error: error.message });
35
+ }
36
+ else {
37
+ console.error(error.message);
38
+ }
39
+ process.exitCode = 1;
40
+ return;
41
+ }
42
+ // Create wrapper script
43
+ createWrapperScript(platform, executablePath);
44
+ // Create manifest
45
+ const manifest = createManifest(extensionId, wrapperPath);
46
+ fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
47
+ // Windows: Add registry key
48
+ if (platform === 'win32') {
49
+ const regKey = `HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts\\${HOST_NAME}`;
50
+ try {
51
+ execSync(`reg add "${regKey}" /ve /t REG_SZ /d "${manifestPath}" /f`, { stdio: 'pipe' });
52
+ }
53
+ catch (error) {
54
+ if (options.json) {
55
+ output.writeJson({ success: false, error: `Failed to add registry key: ${error.message}` });
56
+ }
57
+ else {
58
+ console.error('Failed to add registry key:', error);
59
+ }
60
+ process.exitCode = 1;
61
+ return;
62
+ }
63
+ }
64
+ if (options.json) {
65
+ output.writeJson({
66
+ success: true,
67
+ hostName: HOST_NAME,
68
+ extensionId,
69
+ manifestPath,
70
+ wrapperPath,
71
+ argusPath: executablePath,
72
+ });
73
+ }
74
+ else {
75
+ output.writeHuman('');
76
+ output.writeHuman('Native messaging host installed');
77
+ output.writeHuman('');
78
+ output.writeHuman(` Host name: ${HOST_NAME}`);
79
+ output.writeHuman(` Extension ID: ${extensionId}`);
80
+ output.writeHuman(` Manifest: ${shortenPath(manifestPath)}`);
81
+ output.writeHuman(` Wrapper: ${shortenPath(wrapperPath)}`);
82
+ output.writeHuman('');
83
+ output.writeHuman('Next steps:');
84
+ output.writeHuman(' 1. Reload the extension in chrome://extensions');
85
+ output.writeHuman(' 2. Start watcher: argus watcher start --id app --source extension');
86
+ output.writeHuman('');
87
+ }
88
+ };
89
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/commands/extension/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EACN,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,WAAW,GACX,MAAM,iBAAiB,CAAA;AAOx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;QACrB,MAAM,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAA;QACpD,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;QACrB,MAAM,CAAC,UAAU,CAAC,mBAAmB,SAAS,EAAE,CAAC,CAAA;QACjD,MAAM,CAAC,UAAU,CAAC,mBAAmB,WAAW,EAAE,CAAC,CAAA;QACnD,MAAM,CAAC,UAAU,CAAC,mBAAmB,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;QACjE,MAAM,CAAC,UAAU,CAAC,mBAAmB,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;QAChE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;QACrB,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;QAChC,MAAM,CAAC,UAAU,CAAC,kDAAkD,CAAC,CAAA;QACrE,MAAM,CAAC,UAAU,CAAC,qEAAqE,CAAC,CAAA;QACxF,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC;AACF,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type ExtensionStatusOptions = {
2
+ json?: boolean;
3
+ };
4
+ export declare const runExtensionStatus: (options: ExtensionStatusOptions) => Promise<void>;
5
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/extension/status.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IACpC,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAU,SAAS,sBAAsB,KAAG,OAAO,CAAC,IAAI,CAkFtF,CAAA"}