comfy-ts 2.24.0 → 2.25.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 (321) hide show
  1. package/dist/chunk-6mgjbrp6.js +579 -0
  2. package/dist/chunk-6mgjbrp6.js.map +17 -0
  3. package/dist/chunk-6tsg7fm5.js +1876 -0
  4. package/dist/chunk-6tsg7fm5.js.map +31 -0
  5. package/dist/chunk-dvxjvwe7.js +2593 -0
  6. package/dist/chunk-dvxjvwe7.js.map +29 -0
  7. package/dist/chunk-dw0t1nye.js +457 -0
  8. package/dist/chunk-dw0t1nye.js.map +16 -0
  9. package/dist/chunk-he70ewwx.js +444 -0
  10. package/dist/chunk-he70ewwx.js.map +13 -0
  11. package/dist/chunk-n22qz0j1.js +6663 -0
  12. package/dist/chunk-n22qz0j1.js.map +95 -0
  13. package/dist/chunk-n35nffm8.js +4777 -0
  14. package/dist/chunk-n35nffm8.js.map +51 -0
  15. package/dist/cli/serve/hostProtocol.d.cts +74 -0
  16. package/dist/cli/serve/hostProtocol.d.ts +74 -0
  17. package/dist/cli/tui-env.d.cts +2 -0
  18. package/dist/cli/tui-env.d.ts +2 -0
  19. package/dist/cli.js +494 -485
  20. package/dist/cli.js.map +16 -1
  21. package/dist/coreExports.d.cts +45 -0
  22. package/dist/coreExports.d.ts +45 -0
  23. package/dist/errors/InvalidPromptError.d.cts +10 -0
  24. package/dist/errors/InvalidPromptError.d.ts +10 -0
  25. package/dist/exampleAssets.d.cts +24 -0
  26. package/dist/exampleAssets.d.ts +24 -0
  27. package/dist/graph/ComfyNode.d.cts +109 -0
  28. package/dist/graph/ComfyNode.d.ts +109 -0
  29. package/dist/graph/ComfyNodeID.d.cts +15 -0
  30. package/dist/graph/ComfyNodeID.d.ts +15 -0
  31. package/dist/graph/ComfyNodeOutput.d.cts +21 -0
  32. package/dist/graph/ComfyNodeOutput.d.ts +21 -0
  33. package/dist/graph/NodeSlotSize.d.cts +4 -0
  34. package/dist/graph/NodeSlotSize.d.ts +4 -0
  35. package/dist/graph/autoValue.d.cts +16 -0
  36. package/dist/graph/autoValue.d.ts +16 -0
  37. package/dist/host/ComfyHost.d.cts +383 -0
  38. package/dist/host/ComfyHost.d.ts +383 -0
  39. package/dist/host/ComfyInstallType.d.cts +11 -0
  40. package/dist/host/ComfyInstallType.d.ts +11 -0
  41. package/dist/host/ComfyManager.d.cts +152 -0
  42. package/dist/host/ComfyManager.d.ts +152 -0
  43. package/dist/host/ComfyUploader.d.cts +42 -0
  44. package/dist/host/ComfyUploader.d.ts +42 -0
  45. package/dist/host/ComfyWorkflowBuilder.d.cts +19 -0
  46. package/dist/host/ComfyWorkflowBuilder.d.ts +19 -0
  47. package/dist/host/Requirements.d.cts +43 -0
  48. package/dist/host/Requirements.d.ts +43 -0
  49. package/dist/host/ResilientWebsocket.d.cts +122 -0
  50. package/dist/host/ResilientWebsocket.d.ts +122 -0
  51. package/dist/host/hostFile.d.cts +23 -0
  52. package/dist/host/hostFile.d.ts +23 -0
  53. package/dist/host/hostUrl.d.cts +22 -0
  54. package/dist/host/hostUrl.d.ts +22 -0
  55. package/dist/host/leastBusy.d.cts +9 -0
  56. package/dist/host/leastBusy.d.ts +9 -0
  57. package/dist/host/loraInfoCache.d.cts +110 -0
  58. package/dist/host/loraInfoCache.d.ts +110 -0
  59. package/dist/host/loraManagerApi.d.cts +106 -0
  60. package/dist/host/loraManagerApi.d.ts +106 -0
  61. package/dist/host/previewMethod.d.cts +5 -0
  62. package/dist/host/previewMethod.d.ts +5 -0
  63. package/dist/host/schemaDrift.d.cts +54 -0
  64. package/dist/host/schemaDrift.d.ts +54 -0
  65. package/dist/image-utils/_getPngMetadata.d.cts +5 -0
  66. package/dist/image-utils/_getPngMetadata.d.ts +5 -0
  67. package/dist/index.cjs +8197 -8509
  68. package/dist/index.cjs.map +124 -1
  69. package/dist/index.d.cts +4 -19116
  70. package/dist/index.d.ts +4 -19116
  71. package/dist/index.js +8129 -8390
  72. package/dist/index.js.map +124 -1
  73. package/dist/litegraph/CanonicalWorkflow.d.cts +75 -0
  74. package/dist/litegraph/CanonicalWorkflow.d.ts +75 -0
  75. package/dist/litegraph/LiteGraphGroup.d.cts +17 -0
  76. package/dist/litegraph/LiteGraphGroup.d.ts +17 -0
  77. package/dist/litegraph/LiteGraphJSON.d.cts +242 -0
  78. package/dist/litegraph/LiteGraphJSON.d.ts +242 -0
  79. package/dist/litegraph/LiteGraphLink.d.cts +48 -0
  80. package/dist/litegraph/LiteGraphLink.d.ts +48 -0
  81. package/dist/litegraph/LiteGraphLinkID.d.cts +6 -0
  82. package/dist/litegraph/LiteGraphLinkID.d.ts +6 -0
  83. package/dist/litegraph/LiteGraphNode.d.cts +76 -0
  84. package/dist/litegraph/LiteGraphNode.d.ts +76 -0
  85. package/dist/litegraph/LiteGraphNodeInput.d.cts +25 -0
  86. package/dist/litegraph/LiteGraphNodeInput.d.ts +25 -0
  87. package/dist/litegraph/LiteGraphNodeOutput.d.cts +20 -0
  88. package/dist/litegraph/LiteGraphNodeOutput.d.ts +20 -0
  89. package/dist/litegraph/LiteGraphSlotIndex.d.cts +6 -0
  90. package/dist/litegraph/LiteGraphSlotIndex.d.ts +6 -0
  91. package/dist/litegraph/LiteGraphSubgraphDef.d.cts +174 -0
  92. package/dist/litegraph/LiteGraphSubgraphDef.d.ts +174 -0
  93. package/dist/litegraph/convertFlowToLiteGraphJSON.d.cts +12 -0
  94. package/dist/litegraph/convertFlowToLiteGraphJSON.d.ts +12 -0
  95. package/dist/litegraph/expandSubgraphs.d.cts +27 -0
  96. package/dist/litegraph/expandSubgraphs.d.ts +27 -0
  97. package/dist/litegraph/normalizeWorkflow.d.cts +21 -0
  98. package/dist/litegraph/normalizeWorkflow.d.ts +21 -0
  99. package/dist/manager/ComfyRegistry.d.cts +54 -0
  100. package/dist/manager/ComfyRegistry.d.ts +54 -0
  101. package/dist/manager/generated/KnownComfyCustomNodeName.d.cts +1 -0
  102. package/dist/manager/generated/KnownComfyCustomNodeName.d.ts +1 -0
  103. package/dist/manager/generated/KnownComfyPluginTitle.d.cts +12109 -0
  104. package/dist/manager/generated/KnownComfyPluginTitle.d.ts +12109 -0
  105. package/dist/manager/generated/KnownComfyPluginURL.d.cts +1 -0
  106. package/dist/manager/generated/KnownComfyPluginURL.d.ts +1 -0
  107. package/dist/manager/generated/KnownModel_Base.d.cts +2 -0
  108. package/dist/manager/generated/KnownModel_Base.d.ts +2 -0
  109. package/dist/manager/generated/KnownModel_Name.d.cts +2842 -0
  110. package/dist/manager/generated/KnownModel_Name.d.ts +2842 -0
  111. package/dist/manager/generated/KnownModel_SavePath.d.cts +2 -0
  112. package/dist/manager/generated/KnownModel_SavePath.d.ts +2 -0
  113. package/dist/manager/generated/KnownModel_Type.d.cts +2 -0
  114. package/dist/manager/generated/KnownModel_Type.d.ts +2 -0
  115. package/dist/manager/installedView.d.cts +65 -0
  116. package/dist/manager/installedView.d.ts +65 -0
  117. package/dist/manager/json/custom-node-list.extra.d.cts +2 -0
  118. package/dist/manager/json/custom-node-list.extra.d.ts +2 -0
  119. package/dist/manager/json/model-list.extra.d.cts +2 -0
  120. package/dist/manager/json/model-list.extra.d.ts +2 -0
  121. package/dist/manager/loaders/parseReport.d.cts +24 -0
  122. package/dist/manager/loaders/parseReport.d.ts +24 -0
  123. package/dist/manager/loaders/step1_downloadComfyManagerJSONs.d.cts +1 -0
  124. package/dist/manager/loaders/step1_downloadComfyManagerJSONs.d.ts +1 -0
  125. package/dist/manager/loaders/step2_custom-node-list-loader.d.cts +2 -0
  126. package/dist/manager/loaders/step2_custom-node-list-loader.d.ts +2 -0
  127. package/dist/manager/loaders/step3_extension-node-map-loader.d.cts +2 -0
  128. package/dist/manager/loaders/step3_extension-node-map-loader.d.ts +2 -0
  129. package/dist/manager/loaders/step4_model-list-loader.d.cts +2 -0
  130. package/dist/manager/loaders/step4_model-list-loader.d.ts +2 -0
  131. package/dist/manager/loaders/step5_alter-list-loader.d.cts +2 -0
  132. package/dist/manager/loaders/step5_alter-list-loader.d.ts +2 -0
  133. package/dist/manager/loaders/step6_github-stats-loader.d.cts +2 -0
  134. package/dist/manager/loaders/step6_github-stats-loader.d.ts +2 -0
  135. package/dist/manager/types/ComfyManagerAPIFetchPolicy.d.cts +7 -0
  136. package/dist/manager/types/ComfyManagerAPIFetchPolicy.d.ts +7 -0
  137. package/dist/manager/types/ComfyManagerAPIModelList.d.cts +10 -0
  138. package/dist/manager/types/ComfyManagerAPIModelList.d.ts +10 -0
  139. package/dist/manager/types/ComfyManagerAPIPluginList.d.cts +33 -0
  140. package/dist/manager/types/ComfyManagerAPIPluginList.d.ts +33 -0
  141. package/dist/manager/types/ComfyManagerAlterInfo.d.cts +12 -0
  142. package/dist/manager/types/ComfyManagerAlterInfo.d.ts +12 -0
  143. package/dist/manager/types/ComfyManagerFileModelInfo.d.cts +10 -0
  144. package/dist/manager/types/ComfyManagerFileModelInfo.d.ts +10 -0
  145. package/dist/manager/types/ComfyManagerFilePluginContent.d.cts +11 -0
  146. package/dist/manager/types/ComfyManagerFilePluginContent.d.ts +11 -0
  147. package/dist/manager/types/ComfyManagerFilePluginList.d.cts +5 -0
  148. package/dist/manager/types/ComfyManagerFilePluginList.d.ts +5 -0
  149. package/dist/manager/types/ComfyManagerGithubStats.d.cts +7 -0
  150. package/dist/manager/types/ComfyManagerGithubStats.d.ts +7 -0
  151. package/dist/manager/types/ComfyManagerModelInfo.d.cts +12 -0
  152. package/dist/manager/types/ComfyManagerModelInfo.d.ts +12 -0
  153. package/dist/manager/types/ComfyManagerPluginContentMetadata.d.cts +10 -0
  154. package/dist/manager/types/ComfyManagerPluginContentMetadata.d.ts +10 -0
  155. package/dist/manager/types/ComfyManagerPluginEnums.d.cts +5 -0
  156. package/dist/manager/types/ComfyManagerPluginEnums.d.ts +5 -0
  157. package/dist/manager/types/ComfyManagerPluginInfo.d.cts +54 -0
  158. package/dist/manager/types/ComfyManagerPluginInfo.d.ts +54 -0
  159. package/dist/promptEnhancers.d.cts +22 -0
  160. package/dist/promptEnhancers.d.ts +22 -0
  161. package/dist/runner/ComfyExecution.d.cts +230 -0
  162. package/dist/runner/ComfyExecution.d.ts +230 -0
  163. package/dist/runner/ComfyExecutionStatus.d.cts +1 -0
  164. package/dist/runner/ComfyExecutionStatus.d.ts +1 -0
  165. package/dist/runner/ComfyWorkflow.d.cts +141 -0
  166. package/dist/runner/ComfyWorkflow.d.ts +141 -0
  167. package/dist/runner/ComfyWorkflowLayout.d.cts +17 -0
  168. package/dist/runner/ComfyWorkflowLayout.d.ts +17 -0
  169. package/dist/runner/ComfyWsApi.d.cts +2174 -0
  170. package/dist/runner/ComfyWsApi.d.ts +2174 -0
  171. package/dist/runner/MediaImage.d.cts +127 -0
  172. package/dist/runner/MediaImage.d.ts +127 -0
  173. package/dist/runner/comfyOrgApiKey.d.cts +21 -0
  174. package/dist/runner/comfyOrgApiKey.d.ts +21 -0
  175. package/dist/runner/describePromptRejection.d.cts +1 -0
  176. package/dist/runner/describePromptRejection.d.ts +1 -0
  177. package/dist/runner/ephemeral.d.cts +10 -0
  178. package/dist/runner/ephemeral.d.ts +10 -0
  179. package/dist/runner/historyReplay.d.cts +13 -0
  180. package/dist/runner/historyReplay.d.ts +13 -0
  181. package/dist/runner/mediaKinds.d.cts +7 -0
  182. package/dist/runner/mediaKinds.d.ts +7 -0
  183. package/dist/runner/outputPath.d.cts +40 -0
  184. package/dist/runner/outputPath.d.ts +40 -0
  185. package/dist/runner/outputs3d.d.cts +3 -0
  186. package/dist/runner/outputs3d.d.ts +3 -0
  187. package/dist/runner/wsBinaryFrame.d.cts +25 -0
  188. package/dist/runner/wsBinaryFrame.d.ts +25 -0
  189. package/dist/sdk-generator/ComfyNodeSchema.d.cts +25 -0
  190. package/dist/sdk-generator/ComfyNodeSchema.d.ts +25 -0
  191. package/dist/sdk-generator/ComfySchema.d.cts +74 -0
  192. package/dist/sdk-generator/ComfySchema.d.ts +74 -0
  193. package/dist/sdk-generator/ComfyUIObjectInfoTypes.d.cts +3072 -0
  194. package/dist/sdk-generator/ComfyUIObjectInfoTypes.d.ts +3072 -0
  195. package/dist/sdk-generator/Primitives.d.cts +12 -0
  196. package/dist/sdk-generator/Primitives.d.ts +12 -0
  197. package/dist/sdk-generator/_getUnionNameBasedOnFirstFoundEnumName.d.cts +2 -0
  198. package/dist/sdk-generator/_getUnionNameBasedOnFirstFoundEnumName.d.ts +2 -0
  199. package/dist/sdk-generator/_pythonModuleToNamespace.d.cts +1 -0
  200. package/dist/sdk-generator/_pythonModuleToNamespace.d.ts +1 -0
  201. package/dist/sdk-generator/_toQualifiedNodeKey.d.cts +1 -0
  202. package/dist/sdk-generator/_toQualifiedNodeKey.d.ts +1 -0
  203. package/dist/sdk-generator/comfy-api-json.d.cts +16 -0
  204. package/dist/sdk-generator/comfy-api-json.d.ts +16 -0
  205. package/dist/sdk-generator/comfyui-sdk-codegen.d.cts +23 -0
  206. package/dist/sdk-generator/comfyui-sdk-codegen.d.ts +23 -0
  207. package/dist/sdk-generator/comfyui-types.d.cts +55 -0
  208. package/dist/sdk-generator/comfyui-types.d.ts +55 -0
  209. package/dist/sdk-generator/inputWidgetKind.d.cts +80 -0
  210. package/dist/sdk-generator/inputWidgetKind.d.ts +80 -0
  211. package/dist/sdk-generator/litegraphToApiRequestPayload.d.cts +41 -0
  212. package/dist/sdk-generator/litegraphToApiRequestPayload.d.ts +41 -0
  213. package/dist/serve-web.js +51 -51
  214. package/dist/ssh-host-manager/ssh-config-manager.d.cts +17 -0
  215. package/dist/ssh-host-manager/ssh-config-manager.d.ts +17 -0
  216. package/dist/state.d.cts +80 -0
  217. package/dist/state.d.ts +80 -0
  218. package/dist/storage/ComfyStorage.d.cts +55 -0
  219. package/dist/storage/ComfyStorage.d.ts +55 -0
  220. package/dist/storage/nodeStorage.d.cts +2 -0
  221. package/dist/storage/nodeStorage.d.ts +2 -0
  222. package/dist/types/comfy-sdk.d.cts +85 -0
  223. package/dist/types/comfy-sdk.d.ts +85 -0
  224. package/dist/types/index.d.cts +65 -0
  225. package/dist/types/index.d.ts +65 -0
  226. package/dist/utils/CodeBuffer.d.cts +20 -0
  227. package/dist/utils/CodeBuffer.d.ts +20 -0
  228. package/dist/utils/ComfyColors.d.cts +14 -0
  229. package/dist/utils/ComfyColors.d.ts +14 -0
  230. package/dist/utils/ansi.d.cts +22 -0
  231. package/dist/utils/ansi.d.ts +22 -0
  232. package/dist/utils/bang.d.cts +9 -0
  233. package/dist/utils/bang.d.ts +9 -0
  234. package/dist/utils/deepCopyNaive.d.cts +1 -0
  235. package/dist/utils/deepCopyNaive.d.ts +1 -0
  236. package/dist/utils/downloadFile.d.cts +2 -0
  237. package/dist/utils/downloadFile.d.ts +2 -0
  238. package/dist/utils/escapeJSKey.d.cts +2 -0
  239. package/dist/utils/escapeJSKey.d.ts +2 -0
  240. package/dist/utils/exhaust.d.cts +1 -0
  241. package/dist/utils/exhaust.d.ts +1 -0
  242. package/dist/utils/extractErrorMessage.d.cts +2 -0
  243. package/dist/utils/extractErrorMessage.d.ts +2 -0
  244. package/dist/utils/githubRegexes.d.cts +2 -0
  245. package/dist/utils/githubRegexes.d.ts +2 -0
  246. package/dist/utils/hashArrayBuffer.d.cts +1 -0
  247. package/dist/utils/hashArrayBuffer.d.ts +1 -0
  248. package/dist/utils/isRecord.d.cts +2 -0
  249. package/dist/utils/isRecord.d.ts +2 -0
  250. package/dist/utils/lazySharp.d.cts +3 -0
  251. package/dist/utils/lazySharp.d.ts +3 -0
  252. package/dist/utils/log.d.cts +4 -0
  253. package/dist/utils/log.d.ts +4 -0
  254. package/dist/utils/loraTag.d.cts +8 -0
  255. package/dist/utils/loraTag.d.ts +8 -0
  256. package/dist/utils/matchesRegex.d.cts +2 -0
  257. package/dist/utils/matchesRegex.d.ts +2 -0
  258. package/dist/utils/printArkResultInConsole.d.cts +2 -0
  259. package/dist/utils/printArkResultInConsole.d.ts +2 -0
  260. package/dist/utils/safeName.d.cts +6 -0
  261. package/dist/utils/safeName.d.ts +6 -0
  262. package/dist/utils/sha1.d.cts +2 -0
  263. package/dist/utils/sha1.d.ts +2 -0
  264. package/dist/utils/softValidate.d.cts +2 -0
  265. package/dist/utils/softValidate.d.ts +2 -0
  266. package/dist/utils/stringifyReadable.d.cts +1 -0
  267. package/dist/utils/stringifyReadable.d.ts +1 -0
  268. package/dist/utils/toposort.d.cts +3 -0
  269. package/dist/utils/toposort.d.ts +3 -0
  270. package/dist/vars/ComfyVars.d.cts +607 -0
  271. package/dist/vars/ComfyVars.d.ts +607 -0
  272. package/dist/vars/DefinedWorkflow.d.cts +104 -0
  273. package/dist/vars/DefinedWorkflow.d.ts +104 -0
  274. package/dist/vars/lanes.d.cts +81 -0
  275. package/dist/vars/lanes.d.ts +81 -0
  276. package/dist/vars/loraEntry.d.cts +26 -0
  277. package/dist/vars/loraEntry.d.ts +26 -0
  278. package/dist/vars/loraKeywords.d.cts +19 -0
  279. package/dist/vars/loraKeywords.d.ts +19 -0
  280. package/dist/vars/outputWidgets.d.cts +33 -0
  281. package/dist/vars/outputWidgets.d.ts +33 -0
  282. package/dist/vars/presets.d.cts +9 -0
  283. package/dist/vars/presets.d.ts +9 -0
  284. package/dist/vars/promptSyntax.d.cts +98 -0
  285. package/dist/vars/promptSyntax.d.ts +98 -0
  286. package/dist/web.d.cts +2 -0
  287. package/dist/web.d.ts +2 -19160
  288. package/dist/web.js +8040 -8292
  289. package/dist/web.js.map +119 -1
  290. package/examples/depth-explorer/web/tsconfig.json +1 -2
  291. package/examples/upscale-explorer/web/tsconfig.json +1 -2
  292. package/examples/web/tsconfig.json +1 -4
  293. package/examples/world-explorer/web/tsconfig.json +1 -2
  294. package/package.json +27 -32
  295. package/src/cli/serve/web/components/SideMenu.tsx +1 -1
  296. package/src/cli/serve/web/components/controls/LorasControl.tsx +2 -0
  297. package/src/cli/serve/web/components/controls/RichSelect.tsx +1 -0
  298. package/src/cli/serve/web/state/RunSt.poll.test.ts +2 -1
  299. package/src/cli/serve/web/tsconfig.json +1 -2
  300. package/src/cli/serve/web/widgets/RelightWidget.tsx +1 -0
  301. package/src/cli/tui/state/HostSt.ts +1 -1
  302. package/src/host/loraManagerApi.ts +8 -3
  303. package/src/runner/ComfyExecution.ts +3 -1
  304. package/src/runner/ComfyWsApi.ts +2 -1
  305. package/src/storage/ComfyStorage.ts +5 -4
  306. package/src/types/comfy-sdk.ts +1 -0
  307. package/src/utils/ansi.ts +1 -0
  308. package/dist/ServeApp-fsHtW5zG.js +0 -2689
  309. package/dist/ServeApp-fsHtW5zG.js.map +0 -1
  310. package/dist/exampleAssets-DZynSkZm.js +0 -6674
  311. package/dist/exampleAssets-DZynSkZm.js.map +0 -1
  312. package/dist/findDefinedWorkflow-qyqFea7q.js +0 -625
  313. package/dist/findDefinedWorkflow-qyqFea7q.js.map +0 -1
  314. package/dist/run-run-Cn2JzKlE.js +0 -449
  315. package/dist/run-run-Cn2JzKlE.js.map +0 -1
  316. package/dist/run-serve-BhGegaCI.js +0 -464
  317. package/dist/run-serve-BhGegaCI.js.map +0 -1
  318. package/dist/run-tui-CrM4ijkH.js +0 -4569
  319. package/dist/run-tui-CrM4ijkH.js.map +0 -1
  320. package/dist/schemaDrift-BGYJZGMD.js +0 -2225
  321. package/dist/schemaDrift-BGYJZGMD.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,490 +1,499 @@
1
1
  #!/usr/bin/env node
2
- import { a as readableStringify, c as renderHttpBase, n as comfyTsPackageDir, o as ComfySchema, r as ComfyTS, s as writeHostFile } from "./exampleAssets-DZynSkZm.js";
3
- import { D as readLoraMirror, F as fetchLoraList, H as lmModelName, K as lmTrainedWords, _ as buildLoraMirror, j as writeLoraMirror } from "./schemaDrift-BGYJZGMD.js";
2
+ import {
3
+ renderHttpBase,
4
+ writeHostFile,
5
+ ComfySchema,
6
+ readableStringify,
7
+ ComfyTS,
8
+ comfyTsPackageDir
9
+ } from "./chunk-n22qz0j1.js";
10
+ import {
11
+ lmModelName,
12
+ lmTrainedWords,
13
+ fetchLoraList,
14
+ buildLoraMirror,
15
+ writeLoraMirror,
16
+ readLoraMirror
17
+ } from "./chunk-6tsg7fm5.js";
18
+
19
+ // src/cli/bunHop.ts
4
20
  import { spawn } from "node:child_process";
5
- import { constants, homedir } from "node:os";
6
- import { fileURLToPath } from "node:url";
7
- import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, rmdirSync, statSync, writeFileSync } from "node:fs";
8
- import { dirname, join, relative, resolve } from "pathe";
9
- import { createHash } from "node:crypto";
10
- //#region src/cli/bunHop.ts
11
- const HOP_PARENT_ENV = "COMFY_TS_HOP_PARENT";
12
- const FORWARDED = [
13
- "SIGINT",
14
- "SIGTERM",
15
- "SIGHUP"
16
- ];
17
- /** runs `bun <argv>` with the terminal inherited, forwarding the stop signals;
18
- * resolves the child's exit code, or `error` when bun cannot start */
21
+ import { constants } from "node:os";
22
+ var HOP_PARENT_ENV = "COMFY_TS_HOP_PARENT";
23
+ var FORWARDED = ["SIGINT", "SIGTERM", "SIGHUP"];
19
24
  function hopToBun(argv) {
20
- return new Promise((resolve) => {
21
- const child = spawn("bun", argv, {
22
- stdio: "inherit",
23
- env: {
24
- ...process.env,
25
- [HOP_PARENT_ENV]: String(process.pid)
26
- }
27
- });
28
- const forward = (signal) => {
29
- child.kill(signal);
30
- };
31
- for (const signal of FORWARDED) process.on(signal, forward);
32
- const done = (r) => {
33
- for (const signal of FORWARDED) process.off(signal, forward);
34
- resolve(r);
35
- };
36
- child.once("error", (error) => done({ error }));
37
- child.once("exit", (code, signal) => {
38
- if (code != null) return done({ code });
39
- done({ code: signal == null ? 1 : 128 + (constants.signals[signal] ?? 0) });
40
- });
41
- });
25
+ return new Promise((resolve) => {
26
+ const child = spawn("bun", argv, {
27
+ stdio: "inherit",
28
+ env: { ...process.env, [HOP_PARENT_ENV]: String(process.pid) }
29
+ });
30
+ const forward = (signal) => {
31
+ child.kill(signal);
32
+ };
33
+ for (const signal of FORWARDED)
34
+ process.on(signal, forward);
35
+ const done = (r) => {
36
+ for (const signal of FORWARDED)
37
+ process.off(signal, forward);
38
+ resolve(r);
39
+ };
40
+ child.once("error", (error) => done({ error }));
41
+ child.once("exit", (code, signal) => {
42
+ if (code != null)
43
+ return done({ code });
44
+ done({ code: signal == null ? 1 : 128 + (constants.signals[signal] ?? 0) });
45
+ });
46
+ });
42
47
  }
