@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
package/src/loader.ts DELETED
@@ -1,28 +0,0 @@
1
- import { resolve, sep } from 'node:path';
2
- import { pathToFileURL } from 'node:url';
3
- import { frondAliases } from '@fougere/compiler';
4
- import { resolveConventions } from '@fougere/core';
5
- import { setModuleLoader, loadConfig } from '@fougere/core/node';
6
- import type { Conventions } from '@fougere/core';
7
-
8
- /**
9
- * The loader every command needs — made FROM the project, since a module key (`'@fougere/log'`)
10
- * is resolved against whoever made the loader: made here, it looked in the CLI's own
11
- * dependencies and never in the project's.
12
- */
13
- export async function installLoader(root: string, reread = false): Promise<Conventions> {
14
- const { createJiti } = await import('jiti');
15
- const project = pathToFileURL(resolve(root) + sep).href;
16
- const bare = createJiti(project, { interopDefault: true });
17
- setModuleLoader((filePath) => bare.import(filePath) as Promise<Record<string, unknown>>);
18
-
19
- const conventions = resolveConventions((await loadConfig(root)).conventions);
20
- const jiti = createJiti(project, {
21
- interopDefault: true,
22
- alias: await frondAliases(root, conventions),
23
- ...(reread ? { moduleCache: false } : {}),
24
- });
25
- setModuleLoader((filePath) => jiti.import(filePath) as Promise<Record<string, unknown>>);
26
-
27
- return conventions;
28
- }
package/src/machine.ts DELETED
@@ -1,17 +0,0 @@
1
- /** A command's machine output — the one shape a pipe reads. */
2
- export function machineWanted(raw: Record<string, unknown>): boolean {
3
- return raw.json === true || typeof raw.names === 'string';
4
- }
5
-
6
- /**
7
- * A `Map` serializes to `{}`, so the facade converts it rather than each command flattening its own
8
- * result: `GraphResult.nodes` is a Map, and `graph --json` would have printed a report with an
9
- * empty graph in it.
10
- */
11
- export function machineText(value: unknown): string {
12
- return JSON.stringify(value, (_key, held) => (held instanceof Map ? Object.fromEntries(held) : held), 2);
13
- }
14
-
15
- export function printMachine(value: unknown): void {
16
- process.stdout.write(machineText(value) + '\n');
17
- }
package/src/runner.ts DELETED
@@ -1,152 +0,0 @@
1
- /**
2
- * CLI runner — scans frond entities for flags, looks for app commands for presentation, dispatches
3
- * via citty.
4
- */
5
- import type { App } from '@fougere/core';
6
- import { createAppRunner } from '@fougere/core';
7
- import { lowerFirst } from '@fougere/core/contract';
8
- import { defineCommand, runMain } from 'citty';
9
- import { ui } from './ui.js';
10
- import { machineWanted } from './machine.js';
11
- import { Shapes } from '@fougere/schema';
12
- import { entityToArgs } from './bridge.js';
13
- import { readdir } from 'node:fs/promises';
14
- import { join } from 'node:path';
15
-
16
- function toKebab(name: string): string {
17
- return name.replace(/[A-Z]/g, (c) => '-' + c.toLowerCase()).replace(/^-/, '');
18
- }
19
-
20
- function toCamel(kebab: string): string {
21
- return kebab.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
22
- }
23
-
24
- /** Scan app/commands/ for command classes. */
25
- async function loadAppCommands(
26
- root: string,
27
- loader: (path: string) => Promise<Record<string, unknown>>,
28
- ): Promise<Map<string, new (...args: unknown[]) => { run: (raw: Record<string, unknown>) => Promise<void> }>> {
29
- const map = new Map();
30
- const dir = join(root, 'app', 'commands');
31
- const files = await readdir(dir, { withFileTypes: true }).catch(() => []);
32
-
33
- for (const f of files) {
34
- if (!f.isFile() || !(f.name.endsWith('.ts') || f.name.endsWith('.js'))) continue;
35
- const name = f.name.replace(/Command\.(ts|js)$/, '').replace(/\.(ts|js)$/, '');
36
- const kebab = toKebab(name);
37
- const mod = await loader(join(dir, f.name));
38
- if (mod.default && typeof mod.default === 'function') {
39
- map.set(kebab, mod.default);
40
- }
41
- }
42
-
43
- return map;
44
- }
45
-
46
- /**
47
- * Every operation of an app, as a terminal command.
48
- *
49
- * `root` is where the PRESENTATION classes are looked for — `app/commands/`, one per command
50
- * that wants to print something of its own. It defaults to this package, which is how
51
- * `npx fougere` finds its fifteen; a project passes its own and gets the same treatment for
52
- * the operations it declares, with no class at all where a default rendering will do.
53
- */
54
- export async function run(app: App, root = new URL('..', import.meta.url).pathname): Promise<void> {
55
- const terminal = ui();
56
-
57
- const { createJiti } = await import('jiti');
58
- const jiti = createJiti(import.meta.url, { interopDefault: true });
59
- const loader = (path: string) => jiti.import(path) as Promise<Record<string, unknown>>;
60
- const appCommands = await loadAppCommands(root, loader);
61
-
62
- const subCommands: Record<string, ReturnType<typeof defineCommand>> = {};
63
-
64
- for (const frond of app.fronds) {
65
- const handlerMap = new Map(frond.handlers.map((h) => [h.address, h]));
66
-
67
- for (const entity of frond.entities) {
68
- const handlerEntry = handlerMap.get(entity.name);
69
- if (!handlerEntry) continue;
70
-
71
- const handlerName = `${entity.name}Handler`;
72
- let handler: Record<string, Function>;
73
- try {
74
- handler = app.resolve<Record<string, Function>>(handlerName);
75
- } catch { continue; }
76
-
77
- if (typeof handler.execute !== 'function') continue;
78
-
79
- const cmdName = toKebab(entity.name);
80
- const fields = entity.entityClass.getFields();
81
- const args = entityToArgs(fields);
82
-
83
- // Check for an app command (presentation layer)
84
- const AppCommand = appCommands.get(cmdName);
85
-
86
- // App commands handle their own prompting — don't let citty reject missing args
87
- if (AppCommand) {
88
- for (const def of Object.values(args)) {
89
- if (typeof def === 'object' && def) def.required = false;
90
- }
91
- }
92
-
93
- subCommands[cmdName] = defineCommand({
94
- meta: {
95
- name: cmdName,
96
- // `--help` reads the operation's own doc sentence, which the scan already
97
- // carries for every facade (`OperationContract.description`). A table here
98
- // would be the same fact written twice, and it drifted: it described `add`
99
- // and `doctor`, which do not exist, and had nothing for `call` or `serve`.
100
- description: handlerEntry.operations.get('execute')?.description,
101
- },
102
- args,
103
- run: async ({ args: parsed }) => {
104
- // JSON is a protocol: a branded intro before `{` makes it unparsable. Read from
105
- // the invocation's own args, so any command declaring `json` gets a clean stdout
106
- // — naming `explain` here is what let `graph --json` print its decorated box.
107
- const machineOutput = machineWanted(parsed as Record<string, unknown>);
108
-
109
- // `completion` is exempt by nature, not by flag: its output IS a shell script,
110
- // there is no invocation of it that wants decoration.
111
- if (cmdName !== 'completion' && !machineOutput) terminal.intro();
112
-
113
- // citty adds `_` (raw positionals) and `--` (passthrough); strip them
114
- // so only the entity's own fields reach the handler — read as their shape says,
115
- // since a flag is text.
116
- const input = Object.fromEntries(
117
- Object.entries(parsed as Record<string, unknown>)
118
- .filter(([key]) => key !== '_' && key !== '--')
119
- .map(([key, value]) => [key, Shapes.fromText(fields[key]?.shape, value)]),
120
- );
121
-
122
- try {
123
- if (AppCommand) {
124
- const cmd = new (AppCommand as new (...a: unknown[]) => { run: (raw: Record<string, unknown>) => Promise<void> })(app, terminal);
125
- await cmd.run(input);
126
- } else {
127
- // Ride the call contract — the same envelope every consumer uses.
128
- await createAppRunner(app)(
129
- { entity: lowerFirst(entity.name), op: 'execute' },
130
- { params: {}, query: {}, input: input, state: {} },
131
- );
132
- }
133
- } catch (err) {
134
- const message = err instanceof Error ? err.message : String(err);
135
- // A machine reader parses stdout: a refusal printed there is a refusal that
136
- // breaks the parse instead of being read. stderr is where it belongs.
137
- if (machineOutput) process.stderr.write(message + '\n');
138
- else terminal.error(message);
139
- process.exit(1);
140
- }
141
- },
142
- });
143
- }
144
- }
145
-
146
- const main = defineCommand({
147
- meta: { name: 'fougere', description: 'Fougere CLI' },
148
- subCommands,
149
- });
150
-
151
- await runMain(main);
152
- }
package/src/theme.ts DELETED
@@ -1,19 +0,0 @@
1
- import pc from 'picocolors';
2
-
3
- export interface ThemeColors {
4
- brand: (text: string) => string;
5
- success: (text: string) => string;
6
- error: (text: string) => string;
7
- warn: (text: string) => string;
8
- muted: (text: string) => string;
9
- bold: (text: string) => string;
10
- }
11
-
12
- export const defaultTheme: ThemeColors = {
13
- brand: pc.green,
14
- success: pc.green,
15
- error: pc.red,
16
- warn: pc.yellow,
17
- muted: pc.dim,
18
- bold: pc.bold,
19
- };
@@ -1,92 +0,0 @@
1
- import { Shapes, upperFirst, type FieldDescriptor, type SchemaDescriptor } from '@fougere/schema';
2
- import { docCommentOf, propertyKey } from './syntax.js';
3
-
4
- export interface EntityTypesOptions {
5
- name?: string;
6
- exported?: boolean;
7
- }
8
-
9
- /** So a nullable field lands as a union. */
10
- function typeOf(field: FieldDescriptor): string {
11
- const types = Shapes.typesOf(field);
12
- const nullable = types.includes('null');
13
- const base = types.find((t) => t !== 'null');
14
- const inner = baseTypeOf(base, field);
15
-
16
- return nullable ? `${inner} | null` : inner;
17
- }
18
-
19
- /** So `date-time` becomes a `Date`, the same thing the boundary decodes to. */
20
- function baseTypeOf(base: string | undefined, field: FieldDescriptor): string {
21
- if (field.enum?.length) {
22
- return field.enum.map((v) => (v === null ? 'null' : JSON.stringify(v))).join(' | ');
23
- }
24
- switch (base) {
25
- case 'string':
26
- return field.format === 'date-time' ? 'Date' : 'string';
27
- case 'number':
28
- case 'integer':
29
- return 'number';
30
- case 'boolean':
31
- return 'boolean';
32
- case 'array':
33
- return field.items ? `${typeOf(field.items)}[]` : 'string[]';
34
- case 'object':
35
- return field.properties ? objectTypeOf(field.properties, field.required ?? []) : 'Record<string, unknown>';
36
- default:
37
- return 'unknown';
38
- }
39
- }
40
-
41
- /** So a nested object keeps its optionality. */
42
- function objectTypeOf(properties: Record<string, FieldDescriptor>, required: readonly string[]): string {
43
- const members = Object.entries(properties).map(([name, field]) => {
44
- const optional = required.includes(name) ? '' : '?';
45
-
46
- return `${propertyKey(name)}${optional}: ${typeOf(field)}`;
47
- });
48
-
49
- return `{ ${members.join('; ')} }`;
50
- }
51
-
52
- /** So the generated class carries its row type. */
53
- function shapeTypeOf(descriptor: SchemaDescriptor, indent = ''): string {
54
- const entries = Object.entries(descriptor.properties ?? {});
55
- if (entries.length === 0) return '{}';
56
-
57
- const lines = entries.map(([key, field]) => {
58
- const doc = docCommentOf(field.description, `${indent} `);
59
-
60
- return `${doc}${indent} ${propertyKey(key)}: ${typeOf(field)};`;
61
- });
62
-
63
- return `{\n${lines.join('\n')}\n${indent}}`;
64
- }
65
-
66
- export class EntityTypes {
67
- private constructor(private readonly descriptor: SchemaDescriptor) {}
68
-
69
- static of(descriptor: SchemaDescriptor): EntityTypes {
70
- return new EntityTypes(descriptor);
71
- }
72
-
73
- render(options: EntityTypesOptions = {}): string {
74
- const name = identifierOf(options.name ?? upperFirst(this.descriptor.title ?? 'Schema'));
75
- const exported = options.exported === false ? '' : 'export ';
76
- const card = JSON.stringify(this.descriptor, null, 2)
77
- .split('\n')
78
- .map((line, i) => (i === 0 ? line : ` ${line}`))
79
- .join('\n');
80
-
81
- return `${exported}class ${name} extends Card.fromDescriptor<${shapeTypeOf(this.descriptor)}>(${card}).toSchema() {}`;
82
- }
83
- }
84
-
85
- /** So a name that cannot declare a class is refused before it reaches a file. */
86
- function identifierOf(name: string): string {
87
- if (!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name)) {
88
- throw new Error(`'${name}' is not a TypeScript identifier — it cannot name a generated declaration`);
89
- }
90
-
91
- return name;
92
- }
@@ -1,50 +0,0 @@
1
- import type { SchemaDescriptor } from '@fougere/schema';
2
- import { docCommentOf, propertyKey } from './syntax.js';
3
-
4
- export interface OpDescriptor {
5
- name: string;
6
- description?: string;
7
- output?: SchemaDescriptor;
8
- cardinality?: 'one' | 'maybe' | 'many' | 'page' | 'none';
9
- }
10
-
11
- export interface FacadeTypesOptions {
12
- name?: string;
13
- exported?: boolean;
14
- rowType?: string;
15
- }
16
-
17
- /** So a consumer sees the cardinality in the type, not in a doc line. */
18
- function returnTypeOf(op: OpDescriptor, rowType: string): string {
19
- switch (op.cardinality) {
20
- case 'many': return `${rowType}[]`;
21
- case 'page': return `${rowType}[] & { total?: number; endCursor?: string; hasMore?: boolean }`;
22
- case 'maybe': return `${rowType} | undefined`;
23
- case 'one': return rowType;
24
- case 'none': return 'unknown';
25
- default: return 'unknown';
26
- }
27
- }
28
-
29
- export class FacadeTypes {
30
- private constructor(private readonly operations: readonly OpDescriptor[]) {}
31
-
32
- static of(operations: readonly OpDescriptor[]): FacadeTypes {
33
- return new FacadeTypes(operations);
34
- }
35
-
36
- render(options: FacadeTypesOptions = {}): string {
37
- const name = options.name ?? 'Facade';
38
- const exported = options.exported === false ? '' : 'export ';
39
- const rowType = options.rowType ?? 'unknown';
40
- const members = this.operations.map((operation) => {
41
- const doc = docCommentOf(operation.description, ' ');
42
-
43
- return `${doc} ${propertyKey(operation.name)}(invocation?: Invocation): Promise<${returnTypeOf(operation, rowType)}>;`;
44
- });
45
-
46
- if (members.length === 0) return `${exported}interface ${name} {}`;
47
-
48
- return `${exported}interface ${name} {\n${members.join('\n')}\n}`;
49
- }
50
- }
@@ -1,11 +0,0 @@
1
- /** So a name that is not an identifier is still written as a key. */
2
- export function propertyKey(name: string): string {
3
- return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name) ? name : JSON.stringify(name);
4
- }
5
-
6
- /** So a sentence shows on hover — and cannot close the comment it sits in. */
7
- export function docCommentOf(text: string | undefined, indent: string): string {
8
- if (!text) return '';
9
-
10
- return `${indent}/** ${text.replace(/\*\//g, '*\\/')} */\n`;
11
- }
package/src/ui.ts DELETED
@@ -1,142 +0,0 @@
1
- /** Fougere CLI UI — beautiful terminal interface. */
2
- import * as clack from '@clack/prompts';
3
- import pc from 'picocolors';
4
- import { consola } from 'consola';
5
- import { defaultTheme, type ThemeColors } from './theme.js';
6
-
7
- export interface UiTheme {
8
- colors?: Partial<ThemeColors>;
9
- }
10
-
11
- export function ui(options?: UiTheme) {
12
- const c = { ...defaultTheme, ...options?.colors };
13
-
14
- return {
15
- // ── Lifecycle ─────────────────────────────────
16
-
17
- /** Start a new CLI session with a branded header. */
18
- intro(title = 'Fougere') {
19
- clack.intro(c.brand(title));
20
- },
21
-
22
- /** End the session with a message. */
23
- outro(message: string) {
24
- clack.outro(c.success(message));
25
- },
26
-
27
- /** Cancel and exit. */
28
- cancel(message = 'Cancelled.') {
29
- clack.cancel(c.muted(message));
30
- process.exit(0);
31
- },
32
-
33
- // ── Prompts ───────────────────────────────────
34
-
35
- /** Text input. */
36
- async text(opts: { message: string; placeholder?: string; defaultValue?: string; validate?: (value: string) => string | undefined }) {
37
- const result = await clack.text(opts);
38
-
39
-
40
-
41
-
42
- if (clack.isCancel(result)) { this.cancel(); return ''; }
43
-
44
- return result as string;
45
- },
46
-
47
- /** Yes/no confirmation. */
48
- async confirm(opts: { message: string; initialValue?: boolean }) {
49
- const result = await clack.confirm(opts);
50
-
51
-
52
-
53
-
54
- if (clack.isCancel(result)) { this.cancel(); return false; }
55
-
56
- return result as boolean;
57
- },
58
-
59
- /** Select one from a list. */
60
- async select(opts: {
61
- message: string;
62
- options: { value: string; label?: string; hint?: string }[];
63
- initialValue?: string;
64
- }) {
65
- const result = await clack.select(opts as Parameters<typeof clack.select>[0]);
66
-
67
-
68
-
69
-
70
- if (clack.isCancel(result)) { this.cancel(); return ''; }
71
-
72
- return result as string;
73
- },
74
-
75
- /** Multi-select from a list. */
76
- async multiselect(opts: {
77
- message: string;
78
- options: { value: string; label?: string; hint?: string }[];
79
- required?: boolean;
80
- }) {
81
- const result = await clack.multiselect(opts as Parameters<typeof clack.multiselect>[0]);
82
-
83
-
84
-
85
-
86
- if (clack.isCancel(result)) { this.cancel(); return [] as string[]; }
87
-
88
- return result as string[];
89
- },
90
-
91
- // ── Spinner ───────────────────────────────────
92
-
93
- /** Start a spinner. Returns stop/update functions. */
94
- spinner(message?: string) {
95
- const s = clack.spinner();
96
- s.start(message);
97
-
98
- return {
99
- update: (msg: string) => s.message(msg),
100
- stop: (msg?: string) => s.stop(msg),
101
- };
102
- },
103
-
104
- // ── Output ────────────────────────────────────
105
-
106
- /** Informational message. */
107
- info(message: string) {
108
- clack.log.info(message);
109
- },
110
-
111
- /** Success message. */
112
- success(message: string) {
113
- clack.log.success(c.success(message));
114
- },
115
-
116
- /** Warning message. */
117
- warn(message: string) {
118
- clack.log.warn(c.warn(message));
119
- },
120
-
121
- /** Error message. */
122
- error(message: string) {
123
- clack.log.error(c.error(message));
124
- },
125
-
126
- /** Step indicator. */
127
- step(message: string) {
128
- clack.log.step(message);
129
- },
130
-
131
- /** Note box — multiline content in a box. */
132
- note(message: string, title?: string) {
133
- clack.note(message, title);
134
- },
135
-
136
- // ── Raw colors/consola ────────────────────────
137
-
138
- colors: c,
139
- pc,
140
- consola,
141
- };
142
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes