@fougere/cli 0.12.5-alpha.0 → 0.12.6-alpha.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 (335) hide show
  1. package/dist/.fougere/scan.generated.d.ts +3 -0
  2. package/dist/.fougere/scan.generated.d.ts.map +1 -0
  3. package/dist/.fougere/scan.generated.js +140 -0
  4. package/dist/.fougere/scan.generated.js.map +1 -0
  5. package/dist/app/commands/BuildCommand.d.ts +18 -0
  6. package/dist/app/commands/BuildCommand.d.ts.map +1 -0
  7. package/dist/app/commands/BuildCommand.js +35 -0
  8. package/dist/app/commands/BuildCommand.js.map +1 -0
  9. package/dist/app/commands/CallCommand.d.ts +16 -0
  10. package/dist/app/commands/CallCommand.d.ts.map +1 -0
  11. package/dist/app/commands/CallCommand.js +73 -0
  12. package/dist/app/commands/CallCommand.js.map +1 -0
  13. package/dist/app/commands/CheckCommand.d.ts +11 -0
  14. package/dist/app/commands/CheckCommand.d.ts.map +1 -0
  15. package/dist/app/commands/CheckCommand.js +59 -0
  16. package/dist/app/commands/CheckCommand.js.map +1 -0
  17. package/dist/app/commands/CompletionCommand.d.ts +7 -0
  18. package/dist/app/commands/CompletionCommand.d.ts.map +1 -0
  19. package/dist/app/commands/CompletionCommand.js +23 -0
  20. package/dist/app/commands/CompletionCommand.js.map +1 -0
  21. package/dist/app/commands/DevtoolsCommand.d.ts +20 -0
  22. package/dist/app/commands/DevtoolsCommand.d.ts.map +1 -0
  23. package/dist/app/commands/DevtoolsCommand.js +79 -0
  24. package/dist/app/commands/DevtoolsCommand.js.map +1 -0
  25. package/dist/app/commands/ExplainCommand.d.ts +18 -0
  26. package/dist/app/commands/ExplainCommand.d.ts.map +1 -0
  27. package/dist/app/commands/ExplainCommand.js +111 -0
  28. package/dist/app/commands/ExplainCommand.js.map +1 -0
  29. package/dist/app/commands/FreezeCommand.d.ts +21 -0
  30. package/dist/app/commands/FreezeCommand.d.ts.map +1 -0
  31. package/dist/app/commands/FreezeCommand.js +102 -0
  32. package/dist/app/commands/FreezeCommand.js.map +1 -0
  33. package/dist/app/commands/GrantCommand.d.ts +18 -0
  34. package/dist/app/commands/GrantCommand.d.ts.map +1 -0
  35. package/dist/app/commands/GrantCommand.js +39 -0
  36. package/dist/app/commands/GrantCommand.js.map +1 -0
  37. package/dist/app/commands/GraphCommand.d.ts +11 -0
  38. package/dist/app/commands/GraphCommand.d.ts.map +1 -0
  39. package/dist/app/commands/GraphCommand.js +72 -0
  40. package/dist/app/commands/GraphCommand.js.map +1 -0
  41. package/dist/app/commands/KeysCommand.d.ts +22 -0
  42. package/dist/app/commands/KeysCommand.d.ts.map +1 -0
  43. package/dist/app/commands/KeysCommand.js +50 -0
  44. package/dist/app/commands/KeysCommand.js.map +1 -0
  45. package/dist/app/commands/LoadCommand.d.ts +19 -0
  46. package/dist/app/commands/LoadCommand.d.ts.map +1 -0
  47. package/dist/app/commands/LoadCommand.js +37 -0
  48. package/dist/app/commands/LoadCommand.js.map +1 -0
  49. package/dist/app/commands/MigrateCommand.d.ts +17 -0
  50. package/dist/app/commands/MigrateCommand.d.ts.map +1 -0
  51. package/dist/app/commands/MigrateCommand.js +47 -0
  52. package/dist/app/commands/MigrateCommand.js.map +1 -0
  53. package/dist/app/commands/NewCommand.d.ts +24 -0
  54. package/dist/app/commands/NewCommand.d.ts.map +1 -0
  55. package/dist/app/commands/NewCommand.js +131 -0
  56. package/dist/app/commands/NewCommand.js.map +1 -0
  57. package/dist/app/commands/ServeCommand.d.ts +17 -0
  58. package/dist/app/commands/ServeCommand.d.ts.map +1 -0
  59. package/dist/app/commands/ServeCommand.js +93 -0
  60. package/dist/app/commands/ServeCommand.js.map +1 -0
  61. package/dist/app/commands/grant-material.d.ts +5 -0
  62. package/dist/app/commands/grant-material.d.ts.map +1 -0
  63. package/{app/commands/grant-material.ts → dist/app/commands/grant-material.js} +2 -2
  64. package/dist/app/commands/grant-material.js.map +1 -0
  65. package/dist/fronds/analysis/entities/Build.d.ts +10 -0
  66. package/dist/fronds/analysis/entities/Build.d.ts.map +1 -0
  67. package/dist/fronds/analysis/entities/Build.js +9 -0
  68. package/dist/fronds/analysis/entities/Build.js.map +1 -0
  69. package/dist/fronds/analysis/entities/Check.d.ts +8 -0
  70. package/dist/fronds/analysis/entities/Check.d.ts.map +1 -0
  71. package/dist/fronds/analysis/entities/Check.js +7 -0
  72. package/dist/fronds/analysis/entities/Check.js.map +1 -0
  73. package/dist/fronds/analysis/entities/Devtools.d.ts +10 -0
  74. package/dist/fronds/analysis/entities/Devtools.d.ts.map +1 -0
  75. package/dist/fronds/analysis/entities/Devtools.js +9 -0
  76. package/dist/fronds/analysis/entities/Devtools.js.map +1 -0
  77. package/dist/fronds/analysis/entities/Explain.d.ts +11 -0
  78. package/dist/fronds/analysis/entities/Explain.d.ts.map +1 -0
  79. package/dist/fronds/analysis/entities/Explain.js +10 -0
  80. package/dist/fronds/analysis/entities/Explain.js.map +1 -0
  81. package/dist/fronds/analysis/entities/Freeze.d.ts +10 -0
  82. package/dist/fronds/analysis/entities/Freeze.d.ts.map +1 -0
  83. package/dist/fronds/analysis/entities/Freeze.js +9 -0
  84. package/dist/fronds/analysis/entities/Freeze.js.map +1 -0
  85. package/dist/fronds/analysis/entities/Graph.d.ts +9 -0
  86. package/dist/fronds/analysis/entities/Graph.d.ts.map +1 -0
  87. package/dist/fronds/analysis/entities/Graph.js +8 -0
  88. package/dist/fronds/analysis/entities/Graph.js.map +1 -0
  89. package/dist/fronds/analysis/entities/Load.d.ts +10 -0
  90. package/dist/fronds/analysis/entities/Load.d.ts.map +1 -0
  91. package/dist/fronds/analysis/entities/Load.js +9 -0
  92. package/dist/fronds/analysis/entities/Load.js.map +1 -0
  93. package/dist/fronds/analysis/entities/Migrate.d.ts +10 -0
  94. package/dist/fronds/analysis/entities/Migrate.d.ts.map +1 -0
  95. package/dist/fronds/analysis/entities/Migrate.js +9 -0
  96. package/dist/fronds/analysis/entities/Migrate.js.map +1 -0
  97. package/dist/fronds/analysis/handlers/BuildHandler.d.ts +50 -0
  98. package/dist/fronds/analysis/handlers/BuildHandler.d.ts.map +1 -0
  99. package/dist/fronds/analysis/handlers/BuildHandler.js +63 -0
  100. package/dist/fronds/analysis/handlers/BuildHandler.js.map +1 -0
  101. package/dist/fronds/analysis/handlers/CheckHandler.d.ts +30 -0
  102. package/dist/fronds/analysis/handlers/CheckHandler.d.ts.map +1 -0
  103. package/dist/fronds/analysis/handlers/CheckHandler.js +196 -0
  104. package/dist/fronds/analysis/handlers/CheckHandler.js.map +1 -0
  105. package/dist/fronds/analysis/handlers/DevtoolsHandler.d.ts +45 -0
  106. package/dist/fronds/analysis/handlers/DevtoolsHandler.d.ts.map +1 -0
  107. package/dist/fronds/analysis/handlers/DevtoolsHandler.js +61 -0
  108. package/dist/fronds/analysis/handlers/DevtoolsHandler.js.map +1 -0
  109. package/dist/fronds/analysis/handlers/ExplainHandler.d.ts +99 -0
  110. package/dist/fronds/analysis/handlers/ExplainHandler.d.ts.map +1 -0
  111. package/dist/fronds/analysis/handlers/ExplainHandler.js +157 -0
  112. package/dist/fronds/analysis/handlers/ExplainHandler.js.map +1 -0
  113. package/dist/fronds/analysis/handlers/FreezeHandler.d.ts +55 -0
  114. package/dist/fronds/analysis/handlers/FreezeHandler.d.ts.map +1 -0
  115. package/dist/fronds/analysis/handlers/FreezeHandler.js +145 -0
  116. package/dist/fronds/analysis/handlers/FreezeHandler.js.map +1 -0
  117. package/dist/fronds/analysis/handlers/GraphHandler.d.ts +23 -0
  118. package/dist/fronds/analysis/handlers/GraphHandler.d.ts.map +1 -0
  119. package/dist/fronds/analysis/handlers/GraphHandler.js +23 -0
  120. package/dist/fronds/analysis/handlers/GraphHandler.js.map +1 -0
  121. package/dist/fronds/analysis/handlers/LoadHandler.d.ts +26 -0
  122. package/dist/fronds/analysis/handlers/LoadHandler.d.ts.map +1 -0
  123. package/dist/fronds/analysis/handlers/LoadHandler.js +35 -0
  124. package/dist/fronds/analysis/handlers/LoadHandler.js.map +1 -0
  125. package/dist/fronds/analysis/handlers/MigrateHandler.d.ts +34 -0
  126. package/dist/fronds/analysis/handlers/MigrateHandler.d.ts.map +1 -0
  127. package/dist/fronds/analysis/handlers/MigrateHandler.js +92 -0
  128. package/dist/fronds/analysis/handlers/MigrateHandler.js.map +1 -0
  129. package/dist/fronds/analysis/services/ProjectScan.d.ts +22 -0
  130. package/dist/fronds/analysis/services/ProjectScan.d.ts.map +1 -0
  131. package/dist/fronds/analysis/services/ProjectScan.js +48 -0
  132. package/dist/fronds/analysis/services/ProjectScan.js.map +1 -0
  133. package/dist/fronds/analysis/versions.d.ts +21 -0
  134. package/dist/fronds/analysis/versions.d.ts.map +1 -0
  135. package/dist/fronds/analysis/versions.js +48 -0
  136. package/dist/fronds/analysis/versions.js.map +1 -0
  137. package/dist/fronds/scaffold/entities/BuildFrond.d.ts +7 -0
  138. package/dist/fronds/scaffold/entities/BuildFrond.d.ts.map +1 -0
  139. package/dist/fronds/scaffold/entities/BuildFrond.js +6 -0
  140. package/dist/fronds/scaffold/entities/BuildFrond.js.map +1 -0
  141. package/dist/fronds/scaffold/entities/Call.d.ts +8 -0
  142. package/dist/fronds/scaffold/entities/Call.d.ts.map +1 -0
  143. package/{fronds/scaffold/entities/Call.ts → dist/fronds/scaffold/entities/Call.js} +4 -3
  144. package/dist/fronds/scaffold/entities/Call.js.map +1 -0
  145. package/dist/fronds/scaffold/entities/Completion.d.ts +7 -0
  146. package/dist/fronds/scaffold/entities/Completion.d.ts.map +1 -0
  147. package/dist/fronds/scaffold/entities/Completion.js +6 -0
  148. package/dist/fronds/scaffold/entities/Completion.js.map +1 -0
  149. package/dist/fronds/scaffold/entities/Grant.d.ts +8 -0
  150. package/dist/fronds/scaffold/entities/Grant.d.ts.map +1 -0
  151. package/{fronds/scaffold/entities/Grant.ts → dist/fronds/scaffold/entities/Grant.js} +4 -3
  152. package/dist/fronds/scaffold/entities/Grant.js.map +1 -0
  153. package/dist/fronds/scaffold/entities/Keys.d.ts +6 -0
  154. package/dist/fronds/scaffold/entities/Keys.d.ts.map +1 -0
  155. package/{fronds/scaffold/entities/Keys.ts → dist/fronds/scaffold/entities/Keys.js} +3 -2
  156. package/dist/fronds/scaffold/entities/Keys.js.map +1 -0
  157. package/dist/fronds/scaffold/entities/New.d.ts +21 -0
  158. package/dist/fronds/scaffold/entities/New.d.ts.map +1 -0
  159. package/dist/fronds/scaffold/entities/New.js +20 -0
  160. package/dist/fronds/scaffold/entities/New.js.map +1 -0
  161. package/dist/fronds/scaffold/entities/Serve.d.ts +10 -0
  162. package/dist/fronds/scaffold/entities/Serve.d.ts.map +1 -0
  163. package/dist/fronds/scaffold/entities/Serve.js +9 -0
  164. package/dist/fronds/scaffold/entities/Serve.js.map +1 -0
  165. package/dist/fronds/scaffold/entities/Sync.d.ts +8 -0
  166. package/dist/fronds/scaffold/entities/Sync.d.ts.map +1 -0
  167. package/dist/fronds/scaffold/entities/Sync.js +7 -0
  168. package/dist/fronds/scaffold/entities/Sync.js.map +1 -0
  169. package/dist/fronds/scaffold/handlers/BuildFrondHandler.d.ts +11 -0
  170. package/dist/fronds/scaffold/handlers/BuildFrondHandler.d.ts.map +1 -0
  171. package/dist/fronds/scaffold/handlers/BuildFrondHandler.js +82 -0
  172. package/dist/fronds/scaffold/handlers/BuildFrondHandler.js.map +1 -0
  173. package/dist/fronds/scaffold/handlers/CallHandler.d.ts +10 -0
  174. package/dist/fronds/scaffold/handlers/CallHandler.d.ts.map +1 -0
  175. package/{fronds/scaffold/handlers/CallHandler.ts → dist/fronds/scaffold/handlers/CallHandler.js} +3 -2
  176. package/dist/fronds/scaffold/handlers/CallHandler.js.map +1 -0
  177. package/dist/fronds/scaffold/handlers/CompletionHandler.d.ts +9 -0
  178. package/dist/fronds/scaffold/handlers/CompletionHandler.d.ts.map +1 -0
  179. package/{fronds/scaffold/handlers/CompletionHandler.ts → dist/fronds/scaffold/handlers/CompletionHandler.js} +3 -2
  180. package/dist/fronds/scaffold/handlers/CompletionHandler.js.map +1 -0
  181. package/dist/fronds/scaffold/handlers/GrantHandler.d.ts +9 -0
  182. package/dist/fronds/scaffold/handlers/GrantHandler.d.ts.map +1 -0
  183. package/{fronds/scaffold/handlers/GrantHandler.ts → dist/fronds/scaffold/handlers/GrantHandler.js} +3 -2
  184. package/dist/fronds/scaffold/handlers/GrantHandler.js.map +1 -0
  185. package/dist/fronds/scaffold/handlers/KeysHandler.d.ts +9 -0
  186. package/dist/fronds/scaffold/handlers/KeysHandler.d.ts.map +1 -0
  187. package/{fronds/scaffold/handlers/KeysHandler.ts → dist/fronds/scaffold/handlers/KeysHandler.js} +3 -2
  188. package/dist/fronds/scaffold/handlers/KeysHandler.js.map +1 -0
  189. package/dist/fronds/scaffold/handlers/NewHandler.d.ts +9 -0
  190. package/dist/fronds/scaffold/handlers/NewHandler.d.ts.map +1 -0
  191. package/{fronds/scaffold/handlers/NewHandler.ts → dist/fronds/scaffold/handlers/NewHandler.js} +3 -2
  192. package/dist/fronds/scaffold/handlers/NewHandler.js.map +1 -0
  193. package/dist/fronds/scaffold/handlers/ServeHandler.d.ts +10 -0
  194. package/dist/fronds/scaffold/handlers/ServeHandler.d.ts.map +1 -0
  195. package/{fronds/scaffold/handlers/ServeHandler.ts → dist/fronds/scaffold/handlers/ServeHandler.js} +3 -2
  196. package/dist/fronds/scaffold/handlers/ServeHandler.js.map +1 -0
  197. package/dist/fronds/scaffold/handlers/SyncHandler.d.ts +20 -0
  198. package/dist/fronds/scaffold/handlers/SyncHandler.d.ts.map +1 -0
  199. package/dist/fronds/scaffold/handlers/SyncHandler.js +349 -0
  200. package/dist/fronds/scaffold/handlers/SyncHandler.js.map +1 -0
  201. package/dist/fronds/scaffold/services/ProjectWriter.d.ts +71 -0
  202. package/dist/fronds/scaffold/services/ProjectWriter.d.ts.map +1 -0
  203. package/dist/fronds/scaffold/services/ProjectWriter.js +341 -0
  204. package/dist/fronds/scaffold/services/ProjectWriter.js.map +1 -0
  205. package/dist/src/bin.d.ts.map +1 -0
  206. package/dist/src/bin.js +11 -0
  207. package/dist/src/bin.js.map +1 -0
  208. package/dist/src/bridge.d.ts.map +1 -0
  209. package/dist/src/bridge.js.map +1 -0
  210. package/dist/src/completion.d.ts.map +1 -0
  211. package/dist/src/completion.js.map +1 -0
  212. package/dist/src/index.d.ts.map +1 -0
  213. package/dist/src/index.js.map +1 -0
  214. package/dist/src/loader.d.ts.map +1 -0
  215. package/dist/src/loader.js.map +1 -0
  216. package/dist/src/machine.d.ts.map +1 -0
  217. package/dist/src/machine.js.map +1 -0
  218. package/dist/src/main.d.ts +2 -0
  219. package/dist/src/main.d.ts.map +1 -0
  220. package/dist/src/main.js +19 -0
  221. package/dist/src/main.js.map +1 -0
  222. package/dist/src/runner.d.ts.map +1 -0
  223. package/dist/{runner.js → src/runner.js} +22 -22
  224. package/dist/src/runner.js.map +1 -0
  225. package/dist/src/theme.d.ts.map +1 -0
  226. package/dist/src/theme.js.map +1 -0
  227. package/dist/src/typescript/EntityTypes.d.ts.map +1 -0
  228. package/dist/src/typescript/EntityTypes.js.map +1 -0
  229. package/dist/src/typescript/FacadeTypes.d.ts.map +1 -0
  230. package/dist/src/typescript/FacadeTypes.js.map +1 -0
  231. package/dist/src/typescript/syntax.d.ts.map +1 -0
  232. package/dist/src/typescript/syntax.js.map +1 -0
  233. package/dist/{ui.d.ts → src/ui.d.ts} +0 -1
  234. package/dist/src/ui.d.ts.map +1 -0
  235. package/dist/{ui.js → src/ui.js} +24 -22
  236. package/dist/src/ui.js.map +1 -0
  237. package/package.json +23 -27
  238. package/app/commands/BuildCommand.ts +0 -43
  239. package/app/commands/CallCommand.ts +0 -70
  240. package/app/commands/CheckCommand.ts +0 -70
  241. package/app/commands/CompletionCommand.ts +0 -24
  242. package/app/commands/DevtoolsCommand.ts +0 -92
  243. package/app/commands/ExplainCommand.ts +0 -136
  244. package/app/commands/FreezeCommand.ts +0 -119
  245. package/app/commands/GrantCommand.ts +0 -46
  246. package/app/commands/GraphCommand.ts +0 -91
  247. package/app/commands/KeysCommand.ts +0 -57
  248. package/app/commands/LoadCommand.ts +0 -46
  249. package/app/commands/MigrateCommand.ts +0 -61
  250. package/app/commands/NewCommand.ts +0 -137
  251. package/app/commands/ServeCommand.ts +0 -108
  252. package/dist/bin.d.ts.map +0 -1
  253. package/dist/bin.js +0 -64
  254. package/dist/bin.js.map +0 -1
  255. package/dist/bridge.d.ts.map +0 -1
  256. package/dist/bridge.js.map +0 -1
  257. package/dist/completion.d.ts.map +0 -1
  258. package/dist/completion.js.map +0 -1
  259. package/dist/index.d.ts.map +0 -1
  260. package/dist/index.js.map +0 -1
  261. package/dist/loader.d.ts.map +0 -1
  262. package/dist/loader.js.map +0 -1
  263. package/dist/machine.d.ts.map +0 -1
  264. package/dist/machine.js.map +0 -1
  265. package/dist/runner.d.ts.map +0 -1
  266. package/dist/runner.js.map +0 -1
  267. package/dist/theme.d.ts.map +0 -1
  268. package/dist/theme.js.map +0 -1
  269. package/dist/typescript/EntityTypes.d.ts.map +0 -1
  270. package/dist/typescript/EntityTypes.js.map +0 -1
  271. package/dist/typescript/FacadeTypes.d.ts.map +0 -1
  272. package/dist/typescript/FacadeTypes.js.map +0 -1
  273. package/dist/typescript/syntax.d.ts.map +0 -1
  274. package/dist/typescript/syntax.js.map +0 -1
  275. package/dist/ui.d.ts.map +0 -1
  276. package/dist/ui.js.map +0 -1
  277. package/fronds/analysis/entities/Build.ts +0 -8
  278. package/fronds/analysis/entities/Check.ts +0 -6
  279. package/fronds/analysis/entities/Devtools.ts +0 -8
  280. package/fronds/analysis/entities/Explain.ts +0 -9
  281. package/fronds/analysis/entities/Freeze.ts +0 -8
  282. package/fronds/analysis/entities/Graph.ts +0 -7
  283. package/fronds/analysis/entities/Load.ts +0 -8
  284. package/fronds/analysis/entities/Migrate.ts +0 -8
  285. package/fronds/analysis/handlers/BuildHandler.ts +0 -87
  286. package/fronds/analysis/handlers/CheckHandler.ts +0 -217
  287. package/fronds/analysis/handlers/DevtoolsHandler.ts +0 -97
  288. package/fronds/analysis/handlers/ExplainHandler.ts +0 -263
  289. package/fronds/analysis/handlers/FreezeHandler.ts +0 -183
  290. package/fronds/analysis/handlers/GraphHandler.ts +0 -38
  291. package/fronds/analysis/handlers/LoadHandler.ts +0 -44
  292. package/fronds/analysis/handlers/MigrateHandler.ts +0 -110
  293. package/fronds/analysis/services/ProjectScan.ts +0 -55
  294. package/fronds/analysis/versions.ts +0 -59
  295. package/fronds/scaffold/entities/BuildFrond.ts +0 -5
  296. package/fronds/scaffold/entities/Completion.ts +0 -5
  297. package/fronds/scaffold/entities/New.ts +0 -19
  298. package/fronds/scaffold/entities/Serve.ts +0 -8
  299. package/fronds/scaffold/entities/Sync.ts +0 -6
  300. package/fronds/scaffold/handlers/BuildFrondHandler.ts +0 -96
  301. package/fronds/scaffold/handlers/SyncHandler.ts +0 -376
  302. package/fronds/scaffold/services/ProjectWriter.ts +0 -339
  303. package/fronds/shims.d.ts +0 -9
  304. package/src/bin.ts +0 -77
  305. package/src/bridge.ts +0 -118
  306. package/src/completion.ts +0 -145
  307. package/src/index.ts +0 -1
  308. package/src/loader.ts +0 -28
  309. package/src/machine.ts +0 -17
  310. package/src/runner.ts +0 -152
  311. package/src/theme.ts +0 -19
  312. package/src/typescript/EntityTypes.ts +0 -92
  313. package/src/typescript/FacadeTypes.ts +0 -50
  314. package/src/typescript/syntax.ts +0 -11
  315. package/src/ui.ts +0 -142
  316. /package/dist/{bin.d.ts → src/bin.d.ts} +0 -0
  317. /package/dist/{bridge.d.ts → src/bridge.d.ts} +0 -0
  318. /package/dist/{bridge.js → src/bridge.js} +0 -0
  319. /package/dist/{completion.d.ts → src/completion.d.ts} +0 -0
  320. /package/dist/{completion.js → src/completion.js} +0 -0
  321. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  322. /package/dist/{index.js → src/index.js} +0 -0
  323. /package/dist/{loader.d.ts → src/loader.d.ts} +0 -0
  324. /package/dist/{loader.js → src/loader.js} +0 -0
  325. /package/dist/{machine.d.ts → src/machine.d.ts} +0 -0
  326. /package/dist/{machine.js → src/machine.js} +0 -0
  327. /package/dist/{runner.d.ts → src/runner.d.ts} +0 -0
  328. /package/dist/{theme.d.ts → src/theme.d.ts} +0 -0
  329. /package/dist/{theme.js → src/theme.js} +0 -0
  330. /package/dist/{typescript → src/typescript}/EntityTypes.d.ts +0 -0
  331. /package/dist/{typescript → src/typescript}/EntityTypes.js +0 -0
  332. /package/dist/{typescript → src/typescript}/FacadeTypes.d.ts +0 -0
  333. /package/dist/{typescript → src/typescript}/FacadeTypes.js +0 -0
  334. /package/dist/{typescript → src/typescript}/syntax.d.ts +0 -0
  335. /package/dist/{typescript → src/typescript}/syntax.js +0 -0