43
- /** in the bun child: exit once the process that started it is gone. A SIGKILL to
44
- * the wrapper reaches no handler, so the child polls its own ppid, which changes
45
- * (to 1, or a subreaper) when its parent dies. It watches the ppid it started
46
- * with, not the wrapper pid: a version manager shim may sit between the two */
47
48
  function armHopChild(p = {}) {
48
- if (process.env[HOP_PARENT_ENV] == null) return;
49
- Reflect.deleteProperty(process.env, HOP_PARENT_ENV);
50
- const parent = process.ppid;
51
- setInterval(() => {
52
- if (process.ppid === parent) return;
53
- console.error(`[comfy-ts] the process that started this one (pid ${parent}) is gone: exiting`);
54
- process.exit(1);
55
- }, p.intervalMs ?? 1e3).unref();
49
+ if (process.env[HOP_PARENT_ENV] == null)
50
+ return;
51
+ Reflect.deleteProperty(process.env, HOP_PARENT_ENV);
52
+ const parent = process.ppid;
53
+ setInterval(() => {
54
+ if (process.ppid === parent)
55
+ return;
56
+ console.error(`[comfy-ts] the process that started this one (pid ${parent}) is gone: exiting`);
57
+ process.exit(1);
58
+ }, p.intervalMs ?? 1000).unref();
56
59
  }
