@nimblesite/lsp-profiler-ui 0.0.0-stage → 0.3.0

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 (352) hide show
  1. package/LICENSE +21 -0
  2. package/out/src/bind-host.d.ts +3 -0
  3. package/out/src/bind-host.js +52 -0
  4. package/out/src/bind-host.js.map +1 -0
  5. package/out/src/context-keys.d.ts +4 -0
  6. package/out/src/context-keys.js +54 -0
  7. package/out/src/context-keys.js.map +1 -0
  8. package/out/src/dap-evaluate.d.ts +84 -0
  9. package/out/src/dap-evaluate.js +442 -0
  10. package/out/src/dap-evaluate.js.map +1 -0
  11. package/out/src/dap-output.d.ts +50 -0
  12. package/out/src/dap-output.js +177 -0
  13. package/out/src/dap-output.js.map +1 -0
  14. package/out/src/debug/adapter-resolution.d.ts +56 -0
  15. package/out/src/debug/adapter-resolution.js +112 -0
  16. package/out/src/debug/adapter-resolution.js.map +1 -0
  17. package/out/src/debug/dap-messages.d.ts +18 -0
  18. package/out/src/debug/dap-messages.js +71 -0
  19. package/out/src/debug/dap-messages.js.map +1 -0
  20. package/out/src/debug/index.d.ts +7 -0
  21. package/out/src/debug/index.js +27 -0
  22. package/out/src/debug/index.js.map +1 -0
  23. package/out/src/debug/launch-config.d.ts +42 -0
  24. package/out/src/debug/launch-config.js +73 -0
  25. package/out/src/debug/launch-config.js.map +1 -0
  26. package/out/src/debug/launch-lifecycle.d.ts +29 -0
  27. package/out/src/debug/launch-lifecycle.js +40 -0
  28. package/out/src/debug/launch-lifecycle.js.map +1 -0
  29. package/out/src/debug/poll.d.ts +25 -0
  30. package/out/src/debug/poll.js +70 -0
  31. package/out/src/debug/poll.js.map +1 -0
  32. package/out/src/debug/profiling.d.ts +34 -0
  33. package/out/src/debug/profiling.js +81 -0
  34. package/out/src/debug/profiling.js.map +1 -0
  35. package/out/src/debug/testing/assertions.d.ts +27 -0
  36. package/out/src/debug/testing/assertions.js +111 -0
  37. package/out/src/debug/testing/assertions.js.map +1 -0
  38. package/out/src/debug/testing/dap-client.d.ts +86 -0
  39. package/out/src/debug/testing/dap-client.js +204 -0
  40. package/out/src/debug/testing/dap-client.js.map +1 -0
  41. package/out/src/debug/testing/index.d.ts +7 -0
  42. package/out/src/debug/testing/index.js +31 -0
  43. package/out/src/debug/testing/index.js.map +1 -0
  44. package/out/src/debug/testing/vscode-harness.d.ts +44 -0
  45. package/out/src/debug/testing/vscode-harness.js +81 -0
  46. package/out/src/debug/testing/vscode-harness.js.map +1 -0
  47. package/out/src/debug/ui-stubs.d.ts +26 -0
  48. package/out/src/debug/ui-stubs.js +88 -0
  49. package/out/src/debug/ui-stubs.js.map +1 -0
  50. package/out/src/debug-link-setup.d.ts +4 -0
  51. package/out/src/debug-link-setup.js +19 -0
  52. package/out/src/debug-link-setup.js.map +1 -0
  53. package/out/src/debug-link-view.d.ts +4 -0
  54. package/out/src/debug-link-view.js +49 -0
  55. package/out/src/debug-link-view.js.map +1 -0
  56. package/out/src/debug-link.d.ts +6 -0
  57. package/out/src/debug-link.js +95 -0
  58. package/out/src/debug-link.js.map +1 -0
  59. package/out/src/debug-selection.d.ts +14 -0
  60. package/out/src/debug-selection.js +33 -0
  61. package/out/src/debug-selection.js.map +1 -0
  62. package/out/src/debuggee-pause.d.ts +11 -0
  63. package/out/src/debuggee-pause.js +109 -0
  64. package/out/src/debuggee-pause.js.map +1 -0
  65. package/out/src/editor-path-key.d.ts +52 -0
  66. package/out/src/editor-path-key.js +105 -0
  67. package/out/src/editor-path-key.js.map +1 -0
  68. package/out/src/failure.d.ts +5 -0
  69. package/out/src/failure.js +53 -0
  70. package/out/src/failure.js.map +1 -0
  71. package/out/src/file-log-sink.d.ts +20 -0
  72. package/out/src/file-log-sink.js +74 -0
  73. package/out/src/file-log-sink.js.map +1 -0
  74. package/out/src/flame-html.d.ts +8 -0
  75. package/out/src/flame-html.js +104 -0
  76. package/out/src/flame-html.js.map +1 -0
  77. package/out/src/flame-model.d.ts +93 -0
  78. package/out/src/flame-model.js +242 -0
  79. package/out/src/flame-model.js.map +1 -0
  80. package/out/src/flame-script-helpers.d.ts +26 -0
  81. package/out/src/flame-script-helpers.js +71 -0
  82. package/out/src/flame-script-helpers.js.map +1 -0
  83. package/out/src/flame-script.d.ts +1 -0
  84. package/out/src/flame-script.js +332 -0
  85. package/out/src/flame-script.js.map +1 -0
  86. package/out/src/flame-time-order.d.ts +14 -0
  87. package/out/src/flame-time-order.js +112 -0
  88. package/out/src/flame-time-order.js.map +1 -0
  89. package/out/src/flamegraph-artifact.d.ts +9 -0
  90. package/out/src/flamegraph-artifact.js +45 -0
  91. package/out/src/flamegraph-artifact.js.map +1 -0
  92. package/out/src/host.d.ts +31 -0
  93. package/out/src/host.js +6 -0
  94. package/out/src/host.js.map +1 -0
  95. package/out/src/ids.d.ts +27 -0
  96. package/out/src/ids.js +63 -0
  97. package/out/src/ids.js.map +1 -0
  98. package/out/src/index.d.ts +42 -0
  99. package/out/src/index.js +98 -0
  100. package/out/src/index.js.map +1 -0
  101. package/out/src/logger.d.ts +50 -0
  102. package/out/src/logger.js +86 -0
  103. package/out/src/logger.js.map +1 -0
  104. package/out/src/memory-autopilot.d.ts +64 -0
  105. package/out/src/memory-autopilot.js +306 -0
  106. package/out/src/memory-autopilot.js.map +1 -0
  107. package/out/src/memory-capture-ids.d.ts +17 -0
  108. package/out/src/memory-capture-ids.js +45 -0
  109. package/out/src/memory-capture-ids.js.map +1 -0
  110. package/out/src/memory-capture-ingest.d.ts +15 -0
  111. package/out/src/memory-capture-ingest.js +84 -0
  112. package/out/src/memory-capture-ingest.js.map +1 -0
  113. package/out/src/memory-capture-legs.d.ts +4 -0
  114. package/out/src/memory-capture-legs.js +55 -0
  115. package/out/src/memory-capture-legs.js.map +1 -0
  116. package/out/src/memory-capture-present.d.ts +32 -0
  117. package/out/src/memory-capture-present.js +71 -0
  118. package/out/src/memory-capture-present.js.map +1 -0
  119. package/out/src/memory-capture-roundtrip.d.ts +17 -0
  120. package/out/src/memory-capture-roundtrip.js +75 -0
  121. package/out/src/memory-capture-roundtrip.js.map +1 -0
  122. package/out/src/memory-capture-state.d.ts +23 -0
  123. package/out/src/memory-capture-state.js +89 -0
  124. package/out/src/memory-capture-state.js.map +1 -0
  125. package/out/src/memory-capture-types.d.ts +28 -0
  126. package/out/src/memory-capture-types.js +70 -0
  127. package/out/src/memory-capture-types.js.map +1 -0
  128. package/out/src/memory-capture.d.ts +24 -0
  129. package/out/src/memory-capture.js +51 -0
  130. package/out/src/memory-capture.js.map +1 -0
  131. package/out/src/memory-dashboard-html.d.ts +3 -0
  132. package/out/src/memory-dashboard-html.js +327 -0
  133. package/out/src/memory-dashboard-html.js.map +1 -0
  134. package/out/src/memory-dashboard-mapping.d.ts +34 -0
  135. package/out/src/memory-dashboard-mapping.js +135 -0
  136. package/out/src/memory-dashboard-mapping.js.map +1 -0
  137. package/out/src/memory-dashboard.d.ts +82 -0
  138. package/out/src/memory-dashboard.js +142 -0
  139. package/out/src/memory-dashboard.js.map +1 -0
  140. package/out/src/memory-decorations.d.ts +61 -0
  141. package/out/src/memory-decorations.js +247 -0
  142. package/out/src/memory-decorations.js.map +1 -0
  143. package/out/src/memory-finalize.d.ts +25 -0
  144. package/out/src/memory-finalize.js +207 -0
  145. package/out/src/memory-finalize.js.map +1 -0
  146. package/out/src/memory-guidance.d.ts +14 -0
  147. package/out/src/memory-guidance.js +36 -0
  148. package/out/src/memory-guidance.js.map +1 -0
  149. package/out/src/memory-inspect-commands.d.ts +20 -0
  150. package/out/src/memory-inspect-commands.js +114 -0
  151. package/out/src/memory-inspect-commands.js.map +1 -0
  152. package/out/src/memory-launch-direct.d.ts +12 -0
  153. package/out/src/memory-launch-direct.js +74 -0
  154. package/out/src/memory-launch-direct.js.map +1 -0
  155. package/out/src/memory-launch.d.ts +4 -0
  156. package/out/src/memory-launch.js +92 -0
  157. package/out/src/memory-launch.js.map +1 -0
  158. package/out/src/memory-leak-offer.d.ts +18 -0
  159. package/out/src/memory-leak-offer.js +51 -0
  160. package/out/src/memory-leak-offer.js.map +1 -0
  161. package/out/src/memory-profiler.d.ts +27 -0
  162. package/out/src/memory-profiler.js +71 -0
  163. package/out/src/memory-profiler.js.map +1 -0
  164. package/out/src/memory-ref-graph.d.ts +62 -0
  165. package/out/src/memory-ref-graph.js +248 -0
  166. package/out/src/memory-ref-graph.js.map +1 -0
  167. package/out/src/memory-ref-picker.d.ts +21 -0
  168. package/out/src/memory-ref-picker.js +103 -0
  169. package/out/src/memory-ref-picker.js.map +1 -0
  170. package/out/src/memory-registration.d.ts +4 -0
  171. package/out/src/memory-registration.js +63 -0
  172. package/out/src/memory-registration.js.map +1 -0
  173. package/out/src/memory-start-core.d.ts +8 -0
  174. package/out/src/memory-start-core.js +165 -0
  175. package/out/src/memory-start-core.js.map +1 -0
  176. package/out/src/memory-start-stop-commands.d.ts +10 -0
  177. package/out/src/memory-start-stop-commands.js +75 -0
  178. package/out/src/memory-start-stop-commands.js.map +1 -0
  179. package/out/src/memory-start.d.ts +6 -0
  180. package/out/src/memory-start.js +13 -0
  181. package/out/src/memory-start.js.map +1 -0
  182. package/out/src/memory-status.d.ts +24 -0
  183. package/out/src/memory-status.js +135 -0
  184. package/out/src/memory-status.js.map +1 -0
  185. package/out/src/palette-vscode.d.ts +2 -0
  186. package/out/src/palette-vscode.js +50 -0
  187. package/out/src/palette-vscode.js.map +1 -0
  188. package/out/src/palette.d.ts +70 -0
  189. package/out/src/palette.js +150 -0
  190. package/out/src/palette.js.map +1 -0
  191. package/out/src/process-bind-panel.d.ts +11 -0
  192. package/out/src/process-bind-panel.js +65 -0
  193. package/out/src/process-bind-panel.js.map +1 -0
  194. package/out/src/process-commands.d.ts +5 -0
  195. package/out/src/process-commands.js +112 -0
  196. package/out/src/process-commands.js.map +1 -0
  197. package/out/src/process-context-keys.d.ts +11 -0
  198. package/out/src/process-context-keys.js +48 -0
  199. package/out/src/process-context-keys.js.map +1 -0
  200. package/out/src/process-decoration.d.ts +18 -0
  201. package/out/src/process-decoration.js +76 -0
  202. package/out/src/process-decoration.js.map +1 -0
  203. package/out/src/process-explorer-rows.d.ts +59 -0
  204. package/out/src/process-explorer-rows.js +47 -0
  205. package/out/src/process-explorer-rows.js.map +1 -0
  206. package/out/src/process-explorer.d.ts +66 -0
  207. package/out/src/process-explorer.js +241 -0
  208. package/out/src/process-explorer.js.map +1 -0
  209. package/out/src/process-group-item.d.ts +8 -0
  210. package/out/src/process-group-item.js +55 -0
  211. package/out/src/process-group-item.js.map +1 -0
  212. package/out/src/process-launch-item.d.ts +12 -0
  213. package/out/src/process-launch-item.js +57 -0
  214. package/out/src/process-launch-item.js.map +1 -0
  215. package/out/src/process-launch.d.ts +47 -0
  216. package/out/src/process-launch.js +205 -0
  217. package/out/src/process-launch.js.map +1 -0
  218. package/out/src/process-message-item.d.ts +10 -0
  219. package/out/src/process-message-item.js +53 -0
  220. package/out/src/process-message-item.js.map +1 -0
  221. package/out/src/process-poll.d.ts +26 -0
  222. package/out/src/process-poll.js +125 -0
  223. package/out/src/process-poll.js.map +1 -0
  224. package/out/src/process-reactivity.d.ts +55 -0
  225. package/out/src/process-reactivity.js +188 -0
  226. package/out/src/process-reactivity.js.map +1 -0
  227. package/out/src/process-registration.d.ts +11 -0
  228. package/out/src/process-registration.js +55 -0
  229. package/out/src/process-registration.js.map +1 -0
  230. package/out/src/process-tree-item.d.ts +18 -0
  231. package/out/src/process-tree-item.js +219 -0
  232. package/out/src/process-tree-item.js.map +1 -0
  233. package/out/src/processes-state.d.ts +75 -0
  234. package/out/src/processes-state.js +76 -0
  235. package/out/src/processes-state.js.map +1 -0
  236. package/out/src/profile-on-launch.d.ts +4 -0
  237. package/out/src/profile-on-launch.js +16 -0
  238. package/out/src/profile-on-launch.js.map +1 -0
  239. package/out/src/profile-server.d.ts +24 -0
  240. package/out/src/profile-server.js +170 -0
  241. package/out/src/profile-server.js.map +1 -0
  242. package/out/src/profiler-attach.d.ts +19 -0
  243. package/out/src/profiler-attach.js +129 -0
  244. package/out/src/profiler-attach.js.map +1 -0
  245. package/out/src/profiler-commands.d.ts +8 -0
  246. package/out/src/profiler-commands.js +110 -0
  247. package/out/src/profiler-commands.js.map +1 -0
  248. package/out/src/profiler-decorations.d.ts +74 -0
  249. package/out/src/profiler-decorations.js +237 -0
  250. package/out/src/profiler-decorations.js.map +1 -0
  251. package/out/src/profiler-dispose.d.ts +6 -0
  252. package/out/src/profiler-dispose.js +20 -0
  253. package/out/src/profiler-dispose.js.map +1 -0
  254. package/out/src/profiler-flamegraph-html.d.ts +61 -0
  255. package/out/src/profiler-flamegraph-html.js +366 -0
  256. package/out/src/profiler-flamegraph-html.js.map +1 -0
  257. package/out/src/profiler-format.d.ts +10 -0
  258. package/out/src/profiler-format.js +28 -0
  259. package/out/src/profiler-format.js.map +1 -0
  260. package/out/src/profiler-launch-cooperative.d.ts +16 -0
  261. package/out/src/profiler-launch-cooperative.js +167 -0
  262. package/out/src/profiler-launch-cooperative.js.map +1 -0
  263. package/out/src/profiler-launch.d.ts +29 -0
  264. package/out/src/profiler-launch.js +123 -0
  265. package/out/src/profiler-launch.js.map +1 -0
  266. package/out/src/profiler-results.d.ts +22 -0
  267. package/out/src/profiler-results.js +104 -0
  268. package/out/src/profiler-results.js.map +1 -0
  269. package/out/src/profiler-session-core.d.ts +42 -0
  270. package/out/src/profiler-session-core.js +116 -0
  271. package/out/src/profiler-session-core.js.map +1 -0
  272. package/out/src/profiler-state.d.ts +87 -0
  273. package/out/src/profiler-state.js +83 -0
  274. package/out/src/profiler-state.js.map +1 -0
  275. package/out/src/profiler-status.d.ts +38 -0
  276. package/out/src/profiler-status.js +163 -0
  277. package/out/src/profiler-status.js.map +1 -0
  278. package/out/src/profiler-styles.d.ts +21 -0
  279. package/out/src/profiler-styles.js +160 -0
  280. package/out/src/profiler-styles.js.map +1 -0
  281. package/out/src/profiler-webview.d.ts +95 -0
  282. package/out/src/profiler-webview.js +243 -0
  283. package/out/src/profiler-webview.js.map +1 -0
  284. package/out/src/profiler.d.ts +23 -0
  285. package/out/src/profiler.js +113 -0
  286. package/out/src/profiler.js.map +1 -0
  287. package/out/src/progress-ops.d.ts +24 -0
  288. package/out/src/progress-ops.js +135 -0
  289. package/out/src/progress-ops.js.map +1 -0
  290. package/out/src/reactive-refresh.d.ts +24 -0
  291. package/out/src/reactive-refresh.js +33 -0
  292. package/out/src/reactive-refresh.js.map +1 -0
  293. package/out/src/sample-summary.d.ts +39 -0
  294. package/out/src/sample-summary.js +32 -0
  295. package/out/src/sample-summary.js.map +1 -0
  296. package/out/src/sampled-view.d.ts +15 -0
  297. package/out/src/sampled-view.js +56 -0
  298. package/out/src/sampled-view.js.map +1 -0
  299. package/out/src/server-command.d.ts +4 -0
  300. package/out/src/server-command.js +14 -0
  301. package/out/src/server-command.js.map +1 -0
  302. package/out/src/settings.d.ts +1 -0
  303. package/out/src/settings.js +22 -0
  304. package/out/src/settings.js.map +1 -0
  305. package/out/src/store.d.ts +34 -0
  306. package/out/src/store.js +64 -0
  307. package/out/src/store.js.map +1 -0
  308. package/out/src/testing/cpu-capture-assertions.d.ts +8 -0
  309. package/out/src/testing/cpu-capture-assertions.js +71 -0
  310. package/out/src/testing/cpu-capture-assertions.js.map +1 -0
  311. package/out/src/testing/cpu-capture-contract.d.ts +8 -0
  312. package/out/src/testing/cpu-capture-contract.js +123 -0
  313. package/out/src/testing/cpu-capture-contract.js.map +1 -0
  314. package/out/src/testing/webview-contract-helpers.d.ts +24 -0
  315. package/out/src/testing/webview-contract-helpers.js +125 -0
  316. package/out/src/testing/webview-contract-helpers.js.map +1 -0
  317. package/out/src/testing/webview-contract-leak.d.ts +2 -0
  318. package/out/src/testing/webview-contract-leak.js +80 -0
  319. package/out/src/testing/webview-contract-leak.js.map +1 -0
  320. package/out/src/testing/webview-contract-memory.d.ts +5 -0
  321. package/out/src/testing/webview-contract-memory.js +221 -0
  322. package/out/src/testing/webview-contract-memory.js.map +1 -0
  323. package/out/src/testing/webview-contract-palette.d.ts +6 -0
  324. package/out/src/testing/webview-contract-palette.js +121 -0
  325. package/out/src/testing/webview-contract-palette.js.map +1 -0
  326. package/out/src/testing/webview-contract-panel.d.ts +7 -0
  327. package/out/src/testing/webview-contract-panel.js +100 -0
  328. package/out/src/testing/webview-contract-panel.js.map +1 -0
  329. package/out/src/testing/webview-contract-results.d.ts +6 -0
  330. package/out/src/testing/webview-contract-results.js +136 -0
  331. package/out/src/testing/webview-contract-results.js.map +1 -0
  332. package/out/src/testing/webview-contract.d.ts +18 -0
  333. package/out/src/testing/webview-contract.js +23 -0
  334. package/out/src/testing/webview-contract.js.map +1 -0
  335. package/out/src/timeouts.d.ts +21 -0
  336. package/out/src/timeouts.js +30 -0
  337. package/out/src/timeouts.js.map +1 -0
  338. package/out/src/trace-actions.d.ts +33 -0
  339. package/out/src/trace-actions.js +135 -0
  340. package/out/src/trace-actions.js.map +1 -0
  341. package/out/src/unknown-shape.d.ts +58 -0
  342. package/out/src/unknown-shape.js +110 -0
  343. package/out/src/unknown-shape.js.map +1 -0
  344. package/out/src/wire-adapters.d.ts +18 -0
  345. package/out/src/wire-adapters.js +160 -0
  346. package/out/src/wire-adapters.js.map +1 -0
  347. package/out/src/wire-generated.d.ts +760 -0
  348. package/out/src/wire-generated.js +38 -0
  349. package/out/src/wire-generated.js.map +1 -0
  350. package/package.json +53 -4
  351. package/scripts/contributions.mjs +187 -0
  352. package/README.md +0 -3