@@ -0,0 +1,50 @@
1
+ import ProjectScan from '../services/ProjectScan.js';
2
+ import type Build from '../entities/Build.js';
3
+ /**
4
+ * Where the module lands when nobody says otherwise.
5
+ *
6
+ * `.fougere/` because the artefact is REGENERABLE — which is exactly the test `freeze`
7
+ * failed: a recorded version is a past nobody can recompute, so it lives in the tree.
8
+ * This is the same scan the next build performs again, so it is gitignored.
9
+ */
10
+ export declare const DEFAULT_OUT = ".fougere/scan.generated.ts";
11
+ /** Types only, beside the module — what lets a client narrow a refusal it might meet. */
12
+ export declare const FACADE_OUT = "facade.generated.ts";
13
+ /** Types only — what a config may NAME, so a string cannot designate a class that is not there. */
14
+ export declare const NAMES_OUT = "names.generated.d.ts";
15
+ export interface BuildReport {
16
+ /** Absolute, so a caller can print it or read it back. */
17
+ out: string;
18
+ /** Relative to the project root — what a human recognizes. */
19
+ path: string;
20
+ /** Where the facades were written — one export per address, the page's facade in. */
21
+ facade: string;
22
+ /** Where the names went — the unions a config is judged against. */
23
+ names: string;
24
+ fronds: string[];
25
+ entities: number;
26
+ handlers: number;
27
+ /**
28
+ * What the scan could not settle, carried rather than swallowed: the module holds the
29
+ * same diagnostics, so a boot from it warns exactly as a boot from a disk would.
30
+ */
31
+ diagnostics: string[];
32
+ }
33
+ /**
34
+ * Writing the scan down — the half of the gradient a runtime without a disk needs.
35
+ *
36
+ * Producing the description reads the project; consuming it does not. `createApp` takes
37
+ * `scan:` and never looks for a filesystem, so this command is what stands between a
38
+ * project and a Worker: it runs where `node:fs` exists, once, at build time.
39
+ */
40
+ export default class BuildHandler {
41
+ private projectScan;
42
+ constructor(projectScan: ProjectScan);
43
+ /**
44
+ * Write down what a scan found, so a deployment reads no disk.
45
+ *
46
+ * `json` is the presentation's, so it is not part of what this operation receives.
47
+ */
48
+ execute(input: Omit<Build, 'json'>): Promise<BuildReport>;
49
+ }
50
+ //# sourceMappingURL=BuildHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildHandler.d.ts","sourceRoot":"","sources":["../../../../fronds/analysis/handlers/BuildHandler.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,+BAA+B,CAAC;AACxD,yFAAyF;AACzF,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAChD,mGAAmG;AACnG,eAAO,MAAM,SAAS,yBAAyB,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IACnB,OAAO,CAAC,WAAW;IAA/B,YAAoB,WAAW,EAAE,WAAW,EAAI;IAEhD;;;;OAIG;IACG,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA+B9D;CACF"}
@@ -0,0 +1,63 @@
1
+ import { mkdir, writeFile } from 'node:fs/promises';
2
+ import { loadConfig } from '@fougere/core/node';
3
+ import { dirname, join, relative, resolve } from 'node:path';
4
+ import { emitFacade, emitNames, emitScan } from '@fougere/compiler';
5
+ /**
6
+ * Where the module lands when nobody says otherwise.
7
+ *
8
+ * `.fougere/` because the artefact is REGENERABLE — which is exactly the test `freeze`
9
+ * failed: a recorded version is a past nobody can recompute, so it lives in the tree.
10
+ * This is the same scan the next build performs again, so it is gitignored.
11
+ */
12
+ export const DEFAULT_OUT = '.fougere/scan.generated.ts';
13
+ /** Types only, beside the module — what lets a client narrow a refusal it might meet. */
14
+ export const FACADE_OUT = 'facade.generated.ts';
15
+ /** Types only — what a config may NAME, so a string cannot designate a class that is not there. */
16
+ export const NAMES_OUT = 'names.generated.d.ts';
17
+ /**
18
+ * Writing the scan down — the half of the gradient a runtime without a disk needs.
19
+ *
20
+ * Producing the description reads the project; consuming it does not. `createApp` takes
21
+ * `scan:` and never looks for a filesystem, so this command is what stands between a
22
+ * project and a Worker: it runs where `node:fs` exists, once, at build time.
23
+ */
24
+ export default class BuildHandler {
25
+ projectScan;
26
+ constructor(projectScan) {
27
+ this.projectScan = projectScan;
28
+ }
29
+ /**
30
+ * Write down what a scan found, so a deployment reads no disk.
31
+ *
32
+ * `json` is the presentation's, so it is not part of what this operation receives.
33
+ */
34
+ async execute(input) {
35
+ const scan = await this.projectScan.at(input.root ?? undefined);
36
+ const out = resolve(scan.root, input.out || DEFAULT_OUT);
37
+ // The emitter writes every import relative to where the module will SIT, so the
38
+ // directory has to be settled before the source is produced, not after.
39
+ await mkdir(dirname(out), { recursive: true });
40
+ await writeFile(out, emitScan(scan, { outFile: out }));
41
+ // The same scan, projected a third way. It holds no value and reaches no bundle: what a
42
+ // client cannot otherwise know is which refusals one facade can answer, because TypeScript
43
+ // records nothing about what a function throws.
44
+ const facade = join(dirname(out), FACADE_OUT);
45
+ await writeFile(facade, emitFacade(scan, { outFile: facade }));
46
+ // And a fourth, for the only place a name is still written as a string: a config file. The
47
+ // sources are the config's own keys, which no scan can find.
48
+ const config = await loadConfig(scan.root).catch(() => ({}));
49
+ const names = join(dirname(out), NAMES_OUT);
50
+ await writeFile(names, emitNames(scan, { sources: Object.keys(config.sources ?? {}) }));
51
+ return {
52
+ out,
53
+ path: relative(scan.root, out),
54
+ facade: relative(scan.root, facade),
55
+ names: relative(scan.root, names),
56
+ fronds: scan.fronds.map((frond) => frond.name),
57
+ entities: scan.fronds.reduce((total, frond) => total + frond.entities.length, 0),
58
+ handlers: scan.fronds.reduce((total, frond) => total + frond.handlers.length, 0),
59
+ diagnostics: scan.diagnostics.map((d) => `${d.severity} ${d.code}: ${d.message}`),
60
+ };
61
+ }
62
+ }
63
+ //# sourceMappingURL=BuildHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildHandler.js","sourceRoot":"","sources":["../../../../fronds/analysis/handlers/BuildHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIpE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACxD,yFAAyF;AACzF,MAAM,CAAC,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAChD,mGAAmG;AACnG,MAAM,CAAC,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAqBhD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;I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AG;YACH,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC;YAC9B,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;YACnC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;YACjC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;YAC9C,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAChF,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAChF,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;SAClF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+ import { type Diagnostic } from '@fougere/core';
2
+ import ProjectScan from '../services/ProjectScan.js';
3
+ export interface CheckResult {
4
+ fronds: number;
5
+ handlers: number;
6
+ findings: Diagnostic[];
7
+ }
8
+ /**
9
+ * What does not hold in this app — derived from its declarations, not from tests.
10
+ *
11
+ * It scans rather than boots — see `ProjectScan`, which states what that costs.
12
+ *
13
+ * It raises no operation-resolution rule of its own: those findings come from the same
14
+ * EffectiveOperation resolver boot consumes. The remaining findings come from their
15
+ * existing owners — scan diagnostics, the import reader and domain clustering. A second
16
+ * opinion here would report what the runtime does not serve, precisely what a checker
17
+ * must avoid.
18
+ *
19
+ * A rule about an ABSENCE is only sound if the analysis attests it looked, which is
20
+ * why the scan's diagnostics had to exist before this command could.
21
+ */
22
+ export default class CheckHandler {
23
+ private projectScan;
24
+ constructor(projectScan: ProjectScan);
25
+ /** Report what does not hold in a Fougere app, without booting it. */
26
+ execute(input: {
27
+ root?: string;
28
+ }): Promise<CheckResult>;
29
+ }
30
+ //# sourceMappingURL=CheckHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckHandler.d.ts","sourceRoot":"","sources":["../../../../fronds/analysis/handlers/CheckHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AAGvB,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAMrD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAKD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IACnB,OAAO,CAAC,WAAW;IAA/B,YAAoB,WAAW,EAAE,WAAW,EAAI;IAEhD,sEAAsE;IAChE,OAAO,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CA4I5D;CACF"}
@@ -0,0 +1,196 @@
1
+ import { Shapes } from '@fougere/schema';
2
+ import safeRegex from 'safe-regex';
3
+ import { buildGraph, clusterEntities, resolveEffectiveOperations, } from '@fougere/core';
4
+ import { adaptersOf, crossFrondImports, handlerDeclarations, outsideConventions } from '@fougere/compiler';
5
+ import { resolveConventions } from '@fougere/core';
6
+ import { statSync } from 'node:fs';
7
+ import { dirname, join } from 'node:path';
8
+ import { FACADE_OUT, DEFAULT_OUT } from './BuildHandler.js';
9
+ import { remotesOf } from '@fougere/core/node';
10
+ /** Shared with `fougere graph` — one threshold, so the two never disagree. */
11
+ const DOMAIN_SPLIT_MIN_ENTITIES = 6;
12
+ /**
13
+ * What does not hold in this app — derived from its declarations, not from tests.
14
+ *
15
+ * It scans rather than boots — see `ProjectScan`, which states what that costs.
16
+ *
17
+ * It raises no operation-resolution rule of its own: those findings come from the same
18
+ * EffectiveOperation resolver boot consumes. The remaining findings come from their
19
+ * existing owners — scan diagnostics, the import reader and domain clustering. A second
20
+ * opinion here would report what the runtime does not serve, precisely what a checker
21
+ * must avoid.
22
+ *
23
+ * A rule about an ABSENCE is only sound if the analysis attests it looked, which is
24
+ * why the scan's diagnostics had to exist before this command could.
25
+ */
26
+ export default class CheckHandler {
27
+ projectScan;
28
+ constructor(projectScan) {
29
+ this.projectScan = projectScan;
30
+ }
31
+ /** Report what does not hold in a Fougere app, without booting it. */
32
+ async execute(input) {
33
+ const { fronds, diagnostics, config, root } = await this.projectScan.at(input.root);
34
+ // This is the same pure resolution the boot consumes. No app lifecycle, database,
35
+ // migration, seed or adapter mount is needed for a global semantic check.
36
+ const model = resolveEffectiveOperations(fronds, {
37
+ diagnostics,
38
+ remotes: remotesOf(config),
39
+ adapters: config.adapters,
40
+ });
41
+ const findings = [...model.diagnostics];
42
+ const handlers = fronds.reduce((count, frond) => count + frond.handlers.length, 0);
43
+ /**
44
+ * Entity groups with no `ref()` between them, in one frond. Reported as a FACT, not a
45
+ * verdict: it means either a missing relation or a frond that has not been named, and
46
+ * nothing here can tell which. `fougere graph` shows the groups.
47
+ */
48
+ if (fronds.length === 1) {
49
+ // `clusterEntities`, not `suggestSplit`: the latter invents a cut on a connected
50
+ // graph, which is its job and not this question. Here only real components count.
51
+ const nodes = buildGraph(fronds);
52
+ const clusters = clusterEntities(nodes);
53
+ // Same threshold as `fougere graph`'s own tip: below it, two components are a small
54
+ // app that has not grown its links yet, not a frond holding two domains.
55
+ if (clusters.length > 1 && nodes.size >= DOMAIN_SPLIT_MIN_ENTITIES) {
56
+ findings.push({
57
+ severity: 'warning',
58
+ code: 'frond-holds-several-domains',
59
+ filePath: fronds[0].source.path,
60
+ message: `'${fronds[0].name}': ${clusters.length} entity groups with no relation between `
61
+ + `them (${clusters.map((c) => c.name).join(', ')}). Either a relation is missing, or `
62
+ + `they are separate fronds — see \`fougere graph\`.`,
63
+ });
64
+ }
65
+ }
66
+ /**
67
+ * An entity addressing an adapter this project does not depend on. Judged HERE and
68
+ * not at boot: a process only knows the adapters it loaded, so an entity stating a
69
+ * Postgres column type in an app running on `adapter/memory` is indistinguishable
70
+ * from a typo. A project's dependencies name every adapter it could ever load.
71
+ *
72
+ * Silent when the project depends on none — there would be nothing to compare against,
73
+ * and reporting every key as unknown is worse than saying nothing.
74
+ */
75
+ const known = await adaptersOf(root);
76
+ if (known.length > 0) {
77
+ for (const frond of fronds) {
78
+ for (const entity of frond.entities) {
79
+ for (const name of Object.keys(entity.entityClass.getAdapters() ?? {})) {
80
+ if (known.includes(name))
81
+ continue;
82
+ findings.push({
83
+ severity: 'warning',
84
+ code: 'unknown-adapter',
85
+ filePath: entity.filePath,
86
+ subject: entity.name,
87
+ message: `states \`adapters: { ${name} }\`, and this project depends on no adapter `
88
+ + `that answers to it. It depends on ${known.join(', ')}. Nothing reads the entry, `
89
+ + 'so it is inert — a typo, or a dependency that was never added.',
90
+ });
91
+ }
92
+ }
93
+ }
94
+ }
95
+ /**
96
+ * A `pattern` that backtracks super-linearly. The pattern is fixed at declaration and
97
+ * the string tested against it is not: whoever calls the facade chooses it, so the cost
98
+ * of one match is theirs to set. Judged HERE because a regex says the same thing on
99
+ * every run — checking it per row would pay for a verdict that never changes.
100
+ *
101
+ * `safe-regex` reads the star height, which is the common shape and not every one:
102
+ * `(a|a)*b` backtracks too and passes. Reported as a suspicion, never as a refusal.
103
+ */
104
+ for (const frond of fronds) {
105
+ for (const entity of frond.entities) {
106
+ for (const [key, field] of Object.entries(entity.entityClass.getFields())) {
107
+ for (const pattern of Shapes.patterns(field.shape)) {
108
+ if (safeRegex(pattern))
109
+ continue;
110
+ findings.push({
111
+ severity: 'warning',
112
+ code: 'super-linear-pattern',
113
+ filePath: entity.filePath,
114
+ subject: `${entity.name}.${key}`,
115
+ message: `states \`pattern: ${JSON.stringify(pattern)}\`, whose nested repetition `
116
+ + 'backtracks super-linearly. A value a caller chooses can hold the event loop '
117
+ + 'for seconds — rewrite the repeated group, or bound the field with `max`.',
118
+ });
119
+ }
120
+ }
121
+ }
122
+ }
123
+ /**
124
+ * A warning, not a refusal: it resolves today and the app runs. What it costs is
125
+ * paid once, late — the day the frond it reaches into is deployed on its own.
126
+ */
127
+ for (const reach of await crossFrondImports(fronds)) {
128
+ findings.push({
129
+ severity: 'warning',
130
+ code: reach.rule,
131
+ filePath: reach.filePath,
132
+ message: reach.message,
133
+ });
134
+ }
135
+ const conventions = resolveConventions(config.conventions);
136
+ /**
137
+ * What no convention names. Reported before the declarations below, because a frond
138
+ * with nowhere to put a word is why the word ends up in a handler.
139
+ */
140
+ for (const unplaced of await outsideConventions(fronds, conventions)) {
141
+ findings.push({
142
+ severity: 'warning',
143
+ code: unplaced.rule,
144
+ filePath: unplaced.filePath,
145
+ subject: unplaced.frond,
146
+ message: unplaced.message,
147
+ });
148
+ }
149
+ /**
150
+ * The same shape of warning, one file lower: what the handler holds still runs, and
151
+ * what it costs is the next caller — a test, a second operation, another handler —
152
+ * that cannot reach it without moving it first.
153
+ */
154
+ for (const held of await handlerDeclarations(fronds, conventions)) {
155
+ findings.push({
156
+ severity: 'warning',
157
+ code: held.rule,
158
+ filePath: held.filePath,
159
+ subject: `${held.handler}.${held.subject}`,
160
+ message: held.message,
161
+ });
162
+ }
163
+ findings.push(...facadeFindings(root, fronds));
164
+ return { fronds: fronds.length, handlers, findings };
165
+ }
166
+ }
167
+ /**
168
+ * A facade module older than the handlers it was read off.
169
+ *
170
+ * An ABSENT module needs no finding: a page importing one fails to resolve, loudly, and a
171
+ * backend project never imports one at all — warning there would fire on every project that
172
+ * does not want a facade, which is most of them.
173
+ *
174
+ * A STALE one is the silent case. The import resolves, the operations are the old ones, and a
175
+ * renamed op compiles against a name nothing serves any more. An mtime is the whole check.
176
+ */
177
+ function facadeFindings(root, fronds) {
178
+ const facade = join(root, dirname(DEFAULT_OUT), FACADE_OUT);
179
+ const written = statSync(facade, { throwIfNoEntry: false })?.mtimeMs;
180
+ if (written === undefined)
181
+ return [];
182
+ const newer = fronds
183
+ .flatMap((frond) => frond.handlers)
184
+ .filter((handler) => (statSync(handler.filePath, { throwIfNoEntry: false })?.mtimeMs ?? 0) > written);
185
+ if (newer.length === 0)
186
+ return [];
187
+ return [{
188
+ severity: 'warning',
189
+ code: 'facade-stale',
190
+ filePath: facade,
191
+ subject: `${newer.length} handler${newer.length > 1 ? 's' : ''}`,
192
+ message: 'The facade module is older than the handlers it was read off, so a page checks its '
193
+ + 'calls against operations that may no longer exist. Run `fougere build`.',
194
+ }];
195
+ }
196
+ //# sourceMappingURL=CheckHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckHandler.js","sourceRoot":"","sources":["../../../../fronds/analysis/handlers/CheckHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,UAAU,EACV,eAAe,EACf,0BAA0B,GAE3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,8EAA8E;AAC9E,MAAM,yBAAyB,GAAG,CA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AC;IAExG,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAElC,OAAO,CAAC;YACN,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAChE,OAAO,EAAE,qFAAqF;kBAC1F,yEAAyE;SAC9E,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { CallRecord } from '@fougere/core';
2
+ import ProjectScan from '../services/ProjectScan.js';
3
+ /** One address that was asked, and what came back from it. */
4
+ export interface CallSource {
5
+ url: string;
6
+ /** The frond `remotes:` names at this address, when that is where it came from. */
7
+ frond?: string;
8
+ cursor: number;
9
+ inFlight: number;
10
+ dropped: number;
11
+ /** Present instead of the numbers when the address did not answer, or serves no log. */
12
+ refusal?: string;
13
+ }
14
+ /**
15
+ * Every app of this project, read at once.
16
+ *
17
+ * A reader pulls: no app registers anywhere, and an app started alone depends on nothing.
18
+ * The price is knowing the addresses, which the project already states — `remotes:` says
19
+ * where a call goes, so it also says where the other half of a call can be watched.
20
+ */
21
+ export interface CallsView {
22
+ sources: CallSource[];
23
+ /** Every call, oldest first, each carrying the address it was read from. */
24
+ calls: (CallRecord & {
25
+ source: string;
26
+ })[];
27
+ }
28
+ export default class DevtoolsHandler {
29
+ private projectScan;
30
+ constructor(projectScan: ProjectScan);
31
+ /** Read what the running apps have dispatched since a cursor per address. */
32
+ execute(input: {
33
+ url?: string;
34
+ root?: string;
35
+ since?: Record<string, number>;
36
+ }): Promise<CallsView>;
37
+ /**
38
+ * The addresses this project declares, plus the local one.
39
+ *
40
+ * `remotes:` is the operator's statement of where a call goes; reading it here is not a
41
+ * second source of truth, it is the same one read for the other direction.
42
+ */
43
+ private addresses;
44
+ }
45
+ //# sourceMappingURL=DevtoolsHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevtoolsHandler.d.ts","sourceRoot":"","sources":["../../../../fronds/analysis/handlers/DevtoolsHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAerD,8DAA8D;AAC9D,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,4EAA4E;IAC5E,KAAK,EAAE,CAAC,UAAU,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAC5C;AAED,MAAM,CAAC,OAAO,OAAO,eAAe;IACtB,OAAO,CAAC,WAAW;IAA/B,YAAoB,WAAW,EAAE,WAAW,EAAI;IAEhD,6EAA6E;IACvE,OAAO,CAAC,KAAK,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CA0BxG;IAED;;;;;OAKG;YACW,SAAS;CAQxB"}
@@ -0,0 +1,61 @@
1
+ import { createHttpTransport } from '@fougere/transport-http/client';
2
+ import { remotesOf } from '@fougere/core/node';
3
+ /**
4
+ * Where an app answers in development — Nuxt, Next and the site all sit there, so it is a
5
+ * convention and not a setting. A port belongs to the HOST, though, and this project states
6
+ * none: an app served anywhere else is named the way `FOUGERE_LOG_LEVEL` names a level the
7
+ * file did not, and `--url` still wins over both.
8
+ */
9
+ const LOCAL = 'http://127.0.0.1:3000';
10
+ function local() {
11
+ return trimmed(process.env.FOUGERE_URL || LOCAL);
12
+ }
13
+ export default class DevtoolsHandler {
14
+ projectScan;
15
+ constructor(projectScan) {
16
+ this.projectScan = projectScan;
17
+ }
18
+ /** Read what the running apps have dispatched since a cursor per address. */
19
+ async execute(input) {
20
+ const asked = input.url ? [{ url: trimmed(input.url) }] : await this.addresses(input.root);
21
+ const since = input.since ?? {};
22
+ const read = await Promise.all(asked.map(async (one) => {
23
+ try {
24
+ const page = await createHttpTransport(one.url)({ entity: 'rpc', op: 'calls' }, { params: {}, query: {}, input: { since: since[one.url] ?? 0 }, state: {} });
25
+ return { ...one, cursor: page.cursor, inFlight: page.inFlight, dropped: page.dropped, calls: page.calls };
26
+ }
27
+ catch (err) {
28
+ // An address that does not answer is a source with a reason, not a missing source:
29
+ // an app not started and an app without the package are different facts, and both
30
+ // are worth seeing beside the ones that answered.
31
+ return { ...one, cursor: since[one.url] ?? 0, inFlight: 0, dropped: 0, calls: [], refusal: said(err) };
32
+ }
33
+ }));
34
+ return {
35
+ sources: read.map(({ calls: _calls, ...source }) => source),
36
+ calls: read
37
+ .flatMap(({ url, calls }) => calls.map((call) => ({ ...call, source: url })))
38
+ .sort((a, b) => a.startedAt - b.startedAt || a.seq - b.seq),
39
+ };
40
+ }
41
+ /**
42
+ * The addresses this project declares, plus the local one.
43
+ *
44
+ * `remotes:` is the operator's statement of where a call goes; reading it here is not a
45
+ * second source of truth, it is the same one read for the other direction.
46
+ */
47
+ async addresses(root) {
48
+ const { config } = await this.projectScan.at(root);
49
+ const here = local();
50
+ const remotes = Object.entries(remotesOf(config))
51
+ .map(([frond, url]) => ({ url: trimmed(url), frond }));
52
+ return [{ url: here }, ...remotes.filter((one) => one.url !== here)];
53
+ }
54
+ }
55
+ function trimmed(url) {
56
+ return url.replace(/\/$/, '');
57
+ }
58
+ function said(err) {
59
+ return err instanceof Error ? err.message : String(err);
60
+ }
61
+ //# sourceMappingURL=DevtoolsHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevtoolsHandler.js","sourceRoot":"","sources":["../../../../fronds/analysis/handlers/DevtoolsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,KAAK,GAAG,uBAAuB,CAAC;AAEtC,SAAS,KAAK;IACZ,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC;AACnD,CAAC;AA2BD,MAAM,CAAC,OAAO,OAAO,eAAe;IACd,WAAW;IAA/B,YAAoB,WAAwB;2BAAxB,WAAW;IAAgB,CAAC;IAEhD,6EAA6E;IAC7E,KAAK,CAAC,OAAO,CAAC,KAAsE;QAClF,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3F,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;QAEhC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAAiD,EAAE;YACpG,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,CAC7C,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAC9B,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,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KAAK,CAAC,SAAS,CAAC,IAAa;QACnC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,KAAK,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;aAC9C,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAEzD,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC;IACvE,CAAC;CACF;AAED,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,IAAI,CAAC,GAAY;IACxB,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { type EffectiveOperation, type OperationContract } from '@fougere/core';
2
+ import ProjectScan from '../services/ProjectScan.js';
3
+ type Cardinality = NonNullable<OperationContract['cardinality']>;
4
+ export type ExplainedBinding = {
5
+ kind: 'collector';
6
+ typeName: string;
7
+ } | {
8
+ kind: 'fact';
9
+ factName: string;
10
+ } | {
11
+ kind: 'param';
12
+ name: string;
13
+ coerce?: 'number' | 'boolean';
14
+ } | {
15
+ kind: 'input';
16
+ } | {
17
+ kind: 'context';
18
+ } | {
19
+ kind: 'query';
20
+ };
21
+ export interface ExplainedParameter {
22
+ name: string;
23
+ type: string | null;
24
+ optional: boolean;
25
+ nullable: boolean;
26
+ undefinable: boolean;
27
+ binding: ExplainedBinding | null;
28
+ }
29
+ export interface ExplainedCollector {
30
+ typeName: string;
31
+ class: string;
32
+ file: string;
33
+ }
34
+ /** Stable, JSON-shaped projection of core's canonical EffectiveOperation. */
35
+ export interface ExplainResult {
36
+ operation: string;
37
+ handler: {
38
+ class: string;
39
+ address: string;
40
+ method: string;
41
+ file: string | null;
42
+ };
43
+ kind: 'query' | 'command';
44
+ description: string | null;
45
+ input: string | null;
46
+ output: {
47
+ type: string;
48
+ cardinality: Cardinality | null;
49
+ } | null;
50
+ parameters: ExplainedParameter[];
51
+ collectors: ExplainedCollector[];
52
+ contexts: string[];
53
+ semantics: EffectiveOperation['semantics'];
54
+ exposure: {
55
+ surfaces: string[];
56
+ adapters: string[];
57
+ };
58
+ placement: {
59
+ frond: string;
60
+ runtime: 'local' | 'remote';
61
+ remote: string | null;
62
+ };
63
+ /** Where the work GOES, next to where it answers — and how much of it leaves the process. */
64
+ reach: {
65
+ fronds: {
66
+ frond: string;
67
+ runtime: 'local' | 'remote';
68
+ }[];
69
+ hops: number;
70
+ };
71
+ }
72
+ /** What this project serves, when no single operation was named. */
73
+ export interface ExplainListing {
74
+ fronds: {
75
+ name: string;
76
+ runtime: 'local' | 'remote';
77
+ remote: string | null;
78
+ operations: number;
79
+ }[];
80
+ operations: string[];
81
+ }
82
+ /** Read one operation directly from the model boot and check also consume. */
83
+ export default class ExplainHandler {
84
+ private projectScan;
85
+ constructor(projectScan: ProjectScan);
86
+ /** The names this project serves — the list `explain` used to spell in a refusal only. */
87
+ list(input: {
88
+ root?: string;
89
+ }): Promise<ExplainListing>;
90
+ private modelOf;
91
+ /** Print the contract one operation will be served under. */
92
+ execute(input: {
93
+ operation?: string;
94
+ root?: string;
95
+ json?: boolean;
96
+ }): Promise<ExplainResult>;
97
+ }
98
+ export {};
99
+ //# sourceMappingURL=ExplainHandler.d.ts.map
@@ -0,0 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