57
- //#endregion
58
- //#region src/cli/flags.ts
59
- /**
60
- * the CLI's one flag reader: `--name value`.
61
- * A flag written with no value after it is a TYPO, never a request for the
62
- * default — silently falling back would run against the wrong host.
63
- */
60
+
61
+ // src/cli/comfy-ts-cli.ts
62
+ import { fileURLToPath } from "node:url";
63
+
64
+ // src/cli/gen.ts
65
+ import { mkdirSync, writeFileSync } from "node:fs";
66
+ import { dirname, join, resolve } from "pathe";
67
+
68
+ // src/cli/flags.ts
64
69
  function flagReader(args) {
65
- return (name) => {
66
- const ix = args.indexOf(`--${name}`);
67
- if (ix < 0) return null;
68
- const value = args[ix + 1];
69
- if (value == null || value.startsWith("--")) throw new Error(`--${name} needs a value`);
70
- return value;
71
- };
70
+ return (name) => {
71
+ const ix = args.indexOf(`--${name}`);
72
+ if (ix < 0)
73
+ return null;
74
+ const value = args[ix + 1];
75
+ if (value == null || value.startsWith("--"))
76
+ throw new Error(`--${name} needs a value`);
77
+ return value;
78
+ };
72
79
  }
73
- //#endregion
74
- //#region src/cli/gen.ts
80
+
81
+ // src/cli/gen.ts
75
82
  async function runGen(args) {
76
- const getFlag = flagReader(args);
77
- const hostUrl = getFlag("host") ?? "http://127.0.0.1:8188";
78
- const id = getFlag("id");
79
- if (id == null) {
80
- console.error("[comfy-ts gen] 🔴 --id <host-id> is required (it names .comfy-ts/hosts/<id>/)");
81
- return 1;
82
- }
83
- const comfy = ComfyTS.create();
84
- const apiKey = getFlag("api-key") ?? process.env.COMFY_CLOUD_API_KEY;
85
- const host = comfy.host({
86
- id,
87
- url: hostUrl,
88
- apiKey: apiKey ?? void 0
89
- });
90
- const fetchJSON = async (route) => {
91
- console.log(`[comfy-ts gen] fetching ${hostUrl} ${route} …`);
92
- const res = await host.fetch(route);
93
- if (!res.ok) throw new Error(`GET ${route} failed on ${hostUrl}: ${res.status}`);
94
- if (!(res.headers.get("content-type") ?? "").includes("json")) throw new Error(`GET ${route} on ${hostUrl} did not answer json`);
95
- return await res.json();
96
- };
97
- const spec = await fetchJSON("/object_info");
98
- const embeddings = await fetchJSON("/embeddings").catch(() => []);
99
- const dir = host.cacheFolder;
100
- mkdirSync(dir, { recursive: true });
101
- writeFileSync(join(dir, "object_info.json"), readableStringify(spec, 4), "utf8");
102
- writeFileSync(join(dir, "embeddings.json"), JSON.stringify(embeddings), "utf8");
103
- const hostFile = writeHostFile(comfy.storage, dir, { url: renderHttpBase(host.base) });
104
- console.log(`[comfy-ts gen] 🟢 ${hostFile}: comfy.host({ id: '${id}' }) now finds this host`);
105
- const parsed = new ComfySchema({
106
- spec,
107
- embeddings
108
- });
109
- const dts = parsed.codegenDTS({ hostId: id });
110
- const out = getFlag("out");
111
- const outPath = out != null ? resolve(process.cwd(), out) : join(dir, "sdk.d.ts");
112
- if (out != null) mkdirSync(dirname(outPath), { recursive: true });
113
- writeFileSync(outPath, dts, "utf8");
114
- console.log(`[comfy-ts gen] 🟢 ${outPath} (${parsed.nodes.length} nodes, ${(dts.length / 1024).toFixed(0)}kB)`);
115
- if (out == null) console.log(`[comfy-ts gen] add ".comfy-ts/hosts/**/sdk.d.ts" to your tsconfig "include" to activate the types`);
116
- return 0;
83
+ const getFlag = flagReader(args);
84
+ const hostUrl = getFlag("host") ?? "http://127.0.0.1:8188";
85
+ const id = getFlag("id");
86
+ if (id == null) {
87
+ console.error("[comfy-ts gen] \uD83D\uDD34 --id <host-id> is required (it names .comfy-ts/hosts/<id>/)");
88
+ return 1;
89
+ }
90
+ const comfy = ComfyTS.create();
91
+ const apiKey = getFlag("api-key") ?? process.env.COMFY_CLOUD_API_KEY;
92
+ const host = comfy.host({ id, url: hostUrl, apiKey: apiKey ?? undefined });
93
+ const fetchJSON = async (route) => {
94
+ console.log(`[comfy-ts gen] fetching ${hostUrl} ${route} …`);
95
+ const res = await host.fetch(route);
96
+ if (!res.ok)
97
+ throw new Error(`GET ${route} failed on ${hostUrl}: ${res.status}`);
98
+ if (!(res.headers.get("content-type") ?? "").includes("json"))
99
+ throw new Error(`GET ${route} on ${hostUrl} did not answer json`);
100
+ return await res.json();
101
+ };
102
+ const spec = await fetchJSON("/object_info");
103
+ const embeddings = await fetchJSON("/embeddings").catch(() => []);
104
+ const dir = host.cacheFolder;
105
+ mkdirSync(dir, { recursive: true });
106
+ writeFileSync(join(dir, "object_info.json"), readableStringify(spec, 4), "utf8");
107
+ writeFileSync(join(dir, "embeddings.json"), JSON.stringify(embeddings), "utf8");
108
+ const hostFile = writeHostFile(comfy.storage, dir, { url: renderHttpBase(host.base) });
109
+ console.log(`[comfy-ts gen] \uD83D\uDFE2 ${hostFile}: comfy.host({ id: '${id}' }) now finds this host`);
110
+ const parsed = new ComfySchema({ spec, embeddings });
111
+ const dts = parsed.codegenDTS({ hostId: id });
112
+ const out = getFlag("out");
113
+ const outPath = out != null ? resolve(process.cwd(), out) : join(dir, "sdk.d.ts");
114
+ if (out != null)
115
+ mkdirSync(dirname(outPath), { recursive: true });
116
+ writeFileSync(outPath, dts, "utf8");
117
+ console.log(`[comfy-ts gen] \uD83D\uDFE2 ${outPath} (${parsed.nodes.length} nodes, ${(dts.length / 1024).toFixed(0)}kB)`);
118
+ if (out == null)
119
+ console.log(`[comfy-ts gen] add ".comfy-ts/hosts/**/sdk.d.ts" to your tsconfig "include" to activate the types`);
120
+ return 0;
117
121
  }