@@ -0,0 +1,95 @@
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.registerDebugProfilerLink = registerDebugProfilerLink;
37
+ // Implements [PROF-UI-DEBUG-LINK]. Native Watch/Variables menus share the profiler bridge.
38
+ const vscode = __importStar(require("vscode"));
39
+ const ids_1 = require("./ids");
40
+ const debug_selection_1 = require("./debug-selection");
41
+ const profiler_webview_1 = require("./profiler-webview");
42
+ const profiler_styles_1 = require("./profiler-styles");
43
+ const unknown_shape_1 = require("./unknown-shape");
44
+ function registerDebugProfilerLink(host) {
45
+ const panel = new profiler_webview_1.SingletonWebviewPanel(() => (0, ids_1.cmd)("variable"), (message) => { (0, profiler_webview_1.handleSourceNavigation)(message); });
46
+ return [panel, vscode.commands.registerCommand((0, ids_1.cmd)("inspectVariable"), context => { inspect(context, host, panel); }),
47
+ vscode.commands.registerCommand((0, ids_1.cmd)("watchVariable"), async () => { await watchSelected(host); }),
48
+ vscode.commands.registerCommand((0, ids_1.cmd)("inspectVariableType"), async () => { await inspectType(host); }),
49
+ vscode.debug.registerDebugAdapterTrackerFactory(host.debugType, { createDebugAdapterTracker: session => ({
50
+ onDidSendMessage(message) {
51
+ if ((0, unknown_shape_1.isRecord)(message) && message.type === "event" && ["continued", "terminated", "exited"].includes(String(message.event))
52
+ && debug_selection_1.selectedProfileVariable.value?.sessionId === session.id) {
53
+ debug_selection_1.selectedProfileVariable.value = undefined;
54
+ }
55
+ },
56
+ onWillStopSession() { if (debug_selection_1.selectedProfileVariable.value?.sessionId === session.id) {
57
+ debug_selection_1.selectedProfileVariable.value = undefined;
58
+ } },
59
+ }) }),
60
+ ];
61
+ }
62
+ function inspect(context, host, panel) {
63
+ const session = vscode.debug.activeDebugSession;
64
+ const variable = session?.type === host.debugType ? (0, debug_selection_1.profileVariable)(context, session.id) : undefined;
65
+ if (variable === undefined) {
66
+ void vscode.window.showWarningMessage("Select a variable in this profiler's active debugger.");
67
+ return;
68
+ }
69
+ debug_selection_1.selectedProfileVariable.value = { ...variable, canInspectType: host.inspectType !== undefined && variable.type !== "" };
70
+ panel.show("Profiler · Debug variable", (0, profiler_webview_1.buildWebviewDocument)({ title: "Profiler · Debug variable",
71
+ css: `${profiler_styles_1.PROFILER_CSS_VARS}${profiler_styles_1.PROFILER_CSS_RESET}body { padding: 16px; }`,
72
+ body: "<p>The selected debugger value is linked across the profiler panels.</p>", script: "" }));
73
+ }
74
+ async function watchSelected(host) {
75
+ const variable = debug_selection_1.selectedProfileVariable.value;
76
+ const session = vscode.debug.activeDebugSession;
77
+ if (variable === undefined || session?.id !== variable.sessionId || session.type !== host.debugType) {
78
+ throw new Error("The variable's debug session is no longer active.");
79
+ }
80
+ await vscode.commands.executeCommand("debug.addToWatchExpressions", {
81
+ sessionId: session.id, variable: { name: variable.name, evaluateName: variable.expression },
82
+ });
83
+ }
84
+ async function inspectType(host) {
85
+ const variable = debug_selection_1.selectedProfileVariable.value;
86
+ if (variable === undefined || vscode.debug.activeDebugSession?.id !== variable.sessionId) {
87
+ throw new Error("Select a current debugger variable first.");
88
+ }
89
+ if (host.inspectType === undefined || variable.type === "") {
90
+ void vscode.window.showInformationMessage("This runtime has no type-retention capture for this selection.");
91
+ return;
92
+ }
93
+ await host.inspectType(variable.type, variable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 -0,0 +1,14 @@
1
+ import type * as vscode from "vscode";
2
+ export interface ProfileVariable {
3
+ readonly sessionId: string;
4
+ readonly expression: string;
5
+ readonly name: string;
6
+ readonly value: string;
7
+ readonly type: string;
8
+ readonly canInspectType?: boolean;
9
+ }
10
+ export declare const selectedProfileVariable: import("@preact/signals-core").Signal<ProfileVariable | undefined>;
11
+ /** Decode the standard VS Code debug variable context without inventing object identity. */
12
+ export declare function profileVariable(context: unknown, sessionId: string): ProfileVariable | undefined;
13
+ /** Keep open panels reactive without replacing their zoom, scroll or selected frame. */
14
+ export declare function bindDebugSelection(panel: vscode.WebviewPanel): vscode.Disposable;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.selectedProfileVariable = void 0;
4
+ exports.profileVariable = profileVariable;
5
+ exports.bindDebugSelection = bindDebugSelection;
6
+ // Implements [PROF-UI-DEBUG-LINK]. A selection belongs to one paused debug session.
7
+ const signals_core_1 = require("@preact/signals-core");
8
+ const unknown_shape_1 = require("./unknown-shape");
9
+ exports.selectedProfileVariable = (0, signals_core_1.signal)(undefined);
10
+ /** Decode the standard VS Code debug variable context without inventing object identity. */
11
+ function profileVariable(context, sessionId) {
12
+ if (!(0, unknown_shape_1.isRecord)(context) || (context.sessionId !== undefined && context.sessionId !== sessionId)) {
13
+ return undefined;
14
+ }
15
+ const variable = (0, unknown_shape_1.isRecord)(context.variable) ? context.variable : context;
16
+ if (typeof variable.name !== "string" || typeof variable.value !== "string") {
17
+ return undefined;
18
+ }
19
+ const expression = typeof variable.evaluateName === "string" ? variable.evaluateName : variable.name;
20
+ return expression === "" ? undefined : { sessionId, expression, name: variable.name,
21
+ value: variable.value, type: typeof variable.type === "string" ? variable.type : "" };
22
+ }
23
+ /** Keep open panels reactive without replacing their zoom, scroll or selected frame. */
24
+ function bindDebugSelection(panel) {
25
+ const dispose = (0, signals_core_1.effect)(() => {
26
+ void panel.webview.postMessage({
27
+ type: "profilerVariable", variable: exports.selectedProfileVariable.value,
28
+ });
29
+ });
30
+ panel.onDidDispose(dispose);
31
+ return { dispose };
32
+ }
33
+ //# sourceMappingURL=debug-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug-selection.js","sourceRoot":"","sources":["../../src/debug-selection.ts"],"names":[],"mappings":";;;;;AAAA,oFAAoF;AACpF,uDAAsD;AAEtD,mDAA2C;AAU9B,QAAA,uBAAuB,GAAG,IAAA,qBAAM,EAA8B,SAAS,CAAC,CAAC;AAEtF,4FAA4F;AAC5F,yBAAgC,OAAgB,EAAE,SAAiB;IACjE,IAAI,CAAC,IAAA,wBAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC,EAAE,CAAC;QAAC,OAAO,SAAS,CAAC;IAAC,CAAC;IACrH,MAAM,QAAQ,GAAG,IAAA,wBAAQ,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;IACzE,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAAC,OAAO,SAAS,CAAC;IAAC,CAAC;IAClG,MAAM,UAAU,GAAG,OAAO,QAAQ,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IACrG,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI;QACjF,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC1F,CAAC;AAED,wFAAwF;AACxF,4BAAmC,KAA0B;IAC3D,MAAM,OAAO,GAAG,IAAA,qBAAM,EAAC,GAAG,EAAE;QAAG,KAAK,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;YAC5D,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,QAAA,uBAAuB,CAAC,KAAK;SAClE,CAAC,CAAC;IAAC,CAAC,CAAC,CAAC;IACP,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as vscode from "vscode";
2
+ type SessionListener = (sessionId: string) => void;
3
+ /** Follow every host debug session's pauses and resumptions. */
4
+ export declare function registerDebuggeePauseTracking(): vscode.Disposable[];
5
+ /** Forget every session and listener (deactivation, test teardown). */
6
+ export declare function disposeDebuggeePauseTracking(): void;
7
+ /** Whether the debugger holds `sessionId`'s program paused. */
8
+ export declare function isDebuggeePaused(sessionId: string | undefined): boolean;
9
+ /** Call `listener` with the session id each time a host debuggee pauses. */
10
+ export declare function onDebuggeePaused(listener: SessionListener): vscode.Disposable;
11
+ export {};
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ // Which debug sessions of the host's debug type are paused right now, read off
3
+ // the adapter's own messages. Implements [PROF-UI-AUTOPILOT] and
4
+ // [PROF-MEMORY-MODE]: a courier runtime is captured at a pause, and a direct
5
+ // runtime never while paused, because it cannot read a heap the debugger holds.
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.registerDebuggeePauseTracking = registerDebuggeePauseTracking;
41
+ exports.disposeDebuggeePauseTracking = disposeDebuggeePauseTracking;
42
+ exports.isDebuggeePaused = isDebuggeePaused;
43
+ exports.onDebuggeePaused = onDebuggeePaused;
44
+ const vscode = __importStar(require("vscode"));
45
+ const ids_1 = require("./ids");
46
+ const unknown_shape_1 = require("./unknown-shape");
47
+ /** Requests whose success means the debuggee runs again. */
48
+ const RESUMING_REQUESTS = new Set(["continue", "next", "stepIn", "stepOut", "stepBack", "reverseContinue", "goto"]);
49
+ const paused = new Set();
50
+ const pauseListeners = new Set();
51
+ /** Follow every host debug session's pauses and resumptions. */
52
+ function registerDebuggeePauseTracking() {
53
+ return [
54
+ vscode.debug.registerDebugAdapterTrackerFactory((0, ids_1.debugType)(), {
55
+ createDebugAdapterTracker: (session) => ({
56
+ onDidSendMessage: (message) => { observe(session.id, message); },
57
+ onWillStopSession: () => { paused.delete(session.id); },
58
+ }),
59
+ }),
60
+ { dispose: disposeDebuggeePauseTracking },
61
+ ];
62
+ }
63
+ /** Forget every session and listener (deactivation, test teardown). */
64
+ function disposeDebuggeePauseTracking() {
65
+ paused.clear();
66
+ pauseListeners.clear();
67
+ }
68
+ /** Whether the debugger holds `sessionId`'s program paused. */
69
+ function isDebuggeePaused(sessionId) {
70
+ return sessionId !== undefined && paused.has(sessionId);
71
+ }
72
+ /** Call `listener` with the session id each time a host debuggee pauses. */
73
+ function onDebuggeePaused(listener) {
74
+ pauseListeners.add(listener);
75
+ return { dispose: () => { pauseListeners.delete(listener); } };
76
+ }
77
+ function observe(sessionId, message) {
78
+ if (!(0, unknown_shape_1.isRecord)(message)) {
79
+ return;
80
+ }
81
+ if (message.type === "event") {
82
+ observeEvent(sessionId, message.event);
83
+ return;
84
+ }
85
+ if (message.type === "response" && message.success === true && RESUMING_REQUESTS.has(String(message.command))) {
86
+ resumed(sessionId);
87
+ }
88
+ }
89
+ /** Apply one DAP event to the pause bookkeeping. */
90
+ function observeEvent(sessionId, event) {
91
+ if (event === "stopped") {
92
+ paused.add(sessionId);
93
+ for (const listener of pauseListeners) {
94
+ listener(sessionId);
95
+ }
96
+ return;
97
+ }
98
+ if (event === "continued") {
99
+ resumed(sessionId);
100
+ return;
101
+ }
102
+ if (event === "terminated" || event === "exited") {
103
+ paused.delete(sessionId);
104
+ }
105
+ }
106
+ function resumed(sessionId) {
107
+ paused.delete(sessionId);
108
+ }
109
+ //# sourceMappingURL=debuggee-pause.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debuggee-pause.js","sourceRoot":"","sources":["../../src/debuggee-pause.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,iEAAiE;AACjE,6EAA6E;AAC7E,gFAAgF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhF,MAAY,MAAM,mCAAe;AACjC,+BAAkC;AAClC,mDAA2C;AAI3C,4DAA4D;AAC5D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,MAA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AI,OAAO,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC7B,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO;IACT,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAC9G,OAAO,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;AACH,CAAC;AAED,oDAAoD;AACpD,SAAS,YAAY,CAAC,SAAiB,EAAE,KAAc;IACrD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtB,KAAK,MAAM,QAAQ,IAAI,cAAc,EAAE,CAAC;YAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAAC,CAAC;QAC/D,OAAO;IACT,CAAC;IACD,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;QAC1B,OAAO,CAAC,SAAS,CAAC,CAAC;QACnB,OAAO;IACT,CAAC;IACD,IAAI,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;QAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAAC,CAAC;AACjF,CAAC;AAED,SAAS,OAAO,CAAC,SAAiB;IAChC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Keying a file path so a runtime's paths and the editor's agree.
3
+ *
4
+ * Every in-editor overlay the library paints — the CPU heat map, the memory track,
5
+ * the leak badges — matches rows produced by a Python runtime against the
6
+ * editors the user has open. Those two paths come from different producers and
7
+ * are only textually identical on POSIX: the runtime reports the interpreter's
8
+ * own filename, while `Uri.fsPath` hands back what VS Code resolved.
9
+ *
10
+ * On Windows they disagree in two ways — the drive letter's case, and 8.3 short
11
+ * components — so a raw string compare NEVER matches there and the overlay
12
+ * silently paints nothing: the data is correct, the editor just stays blank.
13
+ * That is a whole-feature outage that looks like "no results", which is exactly
14
+ * why it survived until win32 ran in CI.
15
+ *
16
+ * Shared rather than copied: the profiler learned this first, and the memory
17
+ * decorations had the identical latent bug.
18
+ */
19
+ /**
20
+ * Key a path for cross-producer comparison.
21
+ *
22
+ * Windows paths are case-insensitive, so folding case there is sound; POSIX
23
+ * paths are case-SENSITIVE, so it must not fold there.
24
+ */
25
+ export declare function editorPathKey(file: string): Promise<string>;
26
+ /**
27
+ * `editorPathKey` memoised for the length of one decoration pass.
28
+ *
29
+ * A profile or snapshot carries many rows across few files, and the expansion
30
+ * above hits the filesystem — so the same handful of paths would otherwise be
31
+ * looked up hundreds of times. The cache is per-pass rather than module-level
32
+ * so a file that moves between runs is never matched against a stale name.
33
+ * Every distinct file in `files` is resolved up front, so the returned lookup
34
+ * is pure; a file outside that set keys exactly as an unresolvable path does.
35
+ */
36
+ export declare function pathKeyer(files: readonly string[]): Promise<(file: string) => string>;
37
+ /** The editor surface a decoration pass paints: only its document's path matters here. */
38
+ export interface PathedEditor {
39
+ readonly document: {
40
+ readonly uri: {
41
+ readonly fsPath: string;
42
+ };
43
+ };
44
+ }
45
+ /** A `pathKeyer` over a pass's located rows and the editors it will paint. */
46
+ export declare function rowAndEditorKeyer(rows: readonly {
47
+ readonly file: string;
48
+ }[], editors: readonly PathedEditor[]): Promise<(file: string) => string>;
49
+ /** Group items by normalised file path (see `pathKey`) into a map. */
50
+ export declare function groupByFile<Item extends {
51
+ readonly file: string;
52
+ }>(items: readonly Item[], keyOf: (file: string) => string): Map<string, Item[]>;
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ // Implements [PROF-TESTING] path keying. See docs/specs/LSP-PROFILER-SPEC.md
3
+ /**
4
+ * Keying a file path so a runtime's paths and the editor's agree.
5
+ *
6
+ * Every in-editor overlay the library paints — the CPU heat map, the memory track,
7
+ * the leak badges — matches rows produced by a Python runtime against the
8
+ * editors the user has open. Those two paths come from different producers and
9
+ * are only textually identical on POSIX: the runtime reports the interpreter's
10
+ * own filename, while `Uri.fsPath` hands back what VS Code resolved.
11
+ *
12
+ * On Windows they disagree in two ways — the drive letter's case, and 8.3 short
13
+ * components — so a raw string compare NEVER matches there and the overlay
14
+ * silently paints nothing: the data is correct, the editor just stays blank.
15
+ * That is a whole-feature outage that looks like "no results", which is exactly
16
+ * why it survived until win32 ran in CI.
17
+ *
18
+ * Shared rather than copied: the profiler learned this first, and the memory
19
+ * decorations had the identical latent bug.
20
+ */
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.editorPathKey = editorPathKey;
26
+ exports.pathKeyer = pathKeyer;
27
+ exports.rowAndEditorKeyer = rowAndEditorKeyer;
28
+ exports.groupByFile = groupByFile;
29
+ const node_path_1 = __importDefault(require("node:path"));
30
+ const promises_1 = require("node:fs/promises");
31
+ /**
32
+ * Key a path for cross-producer comparison.
33
+ *
34
+ * Windows paths are case-insensitive, so folding case there is sound; POSIX
35
+ * paths are case-SENSITIVE, so it must not fold there.
36
+ */
37
+ async function editorPathKey(file) {
38
+ return foldCase(await canonicalPath(file));
39
+ }
40
+ function foldCase(canonical) {
41
+ return process.platform === "win32" ? canonical.toLowerCase() : canonical;
42
+ }
43
+ async function keyEntry(file) {
44
+ return [file, await editorPathKey(file)];
45
+ }
46
+ /**
47
+ * Resolve symlinks on every platform, and expand Windows 8.3 components.
48
+ *
49
+ * Case-folding alone is not enough. The two producers reach the same file by
50
+ * different routes: `os.tmpdir()` yields the short form Windows keeps for
51
+ * legacy callers (`C:\Users\RUNNER~1\…`), while a path the debug adapter or the
52
+ * editor resolved carries the long one (`C:\Users\runneradmin\…`). Those differ
53
+ * in more than case, so `path.resolve` leaves them unequal and the overlay
54
+ * matches nothing.
55
+ *
56
+ * `realpath` is what collapses the two spellings — it asks the
57
+ * filesystem for the name it actually records. It therefore touches disk and
58
+ * throws for a path that no longer exists, so a file that has since been
59
+ * deleted falls back to the resolved-but-unexpanded form rather than taking the
60
+ * whole decoration pass down with it. Callers memoise (see `pathKeyer`) so this
61
+ * costs one lookup per distinct file, not one per hot line.
62
+ */
63
+ async function canonicalPath(file) {
64
+ try {
65
+ return await (0, promises_1.realpath)(file);
66
+ }
67
+ catch {
68
+ return node_path_1.default.resolve(file);
69
+ }
70
+ }
71
+ /**
72
+ * `editorPathKey` memoised for the length of one decoration pass.
73
+ *
74
+ * A profile or snapshot carries many rows across few files, and the expansion
75
+ * above hits the filesystem — so the same handful of paths would otherwise be
76
+ * looked up hundreds of times. The cache is per-pass rather than module-level
77
+ * so a file that moves between runs is never matched against a stale name.
78
+ * Every distinct file in `files` is resolved up front, so the returned lookup
79
+ * is pure; a file outside that set keys exactly as an unresolvable path does.
80
+ */
81
+ async function pathKeyer(files) {
82
+ const distinct = [...new Set(files)];
83
+ const cache = new Map(await Promise.all(distinct.map(async (file) => keyEntry(file))));
84
+ return (file) => cache.get(file) ?? foldCase(node_path_1.default.resolve(file));
85
+ }
86
+ /** A `pathKeyer` over a pass's located rows and the editors it will paint. */
87
+ async function rowAndEditorKeyer(rows, editors) {
88
+ return pathKeyer([...rows.map(({ file }) => file), ...editors.map(({ document }) => document.uri.fsPath)]);
89
+ }
90
+ /** Group items by normalised file path (see `pathKey`) into a map. */
91
+ function groupByFile(items, keyOf) {
92
+ const grouped = new Map();
93
+ for (const item of items) {
94
+ const key = keyOf(item.file);
95
+ const existing = grouped.get(key);
96
+ if (existing === undefined) {
97
+ grouped.set(key, [item]);
98
+ }
99
+ else {
100
+ existing.push(item);
101
+ }
102
+ }
103
+ return grouped;
104
+ }
105
+ //# sourceMappingURL=editor-path-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-path-key.js","sourceRoot":"","sources":["../../src/editor-path-key.ts"],"names":[],"mappings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,KAAK,4BACV,IAA0C,EAC1C,OAAgC;IAEhC,OAAO,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7G,CAAC;AAED,sEAAsE;AACtE,qBACE,KAAsB,EACtB,KAA+B;IAE/B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** One spelling for a failed operation: its text, and how the user hears of it. */
2
+ /** The message an unknown thrown value carries. */
3
+ export declare function errorText(err: unknown): string;
4
+ /** Log that `what` failed and show the reason under the host's brand. */
5
+ export declare function reportFailure(what: string, err: unknown): void;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ // Implements [PROF-UI]. See docs/specs/LSP-PROFILER-SPEC.md
3
+ /** One spelling for a failed operation: its text, and how the user hears of it. */
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || (function () {
21
+ var ownKeys = function(o) {
22
+ ownKeys = Object.getOwnPropertyNames || function (o) {
23
+ var ar = [];
24
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
25
+ return ar;
26
+ };
27
+ return ownKeys(o);
28
+ };
29
+ return function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ })();
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.errorText = errorText;
39
+ exports.reportFailure = reportFailure;
40
+ const vscode = __importStar(require("vscode"));
41
+ const ids_1 = require("./ids");
42
+ const logger_1 = require("./logger");
43
+ /** The message an unknown thrown value carries. */
44
+ function errorText(err) {
45
+ return err instanceof Error ? err.message : String(err);
46
+ }
47
+ /** Log that `what` failed and show the reason under the host's brand. */
48
+ function reportFailure(what, err) {
49
+ const msg = errorText(err);
50
+ logger_1.Logger.error(`${what} failed: ${msg}`);
51
+ void vscode.window.showErrorMessage(`${(0, ids_1.brand)()}: ${msg}`);
52
+ }
53
+ //# sourceMappingURL=failure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure.js","sourceRoot":"","sources":["../../src/failure.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,mFAAmF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEnF,MAAY,MAAM,mCAAe;AACjC,+BAA8B;AAC9B,qCAAkC;AAElC,mDAAmD;AACnD,mBAA0B,GAAY;IACpC,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED,yEAAyE;AACzE,uBAA8B,IAAY,EAAE,GAAY;IACtD,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC3B,eAAM,CAAC,KAAK,CAAC,GAAG,IAAI,YAAY,GAAG,EAAE,CAAC,CAAC;IACvC,KAAK,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAA,WAAK,GAAE,KAAK,GAAG,EAAE,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The filesystem-backed log sink.
3
+ *
4
+ * A long-lived append-only sink, so it writes through a `WriteStream` rather
5
+ * than reopening the file per line. The stream is created with owner-only
6
+ * permissions because the log can contain workspace paths (defense-in-depth
7
+ * for js/insecure-temporary-file).
8
+ */
9
+ import type { LogSink } from "./logger";
10
+ /** Sink that appends to a file on disk. */
11
+ export declare class FileLogSink implements LogSink {
12
+ private readonly stream;
13
+ constructor(filePath: string);
14
+ trace(message: string): void;
15
+ debug(message: string): void;
16
+ info(message: string): void;
17
+ warn(message: string): void;
18
+ error(message: string): void;
19
+ private write;
20
+ }
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ // Implements [PROF-UI-HOST]. See docs/specs/LSP-PROFILER-SPEC.md
3
+ /**
4
+ * The filesystem-backed log sink.
5
+ *
6
+ * A long-lived append-only sink, so it writes through a `WriteStream` rather
7
+ * than reopening the file per line. The stream is created with owner-only
8
+ * permissions because the log can contain workspace paths (defense-in-depth
9
+ * for js/insecure-temporary-file).
10
+ */
11
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
+ desc = { enumerable: true, get: function() { return m[k]; } };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ }) : (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ }));
22
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
24
+ }) : function(o, v) {
25
+ o["default"] = v;
26
+ });
27
+ var __importStar = (this && this.__importStar) || (function () {
28
+ var ownKeys = function(o) {
29
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30
+ var ar = [];
31
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
+ return ar;
33
+ };
34
+ return ownKeys(o);
35
+ };
36
+ return function (mod) {
37
+ if (mod && mod.__esModule) return mod;
38
+ var result = {};
39
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
+ __setModuleDefault(result, mod);
41
+ return result;
42
+ };
43
+ })();
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.FileLogSink = void 0;
46
+ const fs = __importStar(require("node:fs"));
47
+ /**
48
+ * Log file permission bits: owner read+write only. The log can contain
49
+ * workspace paths, so it must never be group/world-readable
50
+ * (defense-in-depth for js/insecure-temporary-file).
51
+ */
52
+ const LOG_FILE_MODE = 0o600;
53
+ /** Sink that appends to a file on disk. */
54
+ class FileLogSink {
55
+ stream;
56
+ constructor(filePath) {
57
+ // Create+truncate with OWNER-ONLY (0o600) permissions so the log — which
58
+ // can contain workspace paths — is never world-readable, even if a caller
59
+ // ever points this at a shared directory (defense-in-depth for
60
+ // js/insecure-temporary-file; callers pass the extension's private logUri).
61
+ this.stream = fs.createWriteStream(filePath, { flags: "w", mode: LOG_FILE_MODE });
62
+ }
63
+ trace(message) { this.write("TRACE", message); }
64
+ debug(message) { this.write("DEBUG", message); }
65
+ info(message) { this.write("INFO ", message); }
66
+ warn(message) { this.write("WARN ", message); }
67
+ error(message) { this.write("ERROR", message); }
68
+ write(level, message) {
69
+ const timestamp = new Date().toISOString();
70
+ this.stream.write(`${timestamp} [${level}] ${message}\n`);
71
+ }
72
+ }
73
+ exports.FileLogSink = FileLogSink;
74
+ //# sourceMappingURL=file-log-sink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-log-sink.js","sourceRoot":"","sources":["../../src/file-log-sink.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,MAAY,EAAE,oCAAgB;AAG9B;;;;GAIG;AACH,MAAM,aAAa,GAAG,KAAK,CAAC;AAE5B,2CAA2C;AAC3C;IACmB,MAAM,CAAiB;IACxC,YAAmB,QAAgB;QACjC,yEAAyE;QACzE,0EAA0E;QAC1E,+DAA+D;QAC/D,4EAA4E;QAC5E,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;IACpF,CAAC;IACM,KAAK,CAAC,OAAe,IAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9D,KAAK,CAAC,OAAe,IAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAe,IAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7D,IAAI,CAAC,OAAe,IAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7D,KAAK,CAAC,OAAe,IAAU,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7D,KAAK,CAAC,KAAa,EAAE,OAAe;QAC1C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS,KAAK,KAAK,KAAK,OAAO,IAAI,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import type { FlameModel } from "./flame-model";
2
+ import type { ProfileSummary } from "./sample-summary";
3
+ export { escapeHtml } from "./profiler-styles";
4
+ /** The final path segment (both separators), for compact locations. */
5
+ export declare function pathBasename(filePath: string): string;
6
+ export declare const FLAME_CSS = "\n:root { color-scheme: light dark; }\n* { box-sizing: border-box; }\nbody {\n margin: 0; padding: 10px 14px; font-size: 12px;\n font-family: var(--vscode-font-family, sans-serif);\n color: var(--vscode-foreground); background: var(--vscode-editor-background);\n}\n.header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }\n.stats { color: var(--vscode-descriptionForeground); }\n.chip {\n border: 1px solid var(--vscode-panel-border, #5558); border-radius: 10px;\n background: var(--vscode-editorWidget-background); color: var(--vscode-foreground);\n padding: 1px 9px; cursor: pointer; font-size: 11px; font-family: inherit;\n}\n.chip.active { border-color: var(--vscode-focusBorder, #3794ff); }\n.toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }\n.toggle {\n border: 1px solid transparent; border-radius: 3px; padding: 2px 10px; cursor: pointer;\n background: var(--vscode-button-secondaryBackground, #3a3d41);\n color: var(--vscode-button-secondaryForeground, #ccc); font-family: inherit; font-size: 12px;\n}\n.toggle.active {\n background: var(--vscode-button-background, #0e639c);\n color: var(--vscode-button-foreground, #fff);\n}\n#fiber-select {\n background: var(--vscode-dropdown-background); color: var(--vscode-dropdown-foreground);\n border: 1px solid var(--vscode-dropdown-border, transparent); padding: 2px 4px; font-family: inherit;\n}\n#search {\n flex: 0 1 240px; padding: 2px 6px; font-family: inherit;\n background: var(--vscode-input-background); color: var(--vscode-input-foreground);\n border: 1px solid var(--vscode-input-border, transparent);\n}\n#flame-wrap { position: relative; border: 1px solid var(--vscode-panel-border, #5554); }\n#flame { display: block; max-width: 100%; }\n#tooltip {\n position: fixed; display: none; z-index: 10; pointer-events: none; max-width: 480px;\n padding: 6px 9px; font-size: 11px; border-radius: 3px;\n background: var(--vscode-editorHoverWidget-background, #252526);\n color: var(--vscode-editorHoverWidget-foreground, #ccc);\n border: 1px solid var(--vscode-editorHoverWidget-border, #454545);\n}\n.tt-name { font-weight: 600; }\n.tt-loc, .tt-nums { color: var(--vscode-descriptionForeground); }\n";
7
+ /** The interactive sampled view, mounted in the shared CPU results panel. */
8
+ export declare function flameBody(model: FlameModel, summary: ProfileSummary): string;