118
- //#endregion
119
- //#region src/cli/loras.ts
120
- const DEFAULT_HOST_URL = "http://127.0.0.1:8188";
121
- /** host ids already known on disk — `.comfy-ts/hosts/<id>/` is created by `comfy-ts gen` */
122
+
123
+ // src/cli/loras.ts
124
+ import { readdirSync, rmdirSync } from "node:fs";
125
+ import { join as join2 } from "pathe";
126
+ var DEFAULT_HOST_URL = "http://127.0.0.1:8188";
122
127
  function knownHostIds() {
123
- try {
124
- return readdirSync(join(process.cwd(), ".comfy-ts", "hosts"), { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
125
- } catch {
126
- return [];
127
- }
128
+ try {
129
+ return readdirSync(join2(process.cwd(), ".comfy-ts", "hosts"), { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
130
+ } catch {
131
+ return [];
132
+ }
128
133
  }
129
134
  async function runLoras(args) {
130
- const getFlag = flagReader(args);
131
- const known = knownHostIds();
132
- const id = getFlag("id") ?? (known.length === 1 ? known[0] : null);
133
- if (id == null) {
134
- const hint = known.length === 0 ? "none yet — run `comfy-ts gen --id <host-id> --host <url>` first" : known.join(", ");
135
- console.error(`[comfy-ts loras] 🔴 --id <host-id> is required (known: ${hint})`);
136
- return 1;
137
- }
138
- const hostDirExisted = known.includes(id);
139
- const comfy = ComfyTS.create();
140
- const previous = readLoraMirror(id);
141
- const hostUrl = getFlag("host") ?? (previous?.hostUrl !== "" ? previous?.hostUrl : null) ?? DEFAULT_HOST_URL;
142
- const apiKey = getFlag("api-key") ?? process.env.COMFY_CLOUD_API_KEY;
143
- const host = comfy.host({
144
- id,
145
- url: hostUrl,
146
- apiKey: apiKey ?? void 0
147
- });
148
- /** a sweep that never produced a mirror must leave no trace of this run */
149
- const abandon = () => {
150
- if (hostDirExisted) return;
151
- const dir = join(process.cwd(), ".comfy-ts", "hosts", id);
152
- try {
153
- if (readdirSync(dir).length === 0) rmdirSync(dir);
154
- } catch {}
155
- };
156
- console.log(`[comfy-ts loras] sweeping ${hostUrl} /api/lm/loras/list …`);
157
- const sweep = await fetchLoraList(host);
158
- if (sweep.status === "absent") {
159
- console.error(`[comfy-ts loras] 🔴 ${hostUrl} has no ComfyUI-Lora-Manager: the extension is not installed there. Mirror left untouched.`);
160
- abandon();
161
- return 1;
162
- }
163
- if (sweep.status === "unreachable") {
164
- console.error(`[comfy-ts loras] 🔴 ${hostUrl} unreachable — ${sweep.reason}. Mirror left untouched.`);
165
- abandon();
166
- return 1;
167
- }
168
- if (sweep.status === "partial") {
169
- console.error(`[comfy-ts loras] 🔴 the sweep broke off after ${sweep.items.length} loras (${sweep.reason}). Writing that would drop every lora past it, so the mirror is left untouched. Re-run when the host is healthy.`);
170
- abandon();
171
- return 1;
172
- }
173
- const mirror = buildLoraMirror({
174
- hostId: id,
175
- hostUrl,
176
- fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
177
- items: sweep.items
178
- });
179
- const path = writeLoraMirror(mirror);
180
- const before = previous?.loras ?? {};
181
- const added = [];
182
- const changed = [];
183
- let withWords = 0;
184
- for (const [key, item] of Object.entries(mirror.loras)) {
185
- const words = lmTrainedWords(item);
186
- if (words.length > 0) withWords++;
187
- const old = before[key];
188
- if (old == null) if (words.length > 0) added.push(`${key} → ${words.join(", ")}`);
189
- else added.push(key);
190
- else if (lmTrainedWords(old).join("\0") !== words.join("\0")) changed.push(`${key} → ${words.length === 0 ? "(cleared)" : words.join(", ")}`);
191
- }
192
- const removed = Object.keys(before).filter((k) => mirror.loras[k] == null);
193
- const sample = (label, lines) => {
194
- if (lines.length === 0) return;
195
- console.log(`[comfy-ts loras] ${label} (${lines.length}):`);
196
- for (const line of lines.slice(0, 10)) console.log(` ${line}`);
197
- if (lines.length > 10) console.log(` … +${lines.length - 10} more`);
198
- };
199
- sample("added", added);
200
- sample("trigger words changed", changed);
201
- sample("gone from the host", removed);
202
- const named = Object.values(mirror.loras).filter((i) => lmModelName(i) != null).length;
203
- console.log(`[comfy-ts loras] 🟢 ${path} — ${mirror.count} loras, ${withWords} with trigger words, ${named} with a model name`);
204
- if (previous == null) console.log(`[comfy-ts loras] next time: \`comfy-ts loras --id ${id}\` (url remembered)`);
205
- return 0;
135
+ const getFlag = flagReader(args);
136
+ const known = knownHostIds();
137
+ const explicitId = getFlag("id");
138
+ const id = explicitId ?? (known.length === 1 ? known[0] : null);
139
+ if (id == null) {
140
+ const hint = known.length === 0 ? "none yet — run `comfy-ts gen --id <host-id> --host <url>` first" : known.join(", ");
141
+ console.error(`[comfy-ts loras] \uD83D\uDD34 --id <host-id> is required (known: ${hint})`);
142
+ return 1;
143
+ }
144
+ const hostDirExisted = known.includes(id);
145
+ const comfy = ComfyTS.create();
146
+ const previous = readLoraMirror(id);
147
+ const hostUrl = getFlag("host") ?? (previous?.hostUrl !== "" ? previous?.hostUrl : null) ?? DEFAULT_HOST_URL;
148
+ const apiKey = getFlag("api-key") ?? process.env.COMFY_CLOUD_API_KEY;
149
+ const host = comfy.host({ id, url: hostUrl, apiKey: apiKey ?? undefined });
150
+ const abandon = () => {
151
+ if (hostDirExisted)
152
+ return;
153
+ const dir = join2(process.cwd(), ".comfy-ts", "hosts", id);
154
+ try {
155
+ if (readdirSync(dir).length === 0)
156
+ rmdirSync(dir);
157
+ } catch {}
158
+ };
159
+ console.log(`[comfy-ts loras] sweeping ${hostUrl} /api/lm/loras/list …`);
160
+ const sweep = await fetchLoraList(host);
161
+ if (sweep.status === "absent") {
162
+ console.error(`[comfy-ts loras] \uD83D\uDD34 ${hostUrl} has no ComfyUI-Lora-Manager: the extension is not installed there. Mirror left untouched.`);
163
+ abandon();
164
+ return 1;
165
+ }
166
+ if (sweep.status === "unreachable") {
167
+ console.error(`[comfy-ts loras] \uD83D\uDD34 ${hostUrl} unreachable — ${sweep.reason}. Mirror left untouched.`);
168
+ abandon();
169
+ return 1;
170
+ }
171
+ if (sweep.status === "partial") {
172
+ console.error(`[comfy-ts loras] \uD83D\uDD34 the sweep broke off after ${sweep.items.length} loras (${sweep.reason}). Writing that would drop every lora past it, so the mirror is left untouched. Re-run when the host is healthy.`);
173
+ abandon();
174
+ return 1;
175
+ }
176
+ const mirror = buildLoraMirror({ hostId: id, hostUrl, fetchedAt: new Date().toISOString(), items: sweep.items });
177
+ const path = writeLoraMirror(mirror);
178
+ const before = previous?.loras ?? {};
179
+ const added = [];
180
+ const changed = [];
181
+ let withWords = 0;
182
+ for (const [key, item] of Object.entries(mirror.loras)) {
183
+ const words = lmTrainedWords(item);
184
+ if (words.length > 0)
185
+ withWords++;
186
+ const old = before[key];
187
+ if (old == null) {
188
+ if (words.length > 0)
189
+ added.push(`${key} → ${words.join(", ")}`);
190
+ else
191
+ added.push(key);
192
+ } else if (lmTrainedWords(old).join("\x00") !== words.join("\x00")) {
193
+ changed.push(`${key} → ${words.length === 0 ? "(cleared)" : words.join(", ")}`);
194
+ }
195
+ }
196
+ const removed = Object.keys(before).filter((k) => mirror.loras[k] == null);
197
+ const sample = (label, lines) => {
198
+ if (lines.length === 0)
199
+ return;
200
+ console.log(`[comfy-ts loras] ${label} (${lines.length}):`);
201
+ for (const line of lines.slice(0, 10))
202
+ console.log(` ${line}`);
203
+ if (lines.length > 10)
204
+ console.log(` … +${lines.length - 10} more`);
205
+ };
206
+ sample("added", added);
207
+ sample("trigger words changed", changed);
208
+ sample("gone from the host", removed);
209
+ const named = Object.values(mirror.loras).filter((i) => lmModelName(i) != null).length;
210
+ console.log(`[comfy-ts loras] \uD83D\uDFE2 ${path} — ${mirror.count} loras, ${withWords} with trigger words, ${named} with a model name`);
211
+ if (previous == null)
212
+ console.log(`[comfy-ts loras] next time: \`comfy-ts loras --id ${id}\` (url remembered)`);
213
+ return 0;
206
214
  }
207
- //#endregion
208
- //#region src/cli/outline.ts
215
+
216
+ // src/cli/outline.ts
217
+ import { existsSync, readdirSync as readdirSync2, readFileSync } from "node:fs";
218
+ import { join as join3 } from "pathe";
209
219
  function findDefaultSdk() {
210
- const hostsDir = join(process.cwd(), ".comfy-ts", "hosts");
211
- if (!existsSync(hostsDir)) return null;
212
- for (const id of readdirSync(hostsDir)) {
213
- const p = join(hostsDir, id, "sdk.d.ts");
214
- if (existsSync(p)) return p;
215
- }
216
- return null;
220
+ const hostsDir = join3(process.cwd(), ".comfy-ts", "hosts");
221
+ if (!existsSync(hostsDir))
222
+ return null;
223
+ for (const id of readdirSync2(hostsDir)) {
224
+ const p = join3(hostsDir, id, "sdk.d.ts");
225
+ if (existsSync(p))
226
+ return p;
227
+ }
228
+ return null;
217
229
  }
218
230
  function runOutline(args) {
219
- const linesFlagIx = args.indexOf("--lines");
220
- const maxLines = linesFlagIx >= 0 ? Number(args[linesFlagIx + 1] ?? 10) : null;
221
- const sectionFlagIx = args.indexOf("--section");
222
- const wantedSection = sectionFlagIx >= 0 ? args[sectionFlagIx + 1] : null;
223
- const flagValueIxs = new Set([linesFlagIx + 1, sectionFlagIx + 1].filter((ix) => ix > 0));
224
- const file = args.find((a, ix) => !a.startsWith("--") && !flagValueIxs.has(ix)) ?? findDefaultSdk();
225
- if (file == null || !existsSync(file)) {
226
- console.error("[sdk-outline] 🔴 no sdk.d.ts found; pass a path explicitly");
227
- return 1;
228
- }
229
- const lines = readFileSync(file, "utf8").split("\n");
230
- const sections = [];
231
- const stack = [];
232
- let depth = 0;
233
- const declRe = /^\s*(?:export\s+)?(interface|namespace|type)\s+([A-Za-z0-9_$]+)/;
234
- for (let i = 0; i < lines.length; i++) {
235
- const line = lines[i] ?? "";
236
- const m = depth <= 3 ? declRe.exec(line) : null;
237
- const opens = (line.match(/{/g) ?? []).length;
238
- const closes = (line.match(/}/g) ?? []).length;
239
- if (m && (opens > 0 || m[1] === "type")) {
240
- const sec = {
241
- name: m[2] ?? "?",
242
- kind: m[1] ?? "?",
243
- start: i + 1,
244
- end: i + 1,
245
- depth
246
- };
247
- sections.push(sec);
248
- if (opens > closes) stack.push(sec);
249
- }
250
- depth += opens - closes;
251
- while (stack.length > 0 && depth <= (stack[stack.length - 1]?.depth ?? 0)) {
252
- const closed = stack.pop();
253
- if (closed) closed.end = i + 1;
254
- }
255
- const last = sections[sections.length - 1];
256
- if (last && last.kind === "type" && stack[stack.length - 1] !== last) last.end = Math.max(last.end, i);
257
- }
258
- if (wantedSection) {
259
- const sec = sections.find((s) => s.name === wantedSection);
260
- if (sec == null) {
261
- console.error(`[sdk-outline] 🔴 section "${wantedSection}" not found. Available: ${sections.map((s) => s.name).join(", ")}`);
262
- return 1;
263
- }
264
- const body = lines.slice(sec.start - 1, maxLines ? Math.min(sec.end, sec.start - 1 + maxLines) : sec.end);
265
- console.log(body.join("\n"));
266
- if (maxLines && sec.end - sec.start + 1 > maxLines) console.log(`… (${sec.end - sec.start + 1 - maxLines} more lines, ends at line ${sec.end})`);
267
- } else {
268
- console.log(`${file} — ${lines.length} lines\n`);
269
- for (const s of sections) {
270
- const indent = " ".repeat(s.depth);
271
- console.log(`${indent}${s.kind} ${s.name} [${s.start}-${s.end}] (${s.end - s.start + 1} lines)`);
272
- if (maxLines) {
273
- const body = lines.slice(s.start - 1, s.start - 1 + maxLines);
274
- console.log(body.map((l) => `${indent} │ ${l.trim()}`).join("\n"));
275
- }
276
- }
277
- }
278
- return 0;
231
+ const linesFlagIx = args.indexOf("--lines");
232
+ const maxLines = linesFlagIx >= 0 ? Number(args[linesFlagIx + 1] ?? 10) : null;
233
+ const sectionFlagIx = args.indexOf("--section");
234
+ const wantedSection = sectionFlagIx >= 0 ? args[sectionFlagIx + 1] : null;
235
+ const flagValueIxs = new Set([linesFlagIx + 1, sectionFlagIx + 1].filter((ix) => ix > 0));
236
+ const fileArg = args.find((a, ix) => !a.startsWith("--") && !flagValueIxs.has(ix));
237
+ const file = fileArg ?? findDefaultSdk();
238
+ if (file == null || !existsSync(file)) {
239
+ console.error("[sdk-outline] \uD83D\uDD34 no sdk.d.ts found; pass a path explicitly");
240
+ return 1;
241
+ }
242
+ const lines = readFileSync(file, "utf8").split(`
243
+ `);
244
+ const sections = [];
245
+ const stack = [];
246
+ let depth = 0;
247
+ const declRe = /^\s*(?:export\s+)?(interface|namespace|type)\s+([A-Za-z0-9_$]+)/;
248
+ for (let i = 0;i < lines.length; i++) {
249
+ const line = lines[i] ?? "";
250
+ const m = depth <= 3 ? declRe.exec(line) : null;
251
+ const opens = (line.match(/{/g) ?? []).length;
252
+ const closes = (line.match(/}/g) ?? []).length;
253
+ if (m && (opens > 0 || m[1] === "type")) {
254
+ const sec = { name: m[2] ?? "?", kind: m[1] ?? "?", start: i + 1, end: i + 1, depth };
255
+ sections.push(sec);
256
+ if (opens > closes)
257
+ stack.push(sec);
258
+ }
259
+ depth += opens - closes;
260
+ while (stack.length > 0 && depth <= (stack[stack.length - 1]?.depth ?? 0)) {
261
+ const closed = stack.pop();
262
+ if (closed)
263
+ closed.end = i + 1;
264
+ }
265
+ const last = sections[sections.length - 1];
266
+ if (last && last.kind === "type" && stack[stack.length - 1] !== last)
267
+ last.end = Math.max(last.end, i);
268
+ }
269
+ if (wantedSection) {
270
+ const sec = sections.find((s) => s.name === wantedSection);
271
+ if (sec == null) {
272
+ console.error(`[sdk-outline] \uD83D\uDD34 section "${wantedSection}" not found. Available: ${sections.map((s) => s.name).join(", ")}`);
273
+ return 1;
274
+ }
275
+ const body = lines.slice(sec.start - 1, maxLines ? Math.min(sec.end, sec.start - 1 + maxLines) : sec.end);
276
+ console.log(body.join(`
277
+ `));
278
+ if (maxLines && sec.end - sec.start + 1 > maxLines)
279
+ console.log(`… (${sec.end - sec.start + 1 - maxLines} more lines, ends at line ${sec.end})`);
280
+ } else {
281
+ console.log(`${file} — ${lines.length} lines
282
+ `);
283
+ for (const s of sections) {
284
+ const indent = " ".repeat(s.depth);
285
+ console.log(`${indent}${s.kind} ${s.name} [${s.start}-${s.end}] (${s.end - s.start + 1} lines)`);
286
+ if (maxLines) {
287
+ const body = lines.slice(s.start - 1, s.start - 1 + maxLines);
288
+ console.log(body.map((l) => `${indent} │ ${l.trim()}`).join(`
289
+ `));
290
+ }
291
+ }
292
+ }
293
+ return 0;
279
294
  }
280
- //#endregion
281
- //#region src/cli/skill.ts
282
- const SKILL_PREFIX = "comfy-ts-";
283
- const SKILL_RECORD_FILE = ".comfy-ts-skills.json";
284
- const SKILL_USAGE = `comfy-ts skill install [--user | --dir <skills-dir>] [--force]
295
+
296
+ // src/cli/skill.ts
297
+ import { createHash } from "node:crypto";
298
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readdirSync as readdirSync3, readFileSync as readFileSync2, rmdirSync as rmdirSync2, rmSync, statSync, writeFileSync as writeFileSync2 } from "node:fs";
299
+ import { homedir } from "node:os";
300
+ import { dirname as dirname2, join as join4, relative, resolve as resolve2 } from "pathe";
301
+ var SKILL_PREFIX = "comfy-ts-";
302
+ var SKILL_RECORD_FILE = ".comfy-ts-skills.json";
303
+ var SKILL_USAGE = `comfy-ts skill install [--user | --dir <skills-dir>] [--force]
285
304
  copy the comfy-ts Claude Code skills into .claude/skills/ of the cwd (--user: your personal
286
305
  skills folder, --dir: that folder): /comfy-ts-guide, /comfy-ts-setup, /comfy-ts-workflow,
287
306
  /comfy-ts-convert, /comfy-ts-run. A rerun updates what it wrote; a file you edited is never
288
307
  overwritten without --force. The same skills ship as a Claude Code plugin:
289
308
  /plugin marketplace add rvion/comfy-ts, then /plugin install comfy-ts@comfy-ts`;
290
- /** claude-code/skills/ of the installed package, resolved from this module, never from the cwd */
291
309
  function skillSourceDir() {
292
- const pkgDir = comfyTsPackageDir(import.meta.url);
293
- if (pkgDir == null) throw new Error("cannot find the comfy-ts package this command runs from");
294
- const dir = join(pkgDir, "claude-code", "skills");
295
- if (!existsSync(dir)) throw new Error(`the comfy-ts package has no skills folder at ${dir}`);
296
- return dir;
310
+ const pkgDir = comfyTsPackageDir(import.meta.url);
311
+ if (pkgDir == null)
312
+ throw new Error("cannot find the comfy-ts package this command runs from");
313
+ const dir = join4(pkgDir, "claude-code", "skills");
314
+ if (!existsSync2(dir))
315
+ throw new Error(`the comfy-ts package has no skills folder at ${dir}`);
316
+ return dir;
297
317
  }
298
- const sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
299
- /** every file under a skill folder, as paths relative to it */
318
+ var sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
300
319
  function filesUnder(dir, prefix = "") {
301
- const out = [];
302
- for (const name of readdirSync(dir).sort()) {
303
- const abs = join(dir, name);
304
- if (statSync(abs).isDirectory()) out.push(...filesUnder(abs, `${prefix}${name}/`));
305
- else out.push(`${prefix}${name}`);
306
- }
307
- return out;
320
+ const out = [];
321
+ for (const name of readdirSync3(dir).sort()) {
322
+ const abs = join4(dir, name);
323
+ if (statSync(abs).isDirectory())
324
+ out.push(...filesUnder(abs, `${prefix}${name}/`));
325
+ else
326
+ out.push(`${prefix}${name}`);
327
+ }
328
+ return out;
308
329
  }
309
330
  function readRecord(path) {
310
- if (!existsSync(path)) return null;
311
- let parsed;
312
- try {
313
- parsed = JSON.parse(readFileSync(path, "utf8"));
314
- } catch (e) {
315
- throw new Error(`${path} is not valid json (${e instanceof Error ? e.message : String(e)}): fix or delete it`, { cause: e });
316
- }
317
- if (typeof parsed !== "object" || parsed == null || !("files" in parsed)) throw new Error(`${path} has no "files" map: fix or delete it`);
318
- const files = parsed.files;
319
- if (typeof files !== "object" || files == null) throw new Error(`${path} has no "files" map: fix or delete it`);
320
- const out = {};
321
- for (const [k, v] of Object.entries(files)) if (typeof v === "string") out[k] = v;
322
- return {
323
- version: "version" in parsed && typeof parsed.version === "string" ? parsed.version : "",
324
- files: out
325
- };
331
+ if (!existsSync2(path))
332
+ return null;
333
+ let parsed;
334
+ try {
335
+ parsed = JSON.parse(readFileSync2(path, "utf8"));
336
+ } catch (e) {
337
+ throw new Error(`${path} is not valid json (${e instanceof Error ? e.message : String(e)}): fix or delete it`, {
338
+ cause: e
339
+ });
340
+ }
341
+ if (typeof parsed !== "object" || parsed == null || !("files" in parsed)) {
342
+ throw new Error(`${path} has no "files" map: fix or delete it`);
343
+ }
344
+ const files = parsed.files;
345
+ if (typeof files !== "object" || files == null)
346
+ throw new Error(`${path} has no "files" map: fix or delete it`);
347
+ const out = {};
348
+ for (const [k, v] of Object.entries(files))
349
+ if (typeof v === "string")
350
+ out[k] = v;
351
+ const version = "version" in parsed && typeof parsed.version === "string" ? parsed.version : "";
352
+ return { version, files: out };
326
353
  }
327
354
  function packageVersion(pkgDir) {
328
- const parsed = JSON.parse(readFileSync(join(pkgDir, "package.json"), "utf8"));
329
- if (typeof parsed === "object" && parsed != null && "version" in parsed && typeof parsed.version === "string") return parsed.version;
330
- throw new Error(`${join(pkgDir, "package.json")} has no version`);
355
+ const parsed = JSON.parse(readFileSync2(join4(pkgDir, "package.json"), "utf8"));
356
+ if (typeof parsed === "object" && parsed != null && "version" in parsed && typeof parsed.version === "string") {
357
+ return parsed.version;
358
+ }
359
+ throw new Error(`${join4(pkgDir, "package.json")} has no version`);
331
360
  }
332
- /**
333
- * plan, then write only when nothing conflicts (or `force`): a conflict anywhere writes nothing,
334
- * so a refused install never leaves half an update behind
335
- */
336
361
  function installSkills(p) {
337
- const recordPath = join(p.to, SKILL_RECORD_FILE);
338
- const record = readRecord(recordPath);
339
- const source = /* @__PURE__ */ new Map();
340
- const commands = [];
341
- for (const skill of readdirSync(p.from).sort()) {
342
- if (!statSync(join(p.from, skill)).isDirectory()) continue;
343
- commands.push(`/${SKILL_PREFIX}${skill}`);
344
- for (const f of filesUnder(join(p.from, skill))) source.set(`${SKILL_PREFIX}${skill}/${f}`, readFileSync(join(p.from, skill, f)));
345
- }
346
- const lines = [];
347
- const writes = [];
348
- const removals = [];
349
- for (const [rel, bytes] of source) {
350
- const abs = join(p.to, rel);
351
- if (!existsSync(abs)) {
352
- lines.push({
353
- action: "created",
354
- file: abs
355
- });
356
- writes.push(rel);
357
- continue;
358
- }
359
- const onDisk = readFileSync(abs);
360
- if (onDisk.equals(bytes)) lines.push({
361
- action: "unchanged",
362
- file: abs
363
- });
364
- else if (record?.files[rel] === sha256(onDisk)) {
365
- lines.push({
366
- action: "updated",
367
- file: abs
368
- });
369
- writes.push(rel);
370
- } else if (p.force) {
371
- lines.push({
372
- action: "overwritten",
373
- file: abs
374
- });
375
- writes.push(rel);
376
- } else lines.push({
377
- action: "conflict",
378
- file: abs
379
- });
380
- }
381
- for (const [rel, hash] of Object.entries(record?.files ?? {})) {
382
- const abs = join(p.to, rel);
383
- if (source.has(rel) || !existsSync(abs)) continue;
384
- if (sha256(readFileSync(abs)) === hash) {
385
- lines.push({
386
- action: "removed",
387
- file: abs
388
- });
389
- removals.push(rel);
390
- } else lines.push({
391
- action: "kept",
392
- file: abs
393
- });
394
- }
395
- if (lines.some((l) => l.action === "conflict")) return {
396
- ok: false,
397
- lines,
398
- commands
399
- };
400
- for (const rel of writes) {
401
- const abs = join(p.to, rel);
402
- mkdirSync(dirname(abs), { recursive: true });
403
- writeFileSync(abs, source.get(rel) ?? Buffer.alloc(0));
404
- }
405
- for (const rel of removals) {
406
- const abs = join(p.to, rel);
407
- rmSync(abs);
408
- const dir = dirname(abs);
409
- if (readdirSync(dir).length === 0) rmdirSync(dir);
410
- }
411
- const files = {};
412
- for (const [rel, bytes] of source) files[rel] = sha256(bytes);
413
- mkdirSync(p.to, { recursive: true });
414
- writeFileSync(recordPath, `${JSON.stringify({
415
- version: p.version,
416
- files
417
- }, null, 3)}\n`);
418
- return {
419
- ok: true,
420
- lines,
421
- commands
422
- };
362
+ const recordPath = join4(p.to, SKILL_RECORD_FILE);
363
+ const record = readRecord(recordPath);
364
+ const source = new Map;
365
+ const commands = [];
366
+ for (const skill of readdirSync3(p.from).sort()) {
367
+ if (!statSync(join4(p.from, skill)).isDirectory())
368
+ continue;
369
+ commands.push(`/${SKILL_PREFIX}${skill}`);
370
+ for (const f of filesUnder(join4(p.from, skill))) {
371
+ source.set(`${SKILL_PREFIX}${skill}/${f}`, readFileSync2(join4(p.from, skill, f)));
372
+ }
373
+ }
374
+ const lines = [];
375
+ const writes = [];
376
+ const removals = [];
377
+ for (const [rel, bytes] of source) {
378
+ const abs = join4(p.to, rel);
379
+ if (!existsSync2(abs)) {
380
+ lines.push({ action: "created", file: abs });
381
+ writes.push(rel);
382
+ continue;
383
+ }
384
+ const onDisk = readFileSync2(abs);
385
+ if (onDisk.equals(bytes))
386
+ lines.push({ action: "unchanged", file: abs });
387
+ else if (record?.files[rel] === sha256(onDisk)) {
388
+ lines.push({ action: "updated", file: abs });
389
+ writes.push(rel);
390
+ } else if (p.force) {
391
+ lines.push({ action: "overwritten", file: abs });
392
+ writes.push(rel);
393
+ } else
394
+ lines.push({ action: "conflict", file: abs });
395
+ }
396
+ for (const [rel, hash] of Object.entries(record?.files ?? {})) {
397
+ const abs = join4(p.to, rel);
398
+ if (source.has(rel) || !existsSync2(abs))
399
+ continue;
400
+ if (sha256(readFileSync2(abs)) === hash) {
401
+ lines.push({ action: "removed", file: abs });
402
+ removals.push(rel);
403
+ } else
404
+ lines.push({ action: "kept", file: abs });
405
+ }
406
+ if (lines.some((l) => l.action === "conflict"))
407
+ return { ok: false, lines, commands };
408
+ for (const rel of writes) {
409
+ const abs = join4(p.to, rel);
410
+ mkdirSync2(dirname2(abs), { recursive: true });
411
+ writeFileSync2(abs, source.get(rel) ?? Buffer.alloc(0));
412
+ }
413
+ for (const rel of removals) {
414
+ const abs = join4(p.to, rel);
415
+ rmSync(abs);
416
+ const dir = dirname2(abs);
417
+ if (readdirSync3(dir).length === 0)
418
+ rmdirSync2(dir);
419
+ }
420
+ const files = {};
421
+ for (const [rel, bytes] of source)
422
+ files[rel] = sha256(bytes);
423
+ mkdirSync2(p.to, { recursive: true });
424
+ writeFileSync2(recordPath, `${JSON.stringify({ version: p.version, files }, null, 3)}
425
+ `);
426
+ return { ok: true, lines, commands };
423
427
  }
424
- const MARK = {
425
- created: "+",
426
- unchanged: "=",
427
- updated: "~",
428
- overwritten: "!",
429
- removed: "-",
430
- kept: "?",
431
- conflict: "✗"
428
+ var MARK = {
429
+ created: "+",
430
+ unchanged: "=",
431
+ updated: "~",
432
+ overwritten: "!",
433
+ removed: "-",
434
+ kept: "?",
435
+ conflict: "✗"
432
436
  };
433
437
  function runSkill(args, p = {}) {
434
- const log = p.log ?? console.log;
435
- const cwd = p.cwd ?? process.cwd();
436
- const env = p.env ?? process.env;
437
- const sub = args[0];
438
- const rest = args.slice(1);
439
- if (sub == null || sub === "help" || sub === "--help" || rest.includes("--help")) {
440
- log(SKILL_USAGE);
441
- return 0;
442
- }
443
- if (sub !== "install") throw new Error(`unknown skill command "${sub}"\n${SKILL_USAGE}`);
444
- let user = false;
445
- let force = false;
446
- let dir = null;
447
- for (let i = 0; i < rest.length; i++) {
448
- const a = rest[i];
449
- if (a === "--user") user = true;
450
- else if (a === "--force") force = true;
451
- else if (a === "--dir") {
452
- const v = rest[++i];
453
- if (v == null || v.startsWith("--")) throw new Error("--dir needs a value");
454
- dir = v;
455
- } else throw new Error(`unknown argument "${a}"\n${SKILL_USAGE}`);
456
- }
457
- if (user && dir != null) throw new Error("--user and --dir name two targets: pass one");
458
- const configDir = env.CLAUDE_CONFIG_DIR ?? join(env.HOME ?? homedir(), ".claude");
459
- const to = dir != null ? resolve(cwd, dir) : user ? join(configDir, "skills") : join(cwd, ".claude", "skills");
460
- const from = skillSourceDir();
461
- const version = packageVersion(dirname(dirname(from)));
462
- const show = (abs) => {
463
- const rel = relative(cwd, abs);
464
- return rel.startsWith("..") ? abs : rel;
465
- };
466
- const report = installSkills({
467
- from,
468
- to,
469
- force,
470
- version
471
- });
472
- log(`[comfy-ts skill] comfy-ts ${version} skills → ${show(to)}`);
473
- for (const l of report.lines) log(` ${MARK[l.action]} ${l.action.padEnd(11)} ${show(l.file)}`);
474
- if (!report.ok) {
475
- const n = report.lines.filter((l) => l.action === "conflict").length;
476
- log(`[comfy-ts skill] 🔴 ${n} file(s) changed since comfy-ts wrote them (✗ above): nothing was written. Keep your edits, or rerun with --force to overwrite them`);
477
- return 1;
478
- }
479
- const kept = report.lines.filter((l) => l.action === "kept").length;
480
- if (kept > 0) log(`[comfy-ts skill] ${kept} file(s) no longer shipped were kept because you edited them (? above)`);
481
- log(`[comfy-ts skill] 🟢 Claude Code commands: ${report.commands.join(" ")}`);
482
- log(`[comfy-ts skill] a session started before this skills folder existed needs /reload-skills`);
483
- return 0;
438
+ const log = p.log ?? console.log;
439
+ const cwd = p.cwd ?? process.cwd();
440
+ const env = p.env ?? process.env;
441
+ const sub = args[0];
442
+ const rest = args.slice(1);
443
+ if (sub == null || sub === "help" || sub === "--help" || rest.includes("--help")) {
444
+ log(SKILL_USAGE);
445
+ return 0;
446
+ }
447
+ if (sub !== "install")
448
+ throw new Error(`unknown skill command "${sub}"
449
+ ${SKILL_USAGE}`);
450
+ let user = false;
451
+ let force = false;
452
+ let dir = null;
453
+ for (let i = 0;i < rest.length; i++) {
454
+ const a = rest[i];
455
+ if (a === "--user")
456
+ user = true;
457
+ else if (a === "--force")
458
+ force = true;
459
+ else if (a === "--dir") {
460
+ const v = rest[++i];
461
+ if (v == null || v.startsWith("--"))
462
+ throw new Error("--dir needs a value");
463
+ dir = v;
464
+ } else
465
+ throw new Error(`unknown argument "${a}"
466
+ ${SKILL_USAGE}`);
467
+ }
468
+ if (user && dir != null)
469
+ throw new Error("--user and --dir name two targets: pass one");
470
+ const configDir = env.CLAUDE_CONFIG_DIR ?? join4(env.HOME ?? homedir(), ".claude");
471
+ const to = dir != null ? resolve2(cwd, dir) : user ? join4(configDir, "skills") : join4(cwd, ".claude", "skills");
472
+ const from = skillSourceDir();
473
+ const version = packageVersion(dirname2(dirname2(from)));
474
+ const show = (abs) => {
475
+ const rel = relative(cwd, abs);
476
+ return rel.startsWith("..") ? abs : rel;
477
+ };
478
+ const report = installSkills({ from, to, force, version });
479
+ log(`[comfy-ts skill] comfy-ts ${version} skills → ${show(to)}`);
480
+ for (const l of report.lines)
481
+ log(` ${MARK[l.action]} ${l.action.padEnd(11)} ${show(l.file)}`);
482
+ if (!report.ok) {
483
+ const n = report.lines.filter((l) => l.action === "conflict").length;
484
+ log(`[comfy-ts skill] \uD83D\uDD34 ${n} file(s) changed since comfy-ts wrote them (✗ above): nothing was written. Keep your edits, or rerun with --force to overwrite them`);
485
+ return 1;
486
+ }
487
+ const kept = report.lines.filter((l) => l.action === "kept").length;
488
+ if (kept > 0)
489
+ log(`[comfy-ts skill] ${kept} file(s) no longer shipped were kept because you edited them (? above)`);
490
+ log(`[comfy-ts skill] \uD83D\uDFE2 Claude Code commands: ${report.commands.join(" ")}`);
491
+ log(`[comfy-ts skill] a session started before this skills folder existed needs /reload-skills`);
492
+ return 0;
484
493
  }
485
- //#endregion
486
- //#region src/cli/comfy-ts-cli.ts
487
- const HELP = `comfy-ts — typed SDK codegen for ComfyUI
494
+
495
+ // src/cli/comfy-ts-cli.ts
496
+ var HELP = `comfy-ts — typed SDK codegen for ComfyUI
488
497
 
489
498
  Usage:
490
499
  comfy-ts gen --id <host-id> [--host http://127.0.0.1:8188] [--api-key <key>] [--out <sdk-path>]
@@ -537,41 +546,41 @@ Usage:
537
546
  comfy-ts help
538
547
  `;
539
548
  async function main() {
540
- const [cmd, ...rest] = process.argv.slice(2);
541
- if (cmd === "gen") return runGen(rest);
542
- if (cmd === "outline") return runOutline(rest);
543
- if (cmd === "loras") return runLoras(rest);
544
- if (cmd === "skill") return runSkill(rest);
545
- if (cmd === "tui" || cmd === "serve" || cmd === "run") {
546
- if (process.versions.bun == null) {
547
- const res = await hopToBun([
548
- fileURLToPath(import.meta.url),
549
- cmd,
550
- ...rest
551
- ]);
552
- if ("code" in res) return res.code;
553
- console.error(`[comfy-ts ${cmd}] bun not found (${res.error.message}) — continuing under node: the examples packaged in node_modules cannot load here, and your own .cflow.ts modules rely on node's type stripping`);
554
- }
555
- armHopChild();
556
- if (cmd === "run") {
557
- const { runRun } = await import("./run-run-Cn2JzKlE.js");
558
- return runRun(rest);
559
- }
560
- if (cmd === "serve") {
561
- const { runServe } = await import("./run-serve-BhGegaCI.js");
562
- return runServe(rest);
563
- }
564
- const { runTui } = await import("./run-tui-CrM4ijkH.js");
565
- return runTui(rest);
566
- }
567
- console.log(HELP);
568
- return cmd == null || cmd === "help" ? 0 : 1;
549
+ const [cmd, ...rest] = process.argv.slice(2);
550
+ if (cmd === "gen")
551
+ return runGen(rest);
552
+ if (cmd === "outline")
553
+ return runOutline(rest);
554
+ if (cmd === "loras")
555
+ return runLoras(rest);
556
+ if (cmd === "skill")
557
+ return runSkill(rest);
558
+ if (cmd === "tui" || cmd === "serve" || cmd === "run") {
559
+ if (process.versions.bun == null) {
560
+ const res = await hopToBun([fileURLToPath(import.meta.url), cmd, ...rest]);
561
+ if ("code" in res)
562
+ return res.code;
563
+ console.error(`[comfy-ts ${cmd}] bun not found (${res.error.message}) — continuing under node: the examples packaged in node_modules cannot load here, and your own .cflow.ts modules rely on node's type stripping`);
564
+ }
565
+ armHopChild();
566
+ if (cmd === "run") {
567
+ const { runRun } = await import("./chunk-dw0t1nye.js");
568
+ return runRun(rest);
569
+ }
570
+ if (cmd === "serve") {
571
+ const { runServe } = await import("./chunk-he70ewwx.js");
572
+ return runServe(rest);
573
+ }
574
+ const { runTui } = await import("./chunk-n35nffm8.js");
575
+ return runTui(rest);
576
+ }
577
+ console.log(HELP);
578
+ return cmd == null || cmd === "help" ? 0 : 1;
569
579
  }
570
580
  process.exitCode = await main().catch((e) => {
571
- console.error(`[comfy-ts] 🔴 ${e instanceof Error ? e.message : String(e)}`);
572
- return 1;
581
+ console.error(`[comfy-ts] \uD83D\uDD34 ${e instanceof Error ? e.message : String(e)}`);
582
+ return 1;
573
583
  });
574
- //#endregion
575
- export {};
576
584
 
577
- //# sourceMappingURL=cli.js.map
585
+ //# debugId=602133C6FE84A58B64756E2164756E21
586
+ //# sourceMappingURL=cli.js.map