@warlock.js/core 5.1.0 → 5.2.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 (1039) hide show
  1. package/CHANGELOG.md +143 -0
  2. package/esm/application/app.d.mts +1 -1
  3. package/esm/application/app.d.mts.map +1 -1
  4. package/esm/application/app.mjs +1 -1
  5. package/esm/application/app.mjs.map +1 -1
  6. package/esm/application/application-config-types.d.mts +1 -1
  7. package/esm/application/application-config-types.d.mts.map +1 -1
  8. package/esm/application/application.d.mts +1 -1
  9. package/esm/application/application.d.mts.map +1 -1
  10. package/esm/application/application.mjs +1 -1
  11. package/esm/application/application.mjs.map +1 -1
  12. package/esm/application/boot-signal.d.mts +1 -1
  13. package/esm/application/boot-signal.d.mts.map +1 -1
  14. package/esm/application/boot-signal.mjs +1 -1
  15. package/esm/application/boot-signal.mjs.map +1 -1
  16. package/esm/benchmark/benchmark-snapshots.d.mts +1 -1
  17. package/esm/benchmark/benchmark-snapshots.d.mts.map +1 -1
  18. package/esm/benchmark/benchmark-snapshots.mjs +1 -1
  19. package/esm/benchmark/benchmark-snapshots.mjs.map +1 -1
  20. package/esm/benchmark/benchmark.d.mts +1 -1
  21. package/esm/benchmark/benchmark.d.mts.map +1 -1
  22. package/esm/benchmark/benchmark.mjs +1 -1
  23. package/esm/benchmark/benchmark.mjs.map +1 -1
  24. package/esm/benchmark/channels/console.channel.d.mts +1 -1
  25. package/esm/benchmark/channels/console.channel.d.mts.map +1 -1
  26. package/esm/benchmark/channels/console.channel.mjs +1 -1
  27. package/esm/benchmark/channels/console.channel.mjs.map +1 -1
  28. package/esm/benchmark/channels/noop.channel.d.mts +1 -1
  29. package/esm/benchmark/channels/noop.channel.d.mts.map +1 -1
  30. package/esm/benchmark/channels/noop.channel.mjs +1 -1
  31. package/esm/benchmark/channels/noop.channel.mjs.map +1 -1
  32. package/esm/benchmark/profiler.d.mts +1 -1
  33. package/esm/benchmark/profiler.d.mts.map +1 -1
  34. package/esm/benchmark/profiler.mjs +1 -1
  35. package/esm/benchmark/profiler.mjs.map +1 -1
  36. package/esm/benchmark/types.d.mts +1 -1
  37. package/esm/benchmark/types.d.mts.map +1 -1
  38. package/esm/bootstrap/setup.d.mts +1 -1
  39. package/esm/bootstrap/setup.d.mts.map +1 -1
  40. package/esm/bootstrap/setup.mjs +1 -1
  41. package/esm/bootstrap/setup.mjs.map +1 -1
  42. package/esm/bootstrap.d.mts +1 -1
  43. package/esm/bootstrap.d.mts.map +1 -1
  44. package/esm/bootstrap.mjs +1 -1
  45. package/esm/bootstrap.mjs.map +1 -1
  46. package/esm/cache/database-cache-driver.d.mts +1 -1
  47. package/esm/cache/database-cache-driver.d.mts.map +1 -1
  48. package/esm/cache/database-cache-driver.mjs +1 -1
  49. package/esm/cache/database-cache-driver.mjs.map +1 -1
  50. package/esm/cache/index.mjs +1 -1
  51. package/esm/cache/index.mjs.map +1 -1
  52. package/esm/cli/cli-commands.manager.mjs +1 -1
  53. package/esm/cli/cli-commands.manager.mjs.map +1 -1
  54. package/esm/cli/cli-commands.utils.mjs +17 -11
  55. package/esm/cli/cli-commands.utils.mjs.map +1 -1
  56. package/esm/cli/commands/add.command.mjs +1 -1
  57. package/esm/cli/commands/add.command.mjs.map +1 -1
  58. package/esm/cli/commands/build.command.mjs +1 -1
  59. package/esm/cli/commands/build.command.mjs.map +1 -1
  60. package/esm/cli/commands/create-database.command.mjs +1 -1
  61. package/esm/cli/commands/create-database.command.mjs.map +1 -1
  62. package/esm/cli/commands/dev-server.command.mjs +1 -1
  63. package/esm/cli/commands/dev-server.command.mjs.map +1 -1
  64. package/esm/cli/commands/doctor/boot-for-diagnostics.mjs +1 -1
  65. package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -1
  66. package/esm/cli/commands/doctor/checks/config.check.mjs +1 -1
  67. package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
  68. package/esm/cli/commands/doctor/checks/connectors.check.mjs +1 -1
  69. package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
  70. package/esm/cli/commands/doctor/checks/handler-signature.check.mjs +1 -1
  71. package/esm/cli/commands/doctor/checks/handler-signature.check.mjs.map +1 -1
  72. package/esm/cli/commands/doctor/checks/health.check.mjs +1 -1
  73. package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
  74. package/esm/cli/commands/doctor/checks/index.mjs +1 -1
  75. package/esm/cli/commands/doctor/checks/index.mjs.map +1 -1
  76. package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +1 -1
  77. package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
  78. package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +1 -1
  79. package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
  80. package/esm/cli/commands/doctor/checks/routes.check.mjs +1 -1
  81. package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
  82. package/esm/cli/commands/doctor/doctor-command.action.mjs +1 -1
  83. package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
  84. package/esm/cli/commands/doctor/format-report.mjs +1 -1
  85. package/esm/cli/commands/doctor/format-report.mjs.map +1 -1
  86. package/esm/cli/commands/doctor/run-checks.mjs +1 -1
  87. package/esm/cli/commands/doctor/run-checks.mjs.map +1 -1
  88. package/esm/cli/commands/doctor.command.mjs +1 -1
  89. package/esm/cli/commands/doctor.command.mjs.map +1 -1
  90. package/esm/cli/commands/drop-tables.command.mjs +1 -1
  91. package/esm/cli/commands/drop-tables.command.mjs.map +1 -1
  92. package/esm/cli/commands/generate/generate.command.mjs +1 -1
  93. package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
  94. package/esm/cli/commands/generate/generators/column-dsl-parser.mjs +1 -1
  95. package/esm/cli/commands/generate/generators/column-dsl-parser.mjs.map +1 -1
  96. package/esm/cli/commands/generate/generators/controller.generator.mjs +1 -1
  97. package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
  98. package/esm/cli/commands/generate/generators/migration.generator.mjs +1 -1
  99. package/esm/cli/commands/generate/generators/migration.generator.mjs.map +1 -1
  100. package/esm/cli/commands/generate/generators/model.generator.mjs +1 -1
  101. package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
  102. package/esm/cli/commands/generate/generators/module.generator.mjs +1 -1
  103. package/esm/cli/commands/generate/generators/module.generator.mjs.map +1 -1
  104. package/esm/cli/commands/generate/generators/repository.generator.mjs +1 -1
  105. package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
  106. package/esm/cli/commands/generate/generators/resource.generator.mjs +1 -1
  107. package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
  108. package/esm/cli/commands/generate/generators/service.generator.mjs +1 -1
  109. package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
  110. package/esm/cli/commands/generate/templates/stubs.mjs +1 -1
  111. package/esm/cli/commands/generate/templates/stubs.mjs.map +1 -1
  112. package/esm/cli/commands/generate/utils/name-parser.mjs +1 -1
  113. package/esm/cli/commands/generate/utils/name-parser.mjs.map +1 -1
  114. package/esm/cli/commands/generate/utils/path-resolver.mjs +1 -1
  115. package/esm/cli/commands/generate/utils/path-resolver.mjs.map +1 -1
  116. package/esm/cli/commands/generate/utils/prompt.mjs +1 -1
  117. package/esm/cli/commands/generate/utils/prompt.mjs.map +1 -1
  118. package/esm/cli/commands/generate/utils/writer.mjs +1 -1
  119. package/esm/cli/commands/generate/utils/writer.mjs.map +1 -1
  120. package/esm/cli/commands/migrate.command.mjs +1 -1
  121. package/esm/cli/commands/migrate.command.mjs.map +1 -1
  122. package/esm/cli/commands/routes/diff-page-routes.mjs +84 -0
  123. package/esm/cli/commands/routes/diff-page-routes.mjs.map +1 -0
  124. package/esm/cli/commands/routes/format-routes-table.mjs +1 -1
  125. package/esm/cli/commands/routes/format-routes-table.mjs.map +1 -1
  126. package/esm/cli/commands/routes/route-row.mjs +1 -1
  127. package/esm/cli/commands/routes/route-row.mjs.map +1 -1
  128. package/esm/cli/commands/routes/routes-command.action.mjs +1 -1
  129. package/esm/cli/commands/routes/routes-command.action.mjs.map +1 -1
  130. package/esm/cli/commands/routes/routes-diff.action.mjs +84 -0
  131. package/esm/cli/commands/routes/routes-diff.action.mjs.map +1 -0
  132. package/esm/cli/commands/routes.command.mjs +16 -2
  133. package/esm/cli/commands/routes.command.mjs.map +1 -1
  134. package/esm/cli/commands/seed.command.mjs +1 -1
  135. package/esm/cli/commands/seed.command.mjs.map +1 -1
  136. package/esm/cli/commands/start-production.command.mjs +9 -2
  137. package/esm/cli/commands/start-production.command.mjs.map +1 -1
  138. package/esm/cli/commands/storage-put.action.mjs +1 -1
  139. package/esm/cli/commands/storage-put.action.mjs.map +1 -1
  140. package/esm/cli/commands/storage-put.command.mjs +1 -1
  141. package/esm/cli/commands/storage-put.command.mjs.map +1 -1
  142. package/esm/cli/commands/typings-generator.command.mjs +1 -1
  143. package/esm/cli/commands/typings-generator.command.mjs.map +1 -1
  144. package/esm/cli/commands/update.command.mjs +1 -1
  145. package/esm/cli/commands/update.command.mjs.map +1 -1
  146. package/esm/cli/commands-loader.mjs +1 -1
  147. package/esm/cli/commands-loader.mjs.map +1 -1
  148. package/esm/cli/framework-cli-commands.mjs +3 -2
  149. package/esm/cli/framework-cli-commands.mjs.map +1 -1
  150. package/esm/cli/parse-cli-args.mjs +1 -1
  151. package/esm/cli/parse-cli-args.mjs.map +1 -1
  152. package/esm/cli/start.mjs +1 -1
  153. package/esm/cli/start.mjs.map +1 -1
  154. package/esm/cli/string-similarity.mjs +1 -1
  155. package/esm/cli/string-similarity.mjs.map +1 -1
  156. package/esm/commands/cli-command.d.mts +1 -1
  157. package/esm/commands/cli-command.d.mts.map +1 -1
  158. package/esm/commands/cli-command.mjs +1 -1
  159. package/esm/commands/cli-command.mjs.map +1 -1
  160. package/esm/commands/types.d.mts +1 -1
  161. package/esm/commands/types.d.mts.map +1 -1
  162. package/esm/config/config-getter.d.mts +1 -1
  163. package/esm/config/config-getter.d.mts.map +1 -1
  164. package/esm/config/config-getter.mjs +1 -1
  165. package/esm/config/config-getter.mjs.map +1 -1
  166. package/esm/config/config-handlers.d.mts +1 -1
  167. package/esm/config/config-handlers.d.mts.map +1 -1
  168. package/esm/config/config-handlers.mjs +1 -1
  169. package/esm/config/config-handlers.mjs.map +1 -1
  170. package/esm/config/config-loader.d.mts +2 -2
  171. package/esm/config/config-loader.d.mts.map +1 -1
  172. package/esm/config/config-loader.mjs +1 -1
  173. package/esm/config/config-loader.mjs.map +1 -1
  174. package/esm/config/config-manager.mjs +1 -1
  175. package/esm/config/config-manager.mjs.map +1 -1
  176. package/esm/config/config-setter.d.mts +1 -1
  177. package/esm/config/config-setter.d.mts.map +1 -1
  178. package/esm/config/config-setter.mjs +1 -1
  179. package/esm/config/config-setter.mjs.map +1 -1
  180. package/esm/config/config-special-handlers.d.mts +2 -2
  181. package/esm/config/config-special-handlers.d.mts.map +1 -1
  182. package/esm/config/config-special-handlers.mjs +1 -1
  183. package/esm/config/config-special-handlers.mjs.map +1 -1
  184. package/esm/config/load-config-files.mjs +1 -1
  185. package/esm/config/load-config-files.mjs.map +1 -1
  186. package/esm/config/locale-configuration.mjs +1 -1
  187. package/esm/config/locale-configuration.mjs.map +1 -1
  188. package/esm/config/types.d.mts +1 -1
  189. package/esm/config/types.d.mts.map +1 -1
  190. package/esm/connectors/access-connector.d.mts +1 -1
  191. package/esm/connectors/access-connector.d.mts.map +1 -1
  192. package/esm/connectors/access-connector.mjs +1 -1
  193. package/esm/connectors/access-connector.mjs.map +1 -1
  194. package/esm/connectors/ai-connector.d.mts +1 -1
  195. package/esm/connectors/ai-connector.d.mts.map +1 -1
  196. package/esm/connectors/ai-connector.mjs +1 -1
  197. package/esm/connectors/ai-connector.mjs.map +1 -1
  198. package/esm/connectors/assert-no-reserved-connector-names.d.mts +1 -1
  199. package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
  200. package/esm/connectors/assert-no-reserved-connector-names.mjs +1 -1
  201. package/esm/connectors/assert-no-reserved-connector-names.mjs.map +1 -1
  202. package/esm/connectors/assert-unique-connector-names.d.mts +1 -1
  203. package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
  204. package/esm/connectors/assert-unique-connector-names.mjs +1 -1
  205. package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
  206. package/esm/connectors/base-connector.d.mts +1 -1
  207. package/esm/connectors/base-connector.d.mts.map +1 -1
  208. package/esm/connectors/base-connector.mjs +1 -1
  209. package/esm/connectors/base-connector.mjs.map +1 -1
  210. package/esm/connectors/cache-connector.d.mts +1 -1
  211. package/esm/connectors/cache-connector.d.mts.map +1 -1
  212. package/esm/connectors/cache-connector.mjs +1 -1
  213. package/esm/connectors/cache-connector.mjs.map +1 -1
  214. package/esm/connectors/connectors-manager.d.mts +1 -1
  215. package/esm/connectors/connectors-manager.d.mts.map +1 -1
  216. package/esm/connectors/connectors-manager.mjs +1 -1
  217. package/esm/connectors/connectors-manager.mjs.map +1 -1
  218. package/esm/connectors/database-connector.d.mts +1 -1
  219. package/esm/connectors/database-connector.d.mts.map +1 -1
  220. package/esm/connectors/database-connector.mjs +1 -1
  221. package/esm/connectors/database-connector.mjs.map +1 -1
  222. package/esm/connectors/describe-server-address.mjs +21 -4
  223. package/esm/connectors/describe-server-address.mjs.map +1 -1
  224. package/esm/connectors/herald-connector.d.mts +1 -1
  225. package/esm/connectors/herald-connector.d.mts.map +1 -1
  226. package/esm/connectors/herald-connector.mjs +1 -1
  227. package/esm/connectors/herald-connector.mjs.map +1 -1
  228. package/esm/connectors/http-connector.d.mts +1 -1
  229. package/esm/connectors/http-connector.d.mts.map +1 -1
  230. package/esm/connectors/http-connector.mjs +6 -2
  231. package/esm/connectors/http-connector.mjs.map +1 -1
  232. package/esm/connectors/logger-connector.d.mts +1 -1
  233. package/esm/connectors/logger-connector.d.mts.map +1 -1
  234. package/esm/connectors/logger-connector.mjs +1 -1
  235. package/esm/connectors/logger-connector.mjs.map +1 -1
  236. package/esm/connectors/mail-connector.d.mts +1 -1
  237. package/esm/connectors/mail-connector.d.mts.map +1 -1
  238. package/esm/connectors/mail-connector.mjs +1 -1
  239. package/esm/connectors/mail-connector.mjs.map +1 -1
  240. package/esm/connectors/notifications-connector.d.mts +1 -1
  241. package/esm/connectors/notifications-connector.d.mts.map +1 -1
  242. package/esm/connectors/notifications-connector.mjs +1 -1
  243. package/esm/connectors/notifications-connector.mjs.map +1 -1
  244. package/esm/connectors/register-configured-connectors.d.mts +1 -1
  245. package/esm/connectors/register-configured-connectors.d.mts.map +1 -1
  246. package/esm/connectors/register-configured-connectors.mjs +1 -1
  247. package/esm/connectors/register-configured-connectors.mjs.map +1 -1
  248. package/esm/connectors/socket-connector.d.mts +1 -1
  249. package/esm/connectors/socket-connector.d.mts.map +1 -1
  250. package/esm/connectors/socket-connector.mjs +1 -1
  251. package/esm/connectors/socket-connector.mjs.map +1 -1
  252. package/esm/connectors/storage.connector.d.mts +1 -1
  253. package/esm/connectors/storage.connector.d.mts.map +1 -1
  254. package/esm/connectors/storage.connector.mjs +1 -1
  255. package/esm/connectors/storage.connector.mjs.map +1 -1
  256. package/esm/connectors/types.d.mts +1 -1
  257. package/esm/connectors/types.d.mts.map +1 -1
  258. package/esm/connectors/types.mjs +1 -1
  259. package/esm/connectors/types.mjs.map +1 -1
  260. package/esm/container/index.d.mts +1 -1
  261. package/esm/container/index.d.mts.map +1 -1
  262. package/esm/container/index.mjs +1 -1
  263. package/esm/container/index.mjs.map +1 -1
  264. package/esm/database/create-database-action.mjs +1 -1
  265. package/esm/database/create-database-action.mjs.map +1 -1
  266. package/esm/database/drop-tables-action.mjs +1 -1
  267. package/esm/database/drop-tables-action.mjs.map +1 -1
  268. package/esm/database/migrate-action.mjs +1 -1
  269. package/esm/database/migrate-action.mjs.map +1 -1
  270. package/esm/database/models/database-log/database-log.d.mts +1 -1
  271. package/esm/database/models/database-log/database-log.d.mts.map +1 -1
  272. package/esm/database/models/database-log/database-log.mjs +1 -1
  273. package/esm/database/models/database-log/database-log.mjs.map +1 -1
  274. package/esm/database/pending-exit-code.mjs +1 -1
  275. package/esm/database/pending-exit-code.mjs.map +1 -1
  276. package/esm/database/resolve-pending-migrations.mjs +1 -1
  277. package/esm/database/resolve-pending-migrations.mjs.map +1 -1
  278. package/esm/database/seed-command-action.mjs +1 -1
  279. package/esm/database/seed-command-action.mjs.map +1 -1
  280. package/esm/database/seeds/seed-records-table-migration.mjs +2 -2
  281. package/esm/database/seeds/seed-records-table-migration.mjs.map +1 -1
  282. package/esm/database/seeds/seeder.d.mts +1 -1
  283. package/esm/database/seeds/seeder.d.mts.map +1 -1
  284. package/esm/database/seeds/seeder.errors.d.mts +1 -1
  285. package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
  286. package/esm/database/seeds/seeder.errors.mjs +1 -1
  287. package/esm/database/seeds/seeder.errors.mjs.map +1 -1
  288. package/esm/database/seeds/seeder.mjs +1 -1
  289. package/esm/database/seeds/seeder.mjs.map +1 -1
  290. package/esm/database/seeds/seeders.manager.mjs +1 -1
  291. package/esm/database/seeds/seeders.manager.mjs.map +1 -1
  292. package/esm/database/seeds/seeds-table-migration.mjs +2 -2
  293. package/esm/database/seeds/seeds-table-migration.mjs.map +1 -1
  294. package/esm/database/seeds/types.d.mts +1 -1
  295. package/esm/database/seeds/types.d.mts.map +1 -1
  296. package/esm/database/seeds/utils.mjs +1 -1
  297. package/esm/database/seeds/utils.mjs.map +1 -1
  298. package/esm/database/utils.d.mts +1 -1
  299. package/esm/database/utils.d.mts.map +1 -1
  300. package/esm/database/utils.mjs +1 -1
  301. package/esm/database/utils.mjs.map +1 -1
  302. package/esm/dev-server/check-for-updates.mjs +1 -1
  303. package/esm/dev-server/check-for-updates.mjs.map +1 -1
  304. package/esm/dev-server/create-worker.mjs +1 -1
  305. package/esm/dev-server/create-worker.mjs.map +1 -1
  306. package/esm/dev-server/dependency-graph.d.mts +1 -1
  307. package/esm/dev-server/dependency-graph.d.mts.map +1 -1
  308. package/esm/dev-server/dependency-graph.mjs +1 -1
  309. package/esm/dev-server/dependency-graph.mjs.map +1 -1
  310. package/esm/dev-server/dev-logger.mjs +1 -1
  311. package/esm/dev-server/dev-logger.mjs.map +1 -1
  312. package/esm/dev-server/development-server.mjs +1 -1
  313. package/esm/dev-server/development-server.mjs.map +1 -1
  314. package/esm/dev-server/events.mjs +1 -1
  315. package/esm/dev-server/events.mjs.map +1 -1
  316. package/esm/dev-server/file-event-handler.mjs +1 -1
  317. package/esm/dev-server/file-event-handler.mjs.map +1 -1
  318. package/esm/dev-server/file-manager.d.mts +1 -1
  319. package/esm/dev-server/file-manager.d.mts.map +1 -1
  320. package/esm/dev-server/file-manager.mjs +1 -1
  321. package/esm/dev-server/file-manager.mjs.map +1 -1
  322. package/esm/dev-server/file-operations.d.mts +1 -1
  323. package/esm/dev-server/file-operations.d.mts.map +1 -1
  324. package/esm/dev-server/file-operations.mjs +1 -1
  325. package/esm/dev-server/file-operations.mjs.map +1 -1
  326. package/esm/dev-server/files-orchestrator.mjs +1 -1
  327. package/esm/dev-server/files-orchestrator.mjs.map +1 -1
  328. package/esm/dev-server/files-watcher.mjs +1 -1
  329. package/esm/dev-server/files-watcher.mjs.map +1 -1
  330. package/esm/dev-server/flags.mjs +1 -1
  331. package/esm/dev-server/flags.mjs.map +1 -1
  332. package/esm/dev-server/health-checker/checkers/base-health-checker.mjs +1 -1
  333. package/esm/dev-server/health-checker/checkers/base-health-checker.mjs.map +1 -1
  334. package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +1 -1
  335. package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
  336. package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs +1 -1
  337. package/esm/dev-server/health-checker/checkers/typescript-health-checker.mjs.map +1 -1
  338. package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +1 -1
  339. package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
  340. package/esm/dev-server/health-checker/file-health-result.d.mts +1 -1
  341. package/esm/dev-server/health-checker/file-health-result.d.mts.map +1 -1
  342. package/esm/dev-server/health-checker/file-health-result.mjs +1 -1
  343. package/esm/dev-server/health-checker/file-health-result.mjs.map +1 -1
  344. package/esm/dev-server/health-checker/files-healthcare.manager.mjs +1 -1
  345. package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
  346. package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs +1 -1
  347. package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs.map +1 -1
  348. package/esm/dev-server/health-checker/workers/ts-health.worker.mjs +1 -1
  349. package/esm/dev-server/health-checker/workers/ts-health.worker.mjs.map +1 -1
  350. package/esm/dev-server/layer-executor.mjs +11 -4
  351. package/esm/dev-server/layer-executor.mjs.map +1 -1
  352. package/esm/dev-server/loader/build-transpile-init.mjs +1 -1
  353. package/esm/dev-server/loader/build-transpile-init.mjs.map +1 -1
  354. package/esm/dev-server/loader/hook-thread.d.mts +1 -1
  355. package/esm/dev-server/loader/hook-thread.d.mts.map +1 -1
  356. package/esm/dev-server/loader/hook-thread.mjs +1 -1
  357. package/esm/dev-server/loader/hook-thread.mjs.map +1 -1
  358. package/esm/dev-server/loader/load-hook.d.mts +1 -1
  359. package/esm/dev-server/loader/load-hook.d.mts.map +1 -1
  360. package/esm/dev-server/loader/load-hook.mjs +1 -1
  361. package/esm/dev-server/loader/load-hook.mjs.map +1 -1
  362. package/esm/dev-server/loader/own-resolver.mjs +1 -1
  363. package/esm/dev-server/loader/own-resolver.mjs.map +1 -1
  364. package/esm/dev-server/loader/register-loader.mjs +1 -1
  365. package/esm/dev-server/loader/register-loader.mjs.map +1 -1
  366. package/esm/dev-server/loader/resolve-capture.mjs +1 -1
  367. package/esm/dev-server/loader/resolve-capture.mjs.map +1 -1
  368. package/esm/dev-server/loader/resolve-hook.d.mts +1 -1
  369. package/esm/dev-server/loader/resolve-hook.d.mts.map +1 -1
  370. package/esm/dev-server/loader/resolve-hook.mjs +1 -1
  371. package/esm/dev-server/loader/resolve-hook.mjs.map +1 -1
  372. package/esm/dev-server/loader/source-slug.mjs +1 -1
  373. package/esm/dev-server/loader/source-slug.mjs.map +1 -1
  374. package/esm/dev-server/loader/transpile-cache.mjs +13 -4
  375. package/esm/dev-server/loader/transpile-cache.mjs.map +1 -1
  376. package/esm/dev-server/loader/version-registry.mjs +1 -1
  377. package/esm/dev-server/loader/version-registry.mjs.map +1 -1
  378. package/esm/dev-server/manifest-manager.d.mts +1 -1
  379. package/esm/dev-server/manifest-manager.d.mts.map +1 -1
  380. package/esm/dev-server/manifest-manager.mjs +1 -1
  381. package/esm/dev-server/manifest-manager.mjs.map +1 -1
  382. package/esm/dev-server/module-loader.mjs +1 -1
  383. package/esm/dev-server/module-loader.mjs.map +1 -1
  384. package/esm/dev-server/package-json-manager.mjs +1 -1
  385. package/esm/dev-server/package-json-manager.mjs.map +1 -1
  386. package/esm/dev-server/parse-imports.mjs +1 -1
  387. package/esm/dev-server/parse-imports.mjs.map +1 -1
  388. package/esm/dev-server/read-config-ast.mjs +1 -1
  389. package/esm/dev-server/read-config-ast.mjs.map +1 -1
  390. package/esm/dev-server/ready-block.mjs +1 -1
  391. package/esm/dev-server/ready-block.mjs.map +1 -1
  392. package/esm/dev-server/register-dev-shortcuts.mjs +1 -1
  393. package/esm/dev-server/register-dev-shortcuts.mjs.map +1 -1
  394. package/esm/dev-server/restart-dev-server.mjs +1 -1
  395. package/esm/dev-server/restart-dev-server.mjs.map +1 -1
  396. package/esm/dev-server/run-typings-generation.mjs +1 -1
  397. package/esm/dev-server/run-typings-generation.mjs.map +1 -1
  398. package/esm/dev-server/shortcuts.mjs +1 -1
  399. package/esm/dev-server/shortcuts.mjs.map +1 -1
  400. package/esm/dev-server/special-files-collector.d.mts +1 -1
  401. package/esm/dev-server/special-files-collector.d.mts.map +1 -1
  402. package/esm/dev-server/special-files-collector.mjs +1 -1
  403. package/esm/dev-server/special-files-collector.mjs.map +1 -1
  404. package/esm/dev-server/start-development-server.mjs +1 -1
  405. package/esm/dev-server/start-development-server.mjs.map +1 -1
  406. package/esm/dev-server/supervisor.mjs +10 -7
  407. package/esm/dev-server/supervisor.mjs.map +1 -1
  408. package/esm/dev-server/tsconfig-manager.mjs +1 -1
  409. package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
  410. package/esm/dev-server/type-generator.mjs +1 -1
  411. package/esm/dev-server/type-generator.mjs.map +1 -1
  412. package/esm/dev-server/types.d.mts +1 -1
  413. package/esm/dev-server/types.d.mts.map +1 -1
  414. package/esm/dev-server/update-check-cache.mjs +1 -1
  415. package/esm/dev-server/update-check-cache.mjs.map +1 -1
  416. package/esm/dev-server/utils.mjs +1 -1
  417. package/esm/dev-server/utils.mjs.map +1 -1
  418. package/esm/encryption/encrypt.d.mts +1 -1
  419. package/esm/encryption/encrypt.d.mts.map +1 -1
  420. package/esm/encryption/encrypt.mjs +1 -1
  421. package/esm/encryption/encrypt.mjs.map +1 -1
  422. package/esm/encryption/hash.d.mts +1 -1
  423. package/esm/encryption/hash.d.mts.map +1 -1
  424. package/esm/encryption/hash.mjs +1 -1
  425. package/esm/encryption/hash.mjs.map +1 -1
  426. package/esm/encryption/password.d.mts +1 -1
  427. package/esm/encryption/password.d.mts.map +1 -1
  428. package/esm/encryption/password.mjs +1 -1
  429. package/esm/encryption/password.mjs.map +1 -1
  430. package/esm/encryption/types.d.mts +1 -1
  431. package/esm/encryption/types.d.mts.map +1 -1
  432. package/esm/generations/add-command.action.mjs +12 -5
  433. package/esm/generations/add-command.action.mjs.map +1 -1
  434. package/esm/generations/features/access.feature.mjs +3 -2
  435. package/esm/generations/features/access.feature.mjs.map +1 -1
  436. package/esm/generations/features/ai-anthropic.feature.mjs +4 -2
  437. package/esm/generations/features/ai-anthropic.feature.mjs.map +1 -1
  438. package/esm/generations/features/ai-bedrock.feature.mjs +4 -2
  439. package/esm/generations/features/ai-bedrock.feature.mjs.map +1 -1
  440. package/esm/generations/features/ai-google.feature.mjs +4 -2
  441. package/esm/generations/features/ai-google.feature.mjs.map +1 -1
  442. package/esm/generations/features/ai-ollama.feature.mjs +4 -2
  443. package/esm/generations/features/ai-ollama.feature.mjs.map +1 -1
  444. package/esm/generations/features/ai-openai.feature.mjs +4 -2
  445. package/esm/generations/features/ai-openai.feature.mjs.map +1 -1
  446. package/esm/generations/features/ai-panoptic.feature.mjs +3 -2
  447. package/esm/generations/features/ai-panoptic.feature.mjs.map +1 -1
  448. package/esm/generations/features/ai-tools.feature.mjs +3 -2
  449. package/esm/generations/features/ai-tools.feature.mjs.map +1 -1
  450. package/esm/generations/features/ai-workspace.feature.mjs +3 -2
  451. package/esm/generations/features/ai-workspace.feature.mjs.map +1 -1
  452. package/esm/generations/features/ai.feature.mjs +3 -2
  453. package/esm/generations/features/ai.feature.mjs.map +1 -1
  454. package/esm/generations/features/herald.feature.mjs +3 -2
  455. package/esm/generations/features/herald.feature.mjs.map +1 -1
  456. package/esm/generations/features/image.feature.mjs +1 -1
  457. package/esm/generations/features/image.feature.mjs.map +1 -1
  458. package/esm/generations/features/index.mjs +1 -1
  459. package/esm/generations/features/index.mjs.map +1 -1
  460. package/esm/generations/features/mail.feature.mjs +1 -1
  461. package/esm/generations/features/mail.feature.mjs.map +1 -1
  462. package/esm/generations/features/mongodb.feature.mjs +1 -1
  463. package/esm/generations/features/mongodb.feature.mjs.map +1 -1
  464. package/esm/generations/features/mysql.feature.mjs +1 -1
  465. package/esm/generations/features/mysql.feature.mjs.map +1 -1
  466. package/esm/generations/features/notifications.feature.mjs +4 -3
  467. package/esm/generations/features/notifications.feature.mjs.map +1 -1
  468. package/esm/generations/features/postgres.feature.mjs +1 -1
  469. package/esm/generations/features/postgres.feature.mjs.map +1 -1
  470. package/esm/generations/features/react-email.feature.mjs +1 -1
  471. package/esm/generations/features/react-email.feature.mjs.map +1 -1
  472. package/esm/generations/features/react.feature.mjs +1 -1
  473. package/esm/generations/features/react.feature.mjs.map +1 -1
  474. package/esm/generations/features/redis.feature.mjs +1 -1
  475. package/esm/generations/features/redis.feature.mjs.map +1 -1
  476. package/esm/generations/features/s3.feature.mjs +1 -1
  477. package/esm/generations/features/s3.feature.mjs.map +1 -1
  478. package/esm/generations/features/scheduler.feature.mjs +4 -2
  479. package/esm/generations/features/scheduler.feature.mjs.map +1 -1
  480. package/esm/generations/features/ses.feature.mjs +1 -1
  481. package/esm/generations/features/ses.feature.mjs.map +1 -1
  482. package/esm/generations/features/shadcn.feature.mjs +1 -1
  483. package/esm/generations/features/shadcn.feature.mjs.map +1 -1
  484. package/esm/generations/features/shared/link-ai-package-import.mjs +1 -1
  485. package/esm/generations/features/shared/link-ai-package-import.mjs.map +1 -1
  486. package/esm/generations/features/shared/migration-timestamp.mjs +1 -1
  487. package/esm/generations/features/shared/migration-timestamp.mjs.map +1 -1
  488. package/esm/generations/features/socket.feature.mjs +1 -1
  489. package/esm/generations/features/socket.feature.mjs.map +1 -1
  490. package/esm/generations/features/tailwind.feature.mjs +1 -1
  491. package/esm/generations/features/tailwind.feature.mjs.map +1 -1
  492. package/esm/generations/features/test.feature.mjs +1 -1
  493. package/esm/generations/features/test.feature.mjs.map +1 -1
  494. package/esm/generations/features/types.mjs +14 -0
  495. package/esm/generations/features/types.mjs.map +1 -0
  496. package/esm/generations/features/web.feature.mjs +11 -3
  497. package/esm/generations/features/web.feature.mjs.map +1 -1
  498. package/esm/generations/stubs.mjs +170 -29
  499. package/esm/generations/stubs.mjs.map +1 -1
  500. package/esm/http/boot-port-preflight.d.mts +46 -0
  501. package/esm/http/boot-port-preflight.d.mts.map +1 -0
  502. package/esm/http/boot-port-preflight.mjs +87 -0
  503. package/esm/http/boot-port-preflight.mjs.map +1 -0
  504. package/esm/http/build-cors-options.mjs +1 -1
  505. package/esm/http/build-cors-options.mjs.map +1 -1
  506. package/esm/http/config.d.mts +1 -1
  507. package/esm/http/config.d.mts.map +1 -1
  508. package/esm/http/config.mjs +1 -1
  509. package/esm/http/config.mjs.map +1 -1
  510. package/esm/http/context/request-context.d.mts +1 -1
  511. package/esm/http/context/request-context.d.mts.map +1 -1
  512. package/esm/http/context/request-context.mjs +1 -1
  513. package/esm/http/context/request-context.mjs.map +1 -1
  514. package/esm/http/context/request-memo.d.mts +1 -1
  515. package/esm/http/context/request-memo.d.mts.map +1 -1
  516. package/esm/http/context/request-memo.mjs +1 -1
  517. package/esm/http/context/request-memo.mjs.map +1 -1
  518. package/esm/http/createHttpApplication.d.mts +1 -1
  519. package/esm/http/createHttpApplication.d.mts.map +1 -1
  520. package/esm/http/createHttpApplication.mjs +1 -1
  521. package/esm/http/createHttpApplication.mjs.map +1 -1
  522. package/esm/http/database/RequestLog.d.mts +1 -1
  523. package/esm/http/database/RequestLog.d.mts.map +1 -1
  524. package/esm/http/database/RequestLog.mjs +1 -1
  525. package/esm/http/database/RequestLog.mjs.map +1 -1
  526. package/esm/http/error-codes.d.mts +1 -1
  527. package/esm/http/error-codes.d.mts.map +1 -1
  528. package/esm/http/error-codes.mjs +1 -1
  529. package/esm/http/error-codes.mjs.map +1 -1
  530. package/esm/http/errors/errors.d.mts +1 -1
  531. package/esm/http/errors/errors.d.mts.map +1 -1
  532. package/esm/http/errors/errors.mjs +1 -1
  533. package/esm/http/errors/errors.mjs.map +1 -1
  534. package/esm/http/events.d.mts +1 -1
  535. package/esm/http/events.d.mts.map +1 -1
  536. package/esm/http/events.mjs +1 -1
  537. package/esm/http/events.mjs.map +1 -1
  538. package/esm/http/health.d.mts +1 -1
  539. package/esm/http/health.d.mts.map +1 -1
  540. package/esm/http/health.mjs +1 -1
  541. package/esm/http/health.mjs.map +1 -1
  542. package/esm/http/index.d.mts +1 -0
  543. package/esm/http/index.mjs +1 -0
  544. package/esm/http/middleware/cache-response-middleware.d.mts +1 -1
  545. package/esm/http/middleware/cache-response-middleware.d.mts.map +1 -1
  546. package/esm/http/middleware/cache-response-middleware.mjs +1 -1
  547. package/esm/http/middleware/cache-response-middleware.mjs.map +1 -1
  548. package/esm/http/middleware/concurrency-limit.middleware.d.mts +1 -1
  549. package/esm/http/middleware/concurrency-limit.middleware.d.mts.map +1 -1
  550. package/esm/http/middleware/concurrency-limit.middleware.mjs +1 -1
  551. package/esm/http/middleware/concurrency-limit.middleware.mjs.map +1 -1
  552. package/esm/http/middleware/idempotency.middleware.d.mts +1 -1
  553. package/esm/http/middleware/idempotency.middleware.d.mts.map +1 -1
  554. package/esm/http/middleware/idempotency.middleware.mjs +1 -1
  555. package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
  556. package/esm/http/middleware/inject-request-context.d.mts +1 -1
  557. package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
  558. package/esm/http/middleware/inject-request-context.mjs +1 -1
  559. package/esm/http/middleware/inject-request-context.mjs.map +1 -1
  560. package/esm/http/middleware/ip-filter.middleware.d.mts +2 -2
  561. package/esm/http/middleware/ip-filter.middleware.d.mts.map +1 -1
  562. package/esm/http/middleware/ip-filter.middleware.mjs +2 -2
  563. package/esm/http/middleware/ip-filter.middleware.mjs.map +1 -1
  564. package/esm/http/middleware/maintenance.middleware.d.mts +1 -1
  565. package/esm/http/middleware/maintenance.middleware.d.mts.map +1 -1
  566. package/esm/http/middleware/maintenance.middleware.mjs +1 -1
  567. package/esm/http/middleware/maintenance.middleware.mjs.map +1 -1
  568. package/esm/http/middleware/max-body-size.middleware.d.mts +1 -1
  569. package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
  570. package/esm/http/middleware/max-body-size.middleware.mjs +1 -1
  571. package/esm/http/middleware/max-body-size.middleware.mjs.map +1 -1
  572. package/esm/http/middleware/middleware-list.d.mts +1 -1
  573. package/esm/http/middleware/middleware-list.d.mts.map +1 -1
  574. package/esm/http/middleware/middleware-list.mjs +1 -1
  575. package/esm/http/middleware/middleware-list.mjs.map +1 -1
  576. package/esm/http/middleware/rate-limit.middleware.d.mts +1 -1
  577. package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
  578. package/esm/http/middleware/rate-limit.middleware.mjs +1 -1
  579. package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
  580. package/esm/http/middleware/utils/cidr-match.d.mts +1 -1
  581. package/esm/http/middleware/utils/cidr-match.d.mts.map +1 -1
  582. package/esm/http/middleware/utils/cidr-match.mjs +1 -1
  583. package/esm/http/middleware/utils/cidr-match.mjs.map +1 -1
  584. package/esm/http/middleware/utils/idempotency-key.d.mts +1 -1
  585. package/esm/http/middleware/utils/idempotency-key.d.mts.map +1 -1
  586. package/esm/http/middleware/utils/idempotency-key.mjs +1 -1
  587. package/esm/http/middleware/utils/idempotency-key.mjs.map +1 -1
  588. package/esm/http/middleware/utils/parse-size.d.mts +1 -1
  589. package/esm/http/middleware/utils/parse-size.d.mts.map +1 -1
  590. package/esm/http/middleware/utils/parse-size.mjs +1 -1
  591. package/esm/http/middleware/utils/parse-size.mjs.map +1 -1
  592. package/esm/http/plugins.d.mts +1 -1
  593. package/esm/http/plugins.d.mts.map +1 -1
  594. package/esm/http/plugins.mjs +1 -1
  595. package/esm/http/plugins.mjs.map +1 -1
  596. package/esm/http/port-preflight.d.mts +9 -1
  597. package/esm/http/port-preflight.d.mts.map +1 -1
  598. package/esm/http/port-preflight.mjs +9 -2
  599. package/esm/http/port-preflight.mjs.map +1 -1
  600. package/esm/http/ready-report.d.mts +1 -1
  601. package/esm/http/ready-report.d.mts.map +1 -1
  602. package/esm/http/ready-report.mjs +1 -1
  603. package/esm/http/ready-report.mjs.map +1 -1
  604. package/esm/http/request-controller.d.mts +1 -1
  605. package/esm/http/request-controller.d.mts.map +1 -1
  606. package/esm/http/request-controller.mjs +1 -1
  607. package/esm/http/request-controller.mjs.map +1 -1
  608. package/esm/http/request.d.mts +15 -3
  609. package/esm/http/request.d.mts.map +1 -1
  610. package/esm/http/request.mjs +17 -3
  611. package/esm/http/request.mjs.map +1 -1
  612. package/esm/http/response.d.mts +4 -4
  613. package/esm/http/response.d.mts.map +1 -1
  614. package/esm/http/response.mjs +1 -1
  615. package/esm/http/response.mjs.map +1 -1
  616. package/esm/http/server.d.mts +1 -1
  617. package/esm/http/server.d.mts.map +1 -1
  618. package/esm/http/server.mjs +27 -3
  619. package/esm/http/server.mjs.map +1 -1
  620. package/esm/http/types.d.mts +2 -4
  621. package/esm/http/types.d.mts.map +1 -1
  622. package/esm/http/uploaded-file.d.mts +1 -1
  623. package/esm/http/uploaded-file.d.mts.map +1 -1
  624. package/esm/http/uploaded-file.mjs +1 -1
  625. package/esm/http/uploaded-file.mjs.map +1 -1
  626. package/esm/http/uploads-config.d.mts +1 -1
  627. package/esm/http/uploads-config.d.mts.map +1 -1
  628. package/esm/http/uploads-config.mjs +1 -1
  629. package/esm/http/uploads-config.mjs.map +1 -1
  630. package/esm/http/uploads-types.d.mts +1 -1
  631. package/esm/http/uploads-types.d.mts.map +1 -1
  632. package/esm/image/image.d.mts +1 -1
  633. package/esm/image/image.d.mts.map +1 -1
  634. package/esm/image/image.mjs +1 -1
  635. package/esm/image/image.mjs.map +1 -1
  636. package/esm/index.d.mts +6 -1
  637. package/esm/index.mjs +6 -1
  638. package/esm/logger/fatal-visibility.d.mts +25 -0
  639. package/esm/logger/fatal-visibility.d.mts.map +1 -0
  640. package/esm/logger/fatal-visibility.mjs +31 -0
  641. package/esm/logger/fatal-visibility.mjs.map +1 -0
  642. package/esm/logger/index.d.mts +1 -0
  643. package/esm/logger/index.mjs +1 -0
  644. package/esm/logger/logger.d.mts +1 -1
  645. package/esm/logger/logger.d.mts.map +1 -1
  646. package/esm/logger/logger.mjs +1 -1
  647. package/esm/logger/logger.mjs.map +1 -1
  648. package/esm/logger/types.d.mts +1 -1
  649. package/esm/logger/types.d.mts.map +1 -1
  650. package/esm/mail/config.d.mts +1 -1
  651. package/esm/mail/config.d.mts.map +1 -1
  652. package/esm/mail/config.mjs +1 -1
  653. package/esm/mail/config.mjs.map +1 -1
  654. package/esm/mail/events.d.mts +1 -1
  655. package/esm/mail/events.d.mts.map +1 -1
  656. package/esm/mail/events.mjs +1 -1
  657. package/esm/mail/events.mjs.map +1 -1
  658. package/esm/mail/mail.d.mts +1 -1
  659. package/esm/mail/mail.d.mts.map +1 -1
  660. package/esm/mail/mail.mjs +1 -1
  661. package/esm/mail/mail.mjs.map +1 -1
  662. package/esm/mail/mailer-pool.d.mts +1 -1
  663. package/esm/mail/mailer-pool.d.mts.map +1 -1
  664. package/esm/mail/mailer-pool.mjs +3 -1
  665. package/esm/mail/mailer-pool.mjs.map +1 -1
  666. package/esm/mail/react-mail.d.mts +1 -1
  667. package/esm/mail/react-mail.d.mts.map +1 -1
  668. package/esm/mail/react-mail.mjs +1 -1
  669. package/esm/mail/react-mail.mjs.map +1 -1
  670. package/esm/mail/send-mail.d.mts +1 -1
  671. package/esm/mail/send-mail.d.mts.map +1 -1
  672. package/esm/mail/send-mail.mjs +1 -1
  673. package/esm/mail/send-mail.mjs.map +1 -1
  674. package/esm/mail/test-mailbox.d.mts +1 -1
  675. package/esm/mail/test-mailbox.d.mts.map +1 -1
  676. package/esm/mail/test-mailbox.mjs +1 -1
  677. package/esm/mail/test-mailbox.mjs.map +1 -1
  678. package/esm/mail/types.d.mts +1 -1
  679. package/esm/mail/types.d.mts.map +1 -1
  680. package/esm/mail/types.mjs +1 -1
  681. package/esm/mail/types.mjs.map +1 -1
  682. package/esm/manifest/manifest-manager.mjs +1 -1
  683. package/esm/manifest/manifest-manager.mjs.map +1 -1
  684. package/esm/production/assert-dist-ready-to-start.mjs +24 -0
  685. package/esm/production/assert-dist-ready-to-start.mjs.map +1 -0
  686. package/esm/production/assert-generated-imports.mjs +1 -1
  687. package/esm/production/assert-generated-imports.mjs.map +1 -1
  688. package/esm/production/build-app-production.mjs +1 -1
  689. package/esm/production/build-app-production.mjs.map +1 -1
  690. package/esm/production/build-contributions.mjs +1 -1
  691. package/esm/production/build-contributions.mjs.map +1 -1
  692. package/esm/production/dist-build-manifest.mjs +47 -0
  693. package/esm/production/dist-build-manifest.mjs.map +1 -0
  694. package/esm/production/esbuild-plugins.mjs +1 -1
  695. package/esm/production/esbuild-plugins.mjs.map +1 -1
  696. package/esm/production/production-builder.mjs +69 -14
  697. package/esm/production/production-builder.mjs.map +1 -1
  698. package/esm/production/production-supervisor.mjs +22 -10
  699. package/esm/production/production-supervisor.mjs.map +1 -1
  700. package/esm/production/promote-dist.mjs +115 -0
  701. package/esm/production/promote-dist.mjs.map +1 -0
  702. package/esm/production/resolve-build-config.d.mts +1 -1
  703. package/esm/production/resolve-build-config.d.mts.map +1 -1
  704. package/esm/production/resolve-build-config.mjs +1 -1
  705. package/esm/production/resolve-build-config.mjs.map +1 -1
  706. package/esm/react/index.d.mts +1 -1
  707. package/esm/react/index.d.mts.map +1 -1
  708. package/esm/react/index.mjs +1 -1
  709. package/esm/react/index.mjs.map +1 -1
  710. package/esm/repositories/adapters/cascade/cascade-adapter.d.mts +1 -1
  711. package/esm/repositories/adapters/cascade/cascade-adapter.d.mts.map +1 -1
  712. package/esm/repositories/adapters/cascade/cascade-adapter.mjs +1 -1
  713. package/esm/repositories/adapters/cascade/cascade-adapter.mjs.map +1 -1
  714. package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts +1 -1
  715. package/esm/repositories/adapters/cascade/cascade-query-builder.d.mts.map +1 -1
  716. package/esm/repositories/adapters/cascade/cascade-query-builder.mjs +1 -1
  717. package/esm/repositories/adapters/cascade/cascade-query-builder.mjs.map +1 -1
  718. package/esm/repositories/adapters/cascade/filter-applicator.mjs +1 -1
  719. package/esm/repositories/adapters/cascade/filter-applicator.mjs.map +1 -1
  720. package/esm/repositories/contracts/query-builder.contract.d.mts +1 -1
  721. package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
  722. package/esm/repositories/contracts/repository-adapter.contract.d.mts +1 -1
  723. package/esm/repositories/contracts/repository-adapter.contract.d.mts.map +1 -1
  724. package/esm/repositories/contracts/types.d.mts +1 -1
  725. package/esm/repositories/contracts/types.d.mts.map +1 -1
  726. package/esm/repositories/repository.manager.d.mts +1 -1
  727. package/esm/repositories/repository.manager.d.mts.map +1 -1
  728. package/esm/repositories/repository.manager.mjs +1 -1
  729. package/esm/repositories/repository.manager.mjs.map +1 -1
  730. package/esm/resource/define-resource.d.mts +1 -1
  731. package/esm/resource/define-resource.d.mts.map +1 -1
  732. package/esm/resource/define-resource.mjs +1 -1
  733. package/esm/resource/define-resource.mjs.map +1 -1
  734. package/esm/resource/register-resource.d.mts +1 -1
  735. package/esm/resource/register-resource.d.mts.map +1 -1
  736. package/esm/resource/register-resource.mjs +1 -1
  737. package/esm/resource/register-resource.mjs.map +1 -1
  738. package/esm/resource/resource-field-builder.d.mts +1 -1
  739. package/esm/resource/resource-field-builder.d.mts.map +1 -1
  740. package/esm/resource/resource-field-builder.mjs +1 -1
  741. package/esm/resource/resource-field-builder.mjs.map +1 -1
  742. package/esm/resource/resource.d.mts +1 -1
  743. package/esm/resource/resource.d.mts.map +1 -1
  744. package/esm/resource/resource.mjs +1 -1
  745. package/esm/resource/resource.mjs.map +1 -1
  746. package/esm/resource/types.d.mts +1 -1
  747. package/esm/resource/types.d.mts.map +1 -1
  748. package/esm/restful/restful.d.mts +1 -1
  749. package/esm/restful/restful.d.mts.map +1 -1
  750. package/esm/restful/restful.mjs +1 -1
  751. package/esm/restful/restful.mjs.map +1 -1
  752. package/esm/router/describe-route-for-log.mjs +1 -1
  753. package/esm/router/describe-route-for-log.mjs.map +1 -1
  754. package/esm/router/index.d.mts +3 -0
  755. package/esm/router/index.mjs +3 -0
  756. package/esm/router/log-request-lifecycle.mjs +1 -1
  757. package/esm/router/log-request-lifecycle.mjs.map +1 -1
  758. package/esm/router/normalize-request-path.d.mts +14 -0
  759. package/esm/router/normalize-request-path.d.mts.map +1 -0
  760. package/esm/router/normalize-request-path.mjs +18 -0
  761. package/esm/router/normalize-request-path.mjs.map +1 -0
  762. package/esm/router/normalize-route-path.d.mts +28 -0
  763. package/esm/router/normalize-route-path.d.mts.map +1 -0
  764. package/esm/router/normalize-route-path.mjs +33 -0
  765. package/esm/router/normalize-route-path.mjs.map +1 -0
  766. package/esm/router/positional-handler-diagnostics.d.mts +1 -1
  767. package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
  768. package/esm/router/positional-handler-diagnostics.mjs +1 -1
  769. package/esm/router/positional-handler-diagnostics.mjs.map +1 -1
  770. package/esm/router/route-builder.d.mts +1 -1
  771. package/esm/router/route-builder.d.mts.map +1 -1
  772. package/esm/router/route-builder.mjs +1 -1
  773. package/esm/router/route-builder.mjs.map +1 -1
  774. package/esm/router/route-name-method-suffix.d.mts +33 -0
  775. package/esm/router/route-name-method-suffix.d.mts.map +1 -0
  776. package/esm/router/route-name-method-suffix.mjs +39 -0
  777. package/esm/router/route-name-method-suffix.mjs.map +1 -0
  778. package/esm/router/route-registry.d.mts +1 -1
  779. package/esm/router/route-registry.d.mts.map +1 -1
  780. package/esm/router/route-registry.mjs +4 -3
  781. package/esm/router/route-registry.mjs.map +1 -1
  782. package/esm/router/router.d.mts +15 -1
  783. package/esm/router/router.d.mts.map +1 -1
  784. package/esm/router/router.mjs +51 -12
  785. package/esm/router/router.mjs.map +1 -1
  786. package/esm/router/types.d.mts +1 -1
  787. package/esm/router/types.d.mts.map +1 -1
  788. package/esm/socket/types.d.mts +1 -1
  789. package/esm/socket/types.d.mts.map +1 -1
  790. package/esm/socket/utils.d.mts +1 -1
  791. package/esm/socket/utils.d.mts.map +1 -1
  792. package/esm/socket/utils.mjs +1 -1
  793. package/esm/socket/utils.mjs.map +1 -1
  794. package/esm/storage/config.d.mts +1 -1
  795. package/esm/storage/config.d.mts.map +1 -1
  796. package/esm/storage/config.mjs +1 -1
  797. package/esm/storage/config.mjs.map +1 -1
  798. package/esm/storage/context/storage-driver-context.d.mts +1 -1
  799. package/esm/storage/context/storage-driver-context.d.mts.map +1 -1
  800. package/esm/storage/context/storage-driver-context.mjs +1 -1
  801. package/esm/storage/context/storage-driver-context.mjs.map +1 -1
  802. package/esm/storage/drivers/cloud-driver.d.mts +1 -1
  803. package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
  804. package/esm/storage/drivers/cloud-driver.mjs +1 -1
  805. package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
  806. package/esm/storage/drivers/do-spaces-driver.d.mts +1 -1
  807. package/esm/storage/drivers/do-spaces-driver.d.mts.map +1 -1
  808. package/esm/storage/drivers/do-spaces-driver.mjs +1 -1
  809. package/esm/storage/drivers/do-spaces-driver.mjs.map +1 -1
  810. package/esm/storage/drivers/local-driver.d.mts +1 -1
  811. package/esm/storage/drivers/local-driver.d.mts.map +1 -1
  812. package/esm/storage/drivers/local-driver.mjs +1 -1
  813. package/esm/storage/drivers/local-driver.mjs.map +1 -1
  814. package/esm/storage/drivers/r2-driver.d.mts +1 -1
  815. package/esm/storage/drivers/r2-driver.d.mts.map +1 -1
  816. package/esm/storage/drivers/r2-driver.mjs +1 -1
  817. package/esm/storage/drivers/r2-driver.mjs.map +1 -1
  818. package/esm/storage/drivers/s3-driver.d.mts +1 -1
  819. package/esm/storage/drivers/s3-driver.d.mts.map +1 -1
  820. package/esm/storage/drivers/s3-driver.mjs +1 -1
  821. package/esm/storage/drivers/s3-driver.mjs.map +1 -1
  822. package/esm/storage/scoped-storage.d.mts +1 -1
  823. package/esm/storage/scoped-storage.d.mts.map +1 -1
  824. package/esm/storage/scoped-storage.mjs +1 -1
  825. package/esm/storage/scoped-storage.mjs.map +1 -1
  826. package/esm/storage/storage-file.d.mts +1 -1
  827. package/esm/storage/storage-file.d.mts.map +1 -1
  828. package/esm/storage/storage-file.mjs +1 -1
  829. package/esm/storage/storage-file.mjs.map +1 -1
  830. package/esm/storage/storage.d.mts +1 -1
  831. package/esm/storage/storage.d.mts.map +1 -1
  832. package/esm/storage/storage.mjs +1 -1
  833. package/esm/storage/storage.mjs.map +1 -1
  834. package/esm/storage/types.d.mts +15 -1
  835. package/esm/storage/types.d.mts.map +1 -1
  836. package/esm/storage/utils/contain-path.d.mts +1 -1
  837. package/esm/storage/utils/contain-path.d.mts.map +1 -1
  838. package/esm/storage/utils/contain-path.mjs +1 -1
  839. package/esm/storage/utils/contain-path.mjs.map +1 -1
  840. package/esm/storage/utils/mime.d.mts +1 -1
  841. package/esm/storage/utils/mime.d.mts.map +1 -1
  842. package/esm/storage/utils/mime.mjs +1 -1
  843. package/esm/storage/utils/mime.mjs.map +1 -1
  844. package/esm/storage/utils/safe-fetch.d.mts +1 -1
  845. package/esm/storage/utils/safe-fetch.d.mts.map +1 -1
  846. package/esm/storage/utils/safe-fetch.mjs +1 -1
  847. package/esm/storage/utils/safe-fetch.mjs.map +1 -1
  848. package/esm/storage/utils/storage-error.d.mts +1 -1
  849. package/esm/storage/utils/storage-error.d.mts.map +1 -1
  850. package/esm/storage/utils/storage-error.mjs +1 -1
  851. package/esm/storage/utils/storage-error.mjs.map +1 -1
  852. package/esm/tests/start-http-development-server.d.mts +1 -1
  853. package/esm/tests/start-http-development-server.d.mts.map +1 -1
  854. package/esm/tests/start-http-development-server.mjs +3 -2
  855. package/esm/tests/start-http-development-server.mjs.map +1 -1
  856. package/esm/tests/test-connectors-selection.d.mts +1 -1
  857. package/esm/tests/test-connectors-selection.d.mts.map +1 -1
  858. package/esm/tests/test-connectors-selection.mjs +1 -1
  859. package/esm/tests/test-connectors-selection.mjs.map +1 -1
  860. package/esm/tests/test-helpers.d.mts +1 -1
  861. package/esm/tests/test-helpers.d.mts.map +1 -1
  862. package/esm/tests/test-helpers.mjs +1 -1
  863. package/esm/tests/test-helpers.mjs.map +1 -1
  864. package/esm/tests/test-lifecycle-state.mjs +1 -1
  865. package/esm/tests/test-lifecycle-state.mjs.map +1 -1
  866. package/esm/tests/test-server-port-channel.mjs +1 -1
  867. package/esm/tests/test-server-port-channel.mjs.map +1 -1
  868. package/esm/tests/test-setup-timeout.mjs +1 -1
  869. package/esm/tests/test-setup-timeout.mjs.map +1 -1
  870. package/esm/tests/vitest-setup.d.mts +1 -1
  871. package/esm/tests/vitest-setup.d.mts.map +1 -1
  872. package/esm/tests/vitest-setup.mjs +1 -1
  873. package/esm/tests/vitest-setup.mjs.map +1 -1
  874. package/esm/updater/package-manager.mjs +1 -1
  875. package/esm/updater/package-manager.mjs.map +1 -1
  876. package/esm/updater/update-warlock-packages.mjs +1 -1
  877. package/esm/updater/update-warlock-packages.mjs.map +1 -1
  878. package/esm/use-cases/types.d.mts +1 -1
  879. package/esm/use-cases/types.d.mts.map +1 -1
  880. package/esm/use-cases/use-case-broadcast.d.mts +1 -1
  881. package/esm/use-cases/use-case-broadcast.d.mts.map +1 -1
  882. package/esm/use-cases/use-case-broadcast.mjs +1 -1
  883. package/esm/use-cases/use-case-broadcast.mjs.map +1 -1
  884. package/esm/use-cases/use-case-events.d.mts +1 -1
  885. package/esm/use-cases/use-case-events.d.mts.map +1 -1
  886. package/esm/use-cases/use-case-events.mjs +1 -1
  887. package/esm/use-cases/use-case-events.mjs.map +1 -1
  888. package/esm/use-cases/use-case-pipeline.d.mts +1 -1
  889. package/esm/use-cases/use-case-pipeline.d.mts.map +1 -1
  890. package/esm/use-cases/use-case-pipeline.mjs +1 -1
  891. package/esm/use-cases/use-case-pipeline.mjs.map +1 -1
  892. package/esm/use-cases/use-case.d.mts +1 -1
  893. package/esm/use-cases/use-case.d.mts.map +1 -1
  894. package/esm/use-cases/use-case.errors.d.mts +1 -1
  895. package/esm/use-cases/use-case.errors.d.mts.map +1 -1
  896. package/esm/use-cases/use-case.errors.mjs +1 -1
  897. package/esm/use-cases/use-case.errors.mjs.map +1 -1
  898. package/esm/use-cases/use-case.mjs +1 -1
  899. package/esm/use-cases/use-case.mjs.map +1 -1
  900. package/esm/use-cases/use-cases-registry.d.mts +1 -1
  901. package/esm/use-cases/use-cases-registry.d.mts.map +1 -1
  902. package/esm/use-cases/use-cases-registry.mjs +1 -1
  903. package/esm/use-cases/use-cases-registry.mjs.map +1 -1
  904. package/esm/utils/app-log.d.mts +1 -1
  905. package/esm/utils/app-log.d.mts.map +1 -1
  906. package/esm/utils/app-log.mjs +1 -1
  907. package/esm/utils/app-log.mjs.map +1 -1
  908. package/esm/utils/database-log.d.mts +1 -1
  909. package/esm/utils/database-log.d.mts.map +1 -1
  910. package/esm/utils/database-log.mjs +1 -1
  911. package/esm/utils/database-log.mjs.map +1 -1
  912. package/esm/utils/environment.d.mts +1 -1
  913. package/esm/utils/environment.d.mts.map +1 -1
  914. package/esm/utils/environment.mjs +1 -1
  915. package/esm/utils/environment.mjs.map +1 -1
  916. package/esm/utils/framework-vesion.mjs +1 -1
  917. package/esm/utils/framework-vesion.mjs.map +1 -1
  918. package/esm/utils/get-localized.d.mts +1 -1
  919. package/esm/utils/get-localized.d.mts.map +1 -1
  920. package/esm/utils/get-localized.mjs +1 -1
  921. package/esm/utils/get-localized.mjs.map +1 -1
  922. package/esm/utils/load-environment.mjs +1 -1
  923. package/esm/utils/load-environment.mjs.map +1 -1
  924. package/esm/utils/normalized-path.d.mts +1 -1
  925. package/esm/utils/normalized-path.d.mts.map +1 -1
  926. package/esm/utils/normalized-path.mjs +1 -1
  927. package/esm/utils/normalized-path.mjs.map +1 -1
  928. package/esm/utils/npm-registry.d.mts +1 -1
  929. package/esm/utils/npm-registry.d.mts.map +1 -1
  930. package/esm/utils/npm-registry.mjs +1 -1
  931. package/esm/utils/npm-registry.mjs.map +1 -1
  932. package/esm/utils/paths.d.mts +1 -1
  933. package/esm/utils/paths.d.mts.map +1 -1
  934. package/esm/utils/paths.mjs +1 -1
  935. package/esm/utils/paths.mjs.map +1 -1
  936. package/esm/utils/promise-all-object.d.mts +1 -1
  937. package/esm/utils/promise-all-object.d.mts.map +1 -1
  938. package/esm/utils/promise-all-object.mjs +1 -1
  939. package/esm/utils/promise-all-object.mjs.map +1 -1
  940. package/esm/utils/queue.d.mts +1 -1
  941. package/esm/utils/queue.d.mts.map +1 -1
  942. package/esm/utils/queue.mjs +1 -1
  943. package/esm/utils/queue.mjs.map +1 -1
  944. package/esm/utils/sleep.d.mts +1 -1
  945. package/esm/utils/sleep.d.mts.map +1 -1
  946. package/esm/utils/sleep.mjs +1 -1
  947. package/esm/utils/sleep.mjs.map +1 -1
  948. package/esm/utils/sluggable.d.mts +1 -1
  949. package/esm/utils/sluggable.d.mts.map +1 -1
  950. package/esm/utils/sluggable.mjs +1 -1
  951. package/esm/utils/sluggable.mjs.map +1 -1
  952. package/esm/utils/to-json.d.mts +1 -1
  953. package/esm/utils/to-json.d.mts.map +1 -1
  954. package/esm/utils/to-json.mjs +1 -1
  955. package/esm/utils/to-json.mjs.map +1 -1
  956. package/esm/utils/types.d.mts +1 -1
  957. package/esm/utils/types.d.mts.map +1 -1
  958. package/esm/utils/urls.d.mts +1 -1
  959. package/esm/utils/urls.d.mts.map +1 -1
  960. package/esm/utils/urls.mjs +1 -1
  961. package/esm/utils/urls.mjs.map +1 -1
  962. package/esm/utils/version-compare.d.mts +1 -1
  963. package/esm/utils/version-compare.d.mts.map +1 -1
  964. package/esm/utils/version-compare.mjs +1 -1
  965. package/esm/utils/version-compare.mjs.map +1 -1
  966. package/esm/validation/database/exists-except-current-id.d.mts +1 -1
  967. package/esm/validation/database/exists-except-current-id.d.mts.map +1 -1
  968. package/esm/validation/database/exists-except-current-id.mjs +1 -1
  969. package/esm/validation/database/exists-except-current-id.mjs.map +1 -1
  970. package/esm/validation/database/exists-except-current-user.d.mts +1 -1
  971. package/esm/validation/database/exists-except-current-user.d.mts.map +1 -1
  972. package/esm/validation/database/exists-except-current-user.mjs +1 -1
  973. package/esm/validation/database/exists-except-current-user.mjs.map +1 -1
  974. package/esm/validation/database/types.d.mts +1 -1
  975. package/esm/validation/database/types.d.mts.map +1 -1
  976. package/esm/validation/database/unique-except-current-id.d.mts +1 -1
  977. package/esm/validation/database/unique-except-current-id.d.mts.map +1 -1
  978. package/esm/validation/database/unique-except-current-id.mjs +1 -1
  979. package/esm/validation/database/unique-except-current-id.mjs.map +1 -1
  980. package/esm/validation/database/unique-except-current-user.d.mts +1 -1
  981. package/esm/validation/database/unique-except-current-user.d.mts.map +1 -1
  982. package/esm/validation/database/unique-except-current-user.mjs +1 -1
  983. package/esm/validation/database/unique-except-current-user.mjs.map +1 -1
  984. package/esm/validation/file/file.d.mts +1 -1
  985. package/esm/validation/file/file.d.mts.map +1 -1
  986. package/esm/validation/file/file.mjs +1 -1
  987. package/esm/validation/file/file.mjs.map +1 -1
  988. package/esm/validation/init.mjs +1 -1
  989. package/esm/validation/init.mjs.map +1 -1
  990. package/esm/validation/plugins/database-plugin.mjs +1 -1
  991. package/esm/validation/plugins/database-plugin.mjs.map +1 -1
  992. package/esm/validation/plugins/file-plugin.mjs +1 -1
  993. package/esm/validation/plugins/file-plugin.mjs.map +1 -1
  994. package/esm/validation/plugins/localized-plugin.mjs +1 -1
  995. package/esm/validation/plugins/localized-plugin.mjs.map +1 -1
  996. package/esm/validation/types.d.mts +1 -1
  997. package/esm/validation/types.d.mts.map +1 -1
  998. package/esm/validation/validateAll.mjs +1 -1
  999. package/esm/validation/validateAll.mjs.map +1 -1
  1000. package/esm/validation/validators/file-validator.d.mts +1 -1
  1001. package/esm/validation/validators/file-validator.d.mts.map +1 -1
  1002. package/esm/validation/validators/file-validator.mjs +1 -1
  1003. package/esm/validation/validators/file-validator.mjs.map +1 -1
  1004. package/esm/vite/lower-stage3-decorators.d.mts +1 -1
  1005. package/esm/vite/lower-stage3-decorators.d.mts.map +1 -1
  1006. package/esm/vite/lower-stage3-decorators.mjs +1 -1
  1007. package/esm/vite/lower-stage3-decorators.mjs.map +1 -1
  1008. package/esm/warlock-config/default-configurations.mjs +1 -1
  1009. package/esm/warlock-config/default-configurations.mjs.map +1 -1
  1010. package/esm/warlock-config/define-config.d.mts +1 -1
  1011. package/esm/warlock-config/define-config.d.mts.map +1 -1
  1012. package/esm/warlock-config/define-config.mjs +1 -1
  1013. package/esm/warlock-config/define-config.mjs.map +1 -1
  1014. package/esm/warlock-config/normalize-build-config.mjs +1 -1
  1015. package/esm/warlock-config/normalize-build-config.mjs.map +1 -1
  1016. package/esm/warlock-config/types.d.mts +1 -1
  1017. package/esm/warlock-config/types.d.mts.map +1 -1
  1018. package/esm/warlock-config/warlock-config.manager.d.mts +1 -1
  1019. package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
  1020. package/esm/warlock-config/warlock-config.manager.mjs +1 -1
  1021. package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
  1022. package/llms-full.txt +205 -90
  1023. package/llms.txt +5 -5
  1024. package/package.json +12 -12
  1025. package/skills/add-connector/SKILL.md +35 -28
  1026. package/skills/create-controller/SKILL.md +1 -1
  1027. package/skills/create-module/SKILL.md +12 -12
  1028. package/skills/hash-password/SKILL.md +4 -4
  1029. package/skills/run-app/SKILL.md +77 -16
  1030. package/skills/send-mail/SKILL.md +2 -2
  1031. package/skills/use-middleware/SKILL.md +13 -4
  1032. package/skills/use-model-transformers/SKILL.md +2 -2
  1033. package/skills/use-repository/SKILL.md +1 -1
  1034. package/skills/validate-input/SKILL.md +1 -1
  1035. package/skills/warlock-conventions/SKILL.md +1 -1
  1036. package/skills/warlock-doctor/SKILL.md +3 -3
  1037. package/skills/warlock-routes/SKILL.md +47 -9
  1038. package/skills/write-cli-command/SKILL.md +1 -1
  1039. package/skills/write-seeder/SKILL.md +8 -8
@@ -0,0 +1,84 @@
1
+ import { matchesDerivedRouteName } from "../../../router/route-name-method-suffix.mjs";
2
+
3
+ //#region core/src/cli/commands/routes/diff-page-routes.ts
4
+ /**
5
+ * The comparison half of `warlock routes:diff`, kept free of the filesystem,
6
+ * the boot and the console so it can be exercised directly.
7
+ *
8
+ * WHAT THE TWO SIDES ACTUALLY ARE
9
+ *
10
+ * `expected` comes from `page-routes.manifest.json`, which `warlock build`
11
+ * writes from a pure FILESYSTEM SCAN of the page graph. No application module
12
+ * is imported, no connector boots, no route is registered.
13
+ *
14
+ * `live` comes from the running router, after real registration.
15
+ *
16
+ * Every difference between the two that is NOT drift has to be removed on the
17
+ * producing side, so this comparison can stay a strict string equality — see
18
+ * `normalizeRoutePath` for the path half. Exactly one property survives that
19
+ * rule and is handled here instead, because it is genuinely unknowable at
20
+ * build time: the route-name method suffix (below).
21
+ */
22
+ /** Stable ordering for printed output: by path, then by name. */
23
+ function comparePageRoutes(left, right) {
24
+ return left.path.localeCompare(right.path) || left.name.localeCompare(right.name);
25
+ }
26
+ /**
27
+ * Whether a live route is the same route the build recorded.
28
+ *
29
+ * Method and path must match EXACTLY. The name is compared derived-to-derived:
30
+ * the router appends `.<method>` to a name already claimed by a route of
31
+ * another method (`Router.add`), and which routes get that suffix depends on
32
+ * the registration order across the whole route set — pages and API routes
33
+ * alike. `warlock build` never boots connectors, so the manifest cannot see the
34
+ * API routes that cause the collision and can never record the suffix.
35
+ *
36
+ * Ignoring it here is therefore not leniency, it is reading the manifest for
37
+ * what it is: a record of what each page's name was DERIVED as, not of what it
38
+ * was REGISTERED as. `matchesDerivedRouteName` accepts only the one suffix the
39
+ * router itself could have appended; any other name difference is still drift.
40
+ *
41
+ * THE LIMIT THIS BUYS: a clean diff does not prove that no page name collided
42
+ * at registration. Use `warlock routes` to see the names as registered.
43
+ */
44
+ function isSameRoute(expected, live) {
45
+ return live.method === expected.method && live.path === expected.path && matchesDerivedRouteName(expected.name, live.name, live.method);
46
+ }
47
+ /**
48
+ * Diff the build-time page route surface against the live one.
49
+ *
50
+ * Neither input is mutated and neither has to be pre-sorted; the returned lists
51
+ * are sorted for printing.
52
+ */
53
+ function diffPageRoutes(expected, live) {
54
+ const remainingExpected = new Set(expected);
55
+ const remainingLive = new Set(live);
56
+ const changes = [];
57
+ for (const before of expected) {
58
+ const after = [...remainingLive].find((candidate) => isSameRoute(before, candidate));
59
+ if (after) {
60
+ remainingExpected.delete(before);
61
+ remainingLive.delete(after);
62
+ }
63
+ }
64
+ for (const before of remainingExpected) {
65
+ const after = [...remainingLive].find((candidate) => candidate.source !== "" && candidate.source === before.source);
66
+ if (after && !isSameRoute(before, after)) {
67
+ changes.push({
68
+ before,
69
+ after
70
+ });
71
+ remainingExpected.delete(before);
72
+ remainingLive.delete(after);
73
+ }
74
+ }
75
+ return {
76
+ changes: changes.sort((left, right) => comparePageRoutes(left.before, right.before)),
77
+ removed: [...remainingExpected].sort(comparePageRoutes),
78
+ added: [...remainingLive].sort(comparePageRoutes)
79
+ };
80
+ }
81
+
82
+ //#endregion
83
+ export { comparePageRoutes, diffPageRoutes };
84
+ //# sourceMappingURL=diff-page-routes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-page-routes.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/routes/diff-page-routes.ts"],"sourcesContent":["/**\n * The comparison half of `warlock routes:diff`, kept free of the filesystem,\n * the boot and the console so it can be exercised directly.\n *\n * WHAT THE TWO SIDES ACTUALLY ARE\n *\n * `expected` comes from `page-routes.manifest.json`, which `warlock build`\n * writes from a pure FILESYSTEM SCAN of the page graph. No application module\n * is imported, no connector boots, no route is registered.\n *\n * `live` comes from the running router, after real registration.\n *\n * Every difference between the two that is NOT drift has to be removed on the\n * producing side, so this comparison can stay a strict string equality — see\n * `normalizeRoutePath` for the path half. Exactly one property survives that\n * rule and is handled here instead, because it is genuinely unknowable at\n * build time: the route-name method suffix (below).\n */\nimport { matchesDerivedRouteName } from \"../../../router/route-name-method-suffix\";\n\nexport type PageRoute = {\n method: \"GET\";\n path: string;\n name: string;\n source: string;\n};\n\nexport type PageRouteChange = {\n before: PageRoute;\n after: PageRoute;\n};\n\nexport type PageRoutesDiff = {\n changes: PageRouteChange[];\n removed: PageRoute[];\n added: PageRoute[];\n};\n\n/** Stable ordering for printed output: by path, then by name. */\nexport function comparePageRoutes(left: PageRoute, right: PageRoute): number {\n return left.path.localeCompare(right.path) || left.name.localeCompare(right.name);\n}\n\n/**\n * Whether a live route is the same route the build recorded.\n *\n * Method and path must match EXACTLY. The name is compared derived-to-derived:\n * the router appends `.<method>` to a name already claimed by a route of\n * another method (`Router.add`), and which routes get that suffix depends on\n * the registration order across the whole route set — pages and API routes\n * alike. `warlock build` never boots connectors, so the manifest cannot see the\n * API routes that cause the collision and can never record the suffix.\n *\n * Ignoring it here is therefore not leniency, it is reading the manifest for\n * what it is: a record of what each page's name was DERIVED as, not of what it\n * was REGISTERED as. `matchesDerivedRouteName` accepts only the one suffix the\n * router itself could have appended; any other name difference is still drift.\n *\n * THE LIMIT THIS BUYS: a clean diff does not prove that no page name collided\n * at registration. Use `warlock routes` to see the names as registered.\n */\nfunction isSameRoute(expected: PageRoute, live: PageRoute): boolean {\n return (\n live.method === expected.method &&\n live.path === expected.path &&\n matchesDerivedRouteName(expected.name, live.name, live.method)\n );\n}\n\n/**\n * Diff the build-time page route surface against the live one.\n *\n * Neither input is mutated and neither has to be pre-sorted; the returned lists\n * are sorted for printing.\n */\nexport function diffPageRoutes(expected: PageRoute[], live: PageRoute[]): PageRoutesDiff {\n const remainingExpected = new Set(expected);\n const remainingLive = new Set(live);\n const changes: PageRouteChange[] = [];\n\n // Route identity is the comparison contract. A differing source is displayed\n // only as context and must not make an otherwise identical route drift (a\n // checkout can be relocated without changing its surface).\n for (const before of expected) {\n const after = [...remainingLive].find((candidate) => isSameRoute(before, candidate));\n\n if (after) {\n remainingExpected.delete(before);\n remainingLive.delete(after);\n }\n }\n\n // A stable source is diagnostic context, never itself a diff. It only groups\n // a changed page into one useful line instead of a removal plus an addition.\n for (const before of remainingExpected) {\n const after = [...remainingLive].find(\n (candidate) => candidate.source !== \"\" && candidate.source === before.source,\n );\n\n if (after && !isSameRoute(before, after)) {\n changes.push({ before, after });\n remainingExpected.delete(before);\n remainingLive.delete(after);\n }\n }\n\n return {\n changes: changes.sort((left, right) => comparePageRoutes(left.before, right.before)),\n removed: [...remainingExpected].sort(comparePageRoutes),\n added: [...remainingLive].sort(comparePageRoutes),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAgB,kBAAkB,MAAiB,OAA0B;CAC3E,OAAO,KAAK,KAAK,cAAc,MAAM,IAAI,KAAK,KAAK,KAAK,cAAc,MAAM,IAAI;AAClF;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,YAAY,UAAqB,MAA0B;CAClE,OACE,KAAK,WAAW,SAAS,UACzB,KAAK,SAAS,SAAS,QACvB,wBAAwB,SAAS,MAAM,KAAK,MAAM,KAAK,MAAM;AAEjE;;;;;;;AAQA,SAAgB,eAAe,UAAuB,MAAmC;CACvF,MAAM,oBAAoB,IAAI,IAAI,QAAQ;CAC1C,MAAM,gBAAgB,IAAI,IAAI,IAAI;CAClC,MAAM,UAA6B,CAAC;CAKpC,KAAK,MAAM,UAAU,UAAU;EAC7B,MAAM,QAAQ,CAAC,GAAG,aAAa,EAAE,MAAM,cAAc,YAAY,QAAQ,SAAS,CAAC;EAEnF,IAAI,OAAO;GACT,kBAAkB,OAAO,MAAM;GAC/B,cAAc,OAAO,KAAK;EAC5B;CACF;CAIA,KAAK,MAAM,UAAU,mBAAmB;EACtC,MAAM,QAAQ,CAAC,GAAG,aAAa,EAAE,MAC9B,cAAc,UAAU,WAAW,MAAM,UAAU,WAAW,OAAO,MACxE;EAEA,IAAI,SAAS,CAAC,YAAY,QAAQ,KAAK,GAAG;GACxC,QAAQ,KAAK;IAAE;IAAQ;GAAM,CAAC;GAC9B,kBAAkB,OAAO,MAAM;GAC/B,cAAc,OAAO,KAAK;EAC5B;CACF;CAEA,OAAO;EACL,SAAS,QAAQ,MAAM,MAAM,UAAU,kBAAkB,KAAK,QAAQ,MAAM,MAAM,CAAC;EACnF,SAAS,CAAC,GAAG,iBAAiB,EAAE,KAAK,iBAAiB;EACtD,OAAO,CAAC,GAAG,aAAa,EAAE,KAAK,iBAAiB;CAClD;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { methodRank } from "./route-row.mjs";
2
2
  import { colors } from "@mongez/copper";
3
3
 
4
- //#region ../core/src/cli/commands/routes/format-routes-table.ts
4
+ //#region core/src/cli/commands/routes/format-routes-table.ts
5
5
  /** The columns rendered, in order, with their header labels. */
6
6
  const COLUMNS = [
7
7
  {
@@ -1 +1 @@
1
- {"version":3,"file":"format-routes-table.mjs","names":[],"sources":["../../../../../../../../../core/src/cli/commands/routes/format-routes-table.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { methodRank, type RouteRow } from \"./route-row\";\n\n/** The columns rendered, in order, with their header labels. */\nconst COLUMNS = [\n { key: \"method\", header: \"METHOD\" },\n { key: \"path\", header: \"PATH\" },\n { key: \"name\", header: \"NAME\" },\n { key: \"action\", header: \"ACTION\" },\n { key: \"middleware\", header: \"MW\" },\n { key: \"source\", header: \"SOURCE\" },\n] as const;\n\ntype ColumnKey = (typeof COLUMNS)[number][\"key\"];\n\n/** Two spaces between columns. */\nconst GAP = \" \";\n\n/** Shown for an empty string cell so the column doesn't read as a gap. */\nconst EMPTY_CELL = \"—\";\n\n/**\n * The plain (uncolored) text of one cell. Numbers render as-is; an empty string\n * renders as {@link EMPTY_CELL}. This is the single source of truth for both\n * the width math and the rendered text, so colored and uncolored output stay\n * aligned.\n *\n * @param row - The row\n * @param key - The column key\n * @returns The cell's printable text\n */\nfunction cellText(row: RouteRow, key: ColumnKey): string {\n if (key === \"middleware\") return String(row.middleware);\n\n const value = row[key] as string;\n\n return value.length > 0 ? value : EMPTY_CELL;\n}\n\n/**\n * Per-column display width: the longest of the header and every cell.\n *\n * @param rows - The rows to measure\n * @returns One width per column, in column order\n */\nfunction columnWidths(rows: RouteRow[]): number[] {\n return COLUMNS.map((column) =>\n Math.max(column.header.length, ...rows.map((row) => cellText(row, column.key).length)),\n );\n}\n\n/**\n * Build a one-line, human-readable summary: the total plus a per-method\n * breakdown ordered by {@link methodRank}, e.g.\n * `42 routes (38 GET · 2 POST · 1 PUT · 1 DELETE)`.\n *\n * @param rows - The rows being summarized\n * @returns The summary line\n */\nexport function routesSummary(rows: RouteRow[]): string {\n const noun = rows.length === 1 ? \"route\" : \"routes\";\n\n if (rows.length === 0) return `0 ${noun}`;\n\n const counts = new Map<string, number>();\n\n for (const row of rows) {\n counts.set(row.method, (counts.get(row.method) ?? 0) + 1);\n }\n\n const breakdown = [...counts.entries()]\n .sort(([a], [b]) => methodRank(a) - methodRank(b))\n .map(([method, count]) => `${count} ${method}`)\n .join(\" · \");\n\n return `${rows.length} ${noun} (${breakdown})`;\n}\n\n/**\n * Render the routes table as an ordered list of plain (uncolored) lines:\n * a header row, one row per route, a blank line, then the summary. Returned as\n * strings (not printed) so the layout is unit-testable without ANSI noise.\n *\n * @param rows - The rows to render (already filtered/sorted by the caller)\n * @returns The lines to print, top to bottom\n */\nexport function formatRoutesTableLines(rows: RouteRow[]): string[] {\n if (rows.length === 0) {\n return [\"No routes registered.\"];\n }\n\n const widths = columnWidths(rows);\n\n const renderRow = (cells: string[]) =>\n cells.map((text, index) => text.padEnd(widths[index])).join(GAP).trimEnd();\n\n const lines = [renderRow(COLUMNS.map((column) => column.header))];\n\n for (const row of rows) {\n lines.push(renderRow(COLUMNS.map((column) => cellText(row, column.key))));\n }\n\n lines.push(\"\");\n lines.push(routesSummary(rows));\n\n return lines;\n}\n\n/** Per-verb color for the METHOD column. Unknown verbs fall back to white. */\nconst METHOD_COLOR: Record<string, (input: string) => string> = {\n GET: colors.green,\n POST: colors.blue,\n PUT: colors.yellow,\n PATCH: colors.yellow,\n DELETE: colors.red,\n OPTIONS: colors.gray,\n HEAD: colors.gray,\n ALL: colors.magenta,\n};\n\n/**\n * Colorize the method label, then right-pad with plain spaces so column\n * alignment is computed from the visible width, not the ANSI-coded length.\n *\n * @param method - The uppercased HTTP verb\n * @param width - The METHOD column width\n * @returns The colored, padded cell\n */\nfunction colorizeMethodCell(method: string, width: number): string {\n const colorize = METHOD_COLOR[method] ?? colors.white;\n\n return colorize(method) + \" \".repeat(Math.max(0, width - method.length));\n}\n\n/**\n * Print the routes table to stdout with a bold header, verb-colored METHOD\n * column, and a dimmed summary. The empty case prints a single yellow notice\n * (a booted app with zero routes usually means a route module failed to load).\n *\n * Thin presentation wrapper over {@link formatRoutesTableLines} /\n * {@link routesSummary} — those stay the source of truth for layout.\n *\n * @param rows - The rows to print (already filtered/sorted by the caller)\n */\nexport function printRoutesTable(rows: RouteRow[]): void {\n if (rows.length === 0) {\n console.log(colors.yellow(\"No routes registered — did a route module fail to load?\"));\n return;\n }\n\n const widths = columnWidths(rows);\n\n const headerLine = COLUMNS.map((column, index) => column.header.padEnd(widths[index]))\n .join(GAP)\n .trimEnd();\n\n console.log(colors.bold(headerLine));\n\n for (const row of rows) {\n const cells = COLUMNS.map((column, index) => {\n if (column.key === \"method\") {\n return colorizeMethodCell(row.method, widths[index]);\n }\n\n return cellText(row, column.key).padEnd(widths[index]);\n });\n\n console.log(cells.join(GAP).trimEnd());\n }\n\n console.log(\"\");\n console.log(colors.gray(routesSummary(rows)));\n}\n"],"mappings":";;;;;AAIA,MAAM,UAAU;CACd;EAAE,KAAK;EAAU,QAAQ;CAAS;CAClC;EAAE,KAAK;EAAQ,QAAQ;CAAO;CAC9B;EAAE,KAAK;EAAQ,QAAQ;CAAO;CAC9B;EAAE,KAAK;EAAU,QAAQ;CAAS;CAClC;EAAE,KAAK;EAAc,QAAQ;CAAK;CAClC;EAAE,KAAK;EAAU,QAAQ;CAAS;AACpC;;AAKA,MAAM,MAAM;;AAGZ,MAAM,aAAa;;;;;;;;;;;AAYnB,SAAS,SAAS,KAAe,KAAwB;CACvD,IAAI,QAAQ,cAAc,OAAO,OAAO,IAAI,UAAU;CAEtD,MAAM,QAAQ,IAAI;CAElB,OAAO,MAAM,SAAS,IAAI,QAAQ;AACpC;;;;;;;AAQA,SAAS,aAAa,MAA4B;CAChD,OAAO,QAAQ,KAAK,WAClB,KAAK,IAAI,OAAO,OAAO,QAAQ,GAAG,KAAK,KAAK,QAAQ,SAAS,KAAK,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,CACvF;AACF;;;;;;;;;AAUA,SAAgB,cAAc,MAA0B;CACtD,MAAM,OAAO,KAAK,WAAW,IAAI,UAAU;CAE3C,IAAI,KAAK,WAAW,GAAG,OAAO,KAAK;CAEnC,MAAM,yBAAS,IAAI,IAAoB;CAEvC,KAAK,MAAM,OAAO,MAChB,OAAO,IAAI,IAAI,SAAS,OAAO,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC;CAG1D,MAAM,YAAY,CAAC,GAAG,OAAO,QAAQ,CAAC,CAAC,CACpC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CACjD,KAAK,CAAC,QAAQ,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC,CAC9C,KAAK,KAAK;CAEb,OAAO,GAAG,KAAK,OAAO,GAAG,KAAK,IAAI,UAAU;AAC9C;;AAiCA,MAAM,eAA0D;CAC9D,KAAK,OAAO;CACZ,MAAM,OAAO;CACb,KAAK,OAAO;CACZ,OAAO,OAAO;CACd,QAAQ,OAAO;CACf,SAAS,OAAO;CAChB,MAAM,OAAO;CACb,KAAK,OAAO;AACd;;;;;;;;;AAUA,SAAS,mBAAmB,QAAgB,OAAuB;CAGjE,QAFiB,aAAa,WAAW,OAAO,MAEjC,CAAC,MAAM,IAAI,IAAI,OAAO,KAAK,IAAI,GAAG,QAAQ,OAAO,MAAM,CAAC;AACzE;;;;;;;;;;;AAYA,SAAgB,iBAAiB,MAAwB;CACvD,IAAI,KAAK,WAAW,GAAG;EACrB,QAAQ,IAAI,OAAO,OAAO,yDAAyD,CAAC;EACpF;CACF;CAEA,MAAM,SAAS,aAAa,IAAI;CAEhC,MAAM,aAAa,QAAQ,KAAK,QAAQ,UAAU,OAAO,OAAO,OAAO,OAAO,MAAM,CAAC,CAAC,CACnF,KAAK,GAAG,CAAC,CACT,QAAQ;CAEX,QAAQ,IAAI,OAAO,KAAK,UAAU,CAAC;CAEnC,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,QAAQ,KAAK,QAAQ,UAAU;GAC3C,IAAI,OAAO,QAAQ,UACjB,OAAO,mBAAmB,IAAI,QAAQ,OAAO,MAAM;GAGrD,OAAO,SAAS,KAAK,OAAO,GAAG,CAAC,CAAC,OAAO,OAAO,MAAM;EACvD,CAAC;EAED,QAAQ,IAAI,MAAM,KAAK,GAAG,CAAC,CAAC,QAAQ,CAAC;CACvC;CAEA,QAAQ,IAAI,EAAE;CACd,QAAQ,IAAI,OAAO,KAAK,cAAc,IAAI,CAAC,CAAC;AAC9C"}
1
+ {"version":3,"file":"format-routes-table.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/routes/format-routes-table.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport { methodRank, type RouteRow } from \"./route-row\";\n\n/** The columns rendered, in order, with their header labels. */\nconst COLUMNS = [\n { key: \"method\", header: \"METHOD\" },\n { key: \"path\", header: \"PATH\" },\n { key: \"name\", header: \"NAME\" },\n { key: \"action\", header: \"ACTION\" },\n { key: \"middleware\", header: \"MW\" },\n { key: \"source\", header: \"SOURCE\" },\n] as const;\n\ntype ColumnKey = (typeof COLUMNS)[number][\"key\"];\n\n/** Two spaces between columns. */\nconst GAP = \" \";\n\n/** Shown for an empty string cell so the column doesn't read as a gap. */\nconst EMPTY_CELL = \"—\";\n\n/**\n * The plain (uncolored) text of one cell. Numbers render as-is; an empty string\n * renders as {@link EMPTY_CELL}. This is the single source of truth for both\n * the width math and the rendered text, so colored and uncolored output stay\n * aligned.\n *\n * @param row - The row\n * @param key - The column key\n * @returns The cell's printable text\n */\nfunction cellText(row: RouteRow, key: ColumnKey): string {\n if (key === \"middleware\") return String(row.middleware);\n\n const value = row[key] as string;\n\n return value.length > 0 ? value : EMPTY_CELL;\n}\n\n/**\n * Per-column display width: the longest of the header and every cell.\n *\n * @param rows - The rows to measure\n * @returns One width per column, in column order\n */\nfunction columnWidths(rows: RouteRow[]): number[] {\n return COLUMNS.map((column) =>\n Math.max(column.header.length, ...rows.map((row) => cellText(row, column.key).length)),\n );\n}\n\n/**\n * Build a one-line, human-readable summary: the total plus a per-method\n * breakdown ordered by {@link methodRank}, e.g.\n * `42 routes (38 GET · 2 POST · 1 PUT · 1 DELETE)`.\n *\n * @param rows - The rows being summarized\n * @returns The summary line\n */\nexport function routesSummary(rows: RouteRow[]): string {\n const noun = rows.length === 1 ? \"route\" : \"routes\";\n\n if (rows.length === 0) return `0 ${noun}`;\n\n const counts = new Map<string, number>();\n\n for (const row of rows) {\n counts.set(row.method, (counts.get(row.method) ?? 0) + 1);\n }\n\n const breakdown = [...counts.entries()]\n .sort(([a], [b]) => methodRank(a) - methodRank(b))\n .map(([method, count]) => `${count} ${method}`)\n .join(\" · \");\n\n return `${rows.length} ${noun} (${breakdown})`;\n}\n\n/**\n * Render the routes table as an ordered list of plain (uncolored) lines:\n * a header row, one row per route, a blank line, then the summary. Returned as\n * strings (not printed) so the layout is unit-testable without ANSI noise.\n *\n * @param rows - The rows to render (already filtered/sorted by the caller)\n * @returns The lines to print, top to bottom\n */\nexport function formatRoutesTableLines(rows: RouteRow[]): string[] {\n if (rows.length === 0) {\n return [\"No routes registered.\"];\n }\n\n const widths = columnWidths(rows);\n\n const renderRow = (cells: string[]) =>\n cells.map((text, index) => text.padEnd(widths[index])).join(GAP).trimEnd();\n\n const lines = [renderRow(COLUMNS.map((column) => column.header))];\n\n for (const row of rows) {\n lines.push(renderRow(COLUMNS.map((column) => cellText(row, column.key))));\n }\n\n lines.push(\"\");\n lines.push(routesSummary(rows));\n\n return lines;\n}\n\n/** Per-verb color for the METHOD column. Unknown verbs fall back to white. */\nconst METHOD_COLOR: Record<string, (input: string) => string> = {\n GET: colors.green,\n POST: colors.blue,\n PUT: colors.yellow,\n PATCH: colors.yellow,\n DELETE: colors.red,\n OPTIONS: colors.gray,\n HEAD: colors.gray,\n ALL: colors.magenta,\n};\n\n/**\n * Colorize the method label, then right-pad with plain spaces so column\n * alignment is computed from the visible width, not the ANSI-coded length.\n *\n * @param method - The uppercased HTTP verb\n * @param width - The METHOD column width\n * @returns The colored, padded cell\n */\nfunction colorizeMethodCell(method: string, width: number): string {\n const colorize = METHOD_COLOR[method] ?? colors.white;\n\n return colorize(method) + \" \".repeat(Math.max(0, width - method.length));\n}\n\n/**\n * Print the routes table to stdout with a bold header, verb-colored METHOD\n * column, and a dimmed summary. The empty case prints a single yellow notice\n * (a booted app with zero routes usually means a route module failed to load).\n *\n * Thin presentation wrapper over {@link formatRoutesTableLines} /\n * {@link routesSummary} — those stay the source of truth for layout.\n *\n * @param rows - The rows to print (already filtered/sorted by the caller)\n */\nexport function printRoutesTable(rows: RouteRow[]): void {\n if (rows.length === 0) {\n console.log(colors.yellow(\"No routes registered — did a route module fail to load?\"));\n return;\n }\n\n const widths = columnWidths(rows);\n\n const headerLine = COLUMNS.map((column, index) => column.header.padEnd(widths[index]))\n .join(GAP)\n .trimEnd();\n\n console.log(colors.bold(headerLine));\n\n for (const row of rows) {\n const cells = COLUMNS.map((column, index) => {\n if (column.key === \"method\") {\n return colorizeMethodCell(row.method, widths[index]);\n }\n\n return cellText(row, column.key).padEnd(widths[index]);\n });\n\n console.log(cells.join(GAP).trimEnd());\n }\n\n console.log(\"\");\n console.log(colors.gray(routesSummary(rows)));\n}\n"],"mappings":";;;;;AAIA,MAAM,UAAU;CACd;EAAE,KAAK;EAAU,QAAQ;CAAS;CAClC;EAAE,KAAK;EAAQ,QAAQ;CAAO;CAC9B;EAAE,KAAK;EAAQ,QAAQ;CAAO;CAC9B;EAAE,KAAK;EAAU,QAAQ;CAAS;CAClC;EAAE,KAAK;EAAc,QAAQ;CAAK;CAClC;EAAE,KAAK;EAAU,QAAQ;CAAS;AACpC;;AAKA,MAAM,MAAM;;AAGZ,MAAM,aAAa;;;;;;;;;;;AAYnB,SAAS,SAAS,KAAe,KAAwB;CACvD,IAAI,QAAQ,cAAc,OAAO,OAAO,IAAI,UAAU;CAEtD,MAAM,QAAQ,IAAI;CAElB,OAAO,MAAM,SAAS,IAAI,QAAQ;AACpC;;;;;;;AAQA,SAAS,aAAa,MAA4B;CAChD,OAAO,QAAQ,KAAK,WAClB,KAAK,IAAI,OAAO,OAAO,QAAQ,GAAG,KAAK,KAAK,QAAQ,SAAS,KAAK,OAAO,GAAG,EAAE,MAAM,CAAC,CACvF;AACF;;;;;;;;;AAUA,SAAgB,cAAc,MAA0B;CACtD,MAAM,OAAO,KAAK,WAAW,IAAI,UAAU;CAE3C,IAAI,KAAK,WAAW,GAAG,OAAO,KAAK;CAEnC,MAAM,yBAAS,IAAI,IAAoB;CAEvC,KAAK,MAAM,OAAO,MAChB,OAAO,IAAI,IAAI,SAAS,OAAO,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC;CAG1D,MAAM,YAAY,CAAC,GAAG,OAAO,QAAQ,CAAC,EACnC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,IAAI,WAAW,CAAC,CAAC,EAChD,KAAK,CAAC,QAAQ,WAAW,GAAG,MAAM,GAAG,QAAQ,EAC7C,KAAK,KAAK;CAEb,OAAO,GAAG,KAAK,OAAO,GAAG,KAAK,IAAI,UAAU;AAC9C;;AAiCA,MAAM,eAA0D;CAC9D,KAAK,OAAO;CACZ,MAAM,OAAO;CACb,KAAK,OAAO;CACZ,OAAO,OAAO;CACd,QAAQ,OAAO;CACf,SAAS,OAAO;CAChB,MAAM,OAAO;CACb,KAAK,OAAO;AACd;;;;;;;;;AAUA,SAAS,mBAAmB,QAAgB,OAAuB;CAGjE,QAFiB,aAAa,WAAW,OAAO,OAEhC,MAAM,IAAI,IAAI,OAAO,KAAK,IAAI,GAAG,QAAQ,OAAO,MAAM,CAAC;AACzE;;;;;;;;;;;AAYA,SAAgB,iBAAiB,MAAwB;CACvD,IAAI,KAAK,WAAW,GAAG;EACrB,QAAQ,IAAI,OAAO,OAAO,yDAAyD,CAAC;EACpF;CACF;CAEA,MAAM,SAAS,aAAa,IAAI;CAEhC,MAAM,aAAa,QAAQ,KAAK,QAAQ,UAAU,OAAO,OAAO,OAAO,OAAO,MAAM,CAAC,EAClF,KAAK,GAAG,EACR,QAAQ;CAEX,QAAQ,IAAI,OAAO,KAAK,UAAU,CAAC;CAEnC,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,QAAQ,QAAQ,KAAK,QAAQ,UAAU;GAC3C,IAAI,OAAO,QAAQ,UACjB,OAAO,mBAAmB,IAAI,QAAQ,OAAO,MAAM;GAGrD,OAAO,SAAS,KAAK,OAAO,GAAG,EAAE,OAAO,OAAO,MAAM;EACvD,CAAC;EAED,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE,QAAQ,CAAC;CACvC;CAEA,QAAQ,IAAI,EAAE;CACd,QAAQ,IAAI,OAAO,KAAK,cAAc,IAAI,CAAC,CAAC;AAC9C"}
@@ -1,4 +1,4 @@
1
- //#region ../core/src/cli/commands/routes/route-row.ts
1
+ //#region core/src/cli/commands/routes/route-row.ts
2
2
  /**
3
3
  * Display order of HTTP methods — used to rank rows within a path and to order
4
4
  * the per-method breakdown in the summary line.
@@ -1 +1 @@
1
- {"version":3,"file":"route-row.mjs","names":[],"sources":["../../../../../../../../../core/src/cli/commands/routes/route-row.ts"],"sourcesContent":["import type { Route } from \"../../../router/types\";\n\n/**\n * A single registered route, normalized to the flat, display-ready shape the\n * `warlock routes` table (and its `--json` output) render. Kept separate from\n * the live {@link Route} so the formatter and filters never touch the handler\n * function, validation object, or Fastify server options — only printable\n * scalars.\n */\nexport type RouteRow = {\n /** Uppercased HTTP verb (`\"all\"` → `\"ALL\"`). */\n method: string;\n\n /** Full request path (prefix already folded in by the router). */\n path: string;\n\n /** Route name, or `\"\"` when the route was registered without one. */\n name: string;\n\n /** Handler/controller-action label — the handler function name, or `\"anonymous\"`. */\n action: string;\n\n /** Number of middleware attached to the route. */\n middleware: number;\n\n /** Relative source file the route was registered from, or `\"\"`. */\n source: string;\n};\n\n/** Filters accepted by `warlock routes`, each optional and additive (AND-ed). */\nexport type RouteFilter = {\n /** Exact HTTP method (case-insensitive). */\n method?: string;\n\n /** Case-insensitive substring matched against the path. */\n path?: string;\n\n /** Case-insensitive substring matched against the route name. */\n name?: string;\n};\n\n/**\n * Display order of HTTP methods — used to rank rows within a path and to order\n * the per-method breakdown in the summary line.\n */\nexport const METHOD_ORDER = [\n \"GET\",\n \"POST\",\n \"PUT\",\n \"PATCH\",\n \"DELETE\",\n \"OPTIONS\",\n \"HEAD\",\n \"ALL\",\n];\n\n/**\n * Rank of a method for sorting. Unknown methods sort last (stable among\n * themselves).\n *\n * @param method - Uppercased HTTP verb\n * @returns The sort index\n */\nexport function methodRank(method: string): number {\n const index = METHOD_ORDER.indexOf(method);\n return index === -1 ? METHOD_ORDER.length : index;\n}\n\n/**\n * Derive the handler/controller-action label for a route. Uses the handler\n * function's name, stripping the `bound ` prefix that `Function.prototype.bind`\n * prepends, and falls back to `\"anonymous\"` for an unnamed handler.\n *\n * @param route - The route to label\n * @returns A printable action label\n */\nfunction routeAction(route: Route): string {\n const handler = route.handler as unknown;\n\n if (typeof handler !== \"function\") return \"anonymous\";\n\n const name = handler.name?.replace(/^bound /, \"\").trim();\n\n return name ? name : \"anonymous\";\n}\n\n/**\n * Normalize a live {@link Route} into a printable {@link RouteRow}.\n *\n * @param route - The registered route\n * @returns The display-ready row\n */\nexport function toRouteRow(route: Route): RouteRow {\n return {\n method: route.method.toUpperCase(),\n path: route.path,\n name: route.name ?? \"\",\n action: routeAction(route),\n middleware: route.middleware?.length ?? 0,\n source: route.sourceFile ?? \"\",\n };\n}\n\n/**\n * Apply the `--method` / `--path` / `--name` filters to a set of rows. An\n * omitted filter matches everything; provided filters are AND-ed.\n *\n * @param rows - The rows to filter\n * @param filter - The active filters\n * @returns The matching rows (a new array)\n */\nexport function filterRouteRows(rows: RouteRow[], filter: RouteFilter): RouteRow[] {\n const method = filter.method?.toUpperCase();\n const path = filter.path?.toLowerCase();\n const name = filter.name?.toLowerCase();\n\n return rows.filter((row) => {\n if (method && row.method !== method) return false;\n if (path && !row.path.toLowerCase().includes(path)) return false;\n if (name && !row.name.toLowerCase().includes(name)) return false;\n return true;\n });\n}\n\n/**\n * Sort rows by path (ascending), then by HTTP-method order within a path, so\n * every verb of one resource lists together in a predictable sequence.\n *\n * @param rows - The rows to sort\n * @returns A new, sorted array\n */\nexport function sortRouteRows(rows: RouteRow[]): RouteRow[] {\n return [...rows].sort((a, b) => {\n if (a.path !== b.path) return a.path < b.path ? -1 : 1;\n return methodRank(a.method) - methodRank(b.method);\n });\n}\n"],"mappings":";;;;;AA6CA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;AASA,SAAgB,WAAW,QAAwB;CACjD,MAAM,QAAQ,aAAa,QAAQ,MAAM;CACzC,OAAO,UAAU,KAAK,aAAa,SAAS;AAC9C;;;;;;;;;AAUA,SAAS,YAAY,OAAsB;CACzC,MAAM,UAAU,MAAM;CAEtB,IAAI,OAAO,YAAY,YAAY,OAAO;CAE1C,MAAM,OAAO,QAAQ,MAAM,QAAQ,WAAW,EAAE,CAAC,CAAC,KAAK;CAEvD,OAAO,OAAO,OAAO;AACvB;;;;;;;AAQA,SAAgB,WAAW,OAAwB;CACjD,OAAO;EACL,QAAQ,MAAM,OAAO,YAAY;EACjC,MAAM,MAAM;EACZ,MAAM,MAAM,QAAQ;EACpB,QAAQ,YAAY,KAAK;EACzB,YAAY,MAAM,YAAY,UAAU;EACxC,QAAQ,MAAM,cAAc;CAC9B;AACF;;;;;;;;;AAUA,SAAgB,gBAAgB,MAAkB,QAAiC;CACjF,MAAM,SAAS,OAAO,QAAQ,YAAY;CAC1C,MAAM,OAAO,OAAO,MAAM,YAAY;CACtC,MAAM,OAAO,OAAO,MAAM,YAAY;CAEtC,OAAO,KAAK,QAAQ,QAAQ;EAC1B,IAAI,UAAU,IAAI,WAAW,QAAQ,OAAO;EAC5C,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,SAAS,IAAI,GAAG,OAAO;EAC3D,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,SAAS,IAAI,GAAG,OAAO;EAC3D,OAAO;CACT,CAAC;AACH;;;;;;;;AASA,SAAgB,cAAc,MAA8B;CAC1D,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;EAC9B,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK;EACrD,OAAO,WAAW,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM;CACnD,CAAC;AACH"}
1
+ {"version":3,"file":"route-row.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/routes/route-row.ts"],"sourcesContent":["import type { Route } from \"../../../router/types\";\n\n/**\n * A single registered route, normalized to the flat, display-ready shape the\n * `warlock routes` table (and its `--json` output) render. Kept separate from\n * the live {@link Route} so the formatter and filters never touch the handler\n * function, validation object, or Fastify server options — only printable\n * scalars.\n */\nexport type RouteRow = {\n /** Uppercased HTTP verb (`\"all\"` → `\"ALL\"`). */\n method: string;\n\n /** Full request path (prefix already folded in by the router). */\n path: string;\n\n /** Route name, or `\"\"` when the route was registered without one. */\n name: string;\n\n /** Handler/controller-action label — the handler function name, or `\"anonymous\"`. */\n action: string;\n\n /** Number of middleware attached to the route. */\n middleware: number;\n\n /** Relative source file the route was registered from, or `\"\"`. */\n source: string;\n};\n\n/** Filters accepted by `warlock routes`, each optional and additive (AND-ed). */\nexport type RouteFilter = {\n /** Exact HTTP method (case-insensitive). */\n method?: string;\n\n /** Case-insensitive substring matched against the path. */\n path?: string;\n\n /** Case-insensitive substring matched against the route name. */\n name?: string;\n};\n\n/**\n * Display order of HTTP methods — used to rank rows within a path and to order\n * the per-method breakdown in the summary line.\n */\nexport const METHOD_ORDER = [\n \"GET\",\n \"POST\",\n \"PUT\",\n \"PATCH\",\n \"DELETE\",\n \"OPTIONS\",\n \"HEAD\",\n \"ALL\",\n];\n\n/**\n * Rank of a method for sorting. Unknown methods sort last (stable among\n * themselves).\n *\n * @param method - Uppercased HTTP verb\n * @returns The sort index\n */\nexport function methodRank(method: string): number {\n const index = METHOD_ORDER.indexOf(method);\n return index === -1 ? METHOD_ORDER.length : index;\n}\n\n/**\n * Derive the handler/controller-action label for a route. Uses the handler\n * function's name, stripping the `bound ` prefix that `Function.prototype.bind`\n * prepends, and falls back to `\"anonymous\"` for an unnamed handler.\n *\n * @param route - The route to label\n * @returns A printable action label\n */\nfunction routeAction(route: Route): string {\n const handler = route.handler as unknown;\n\n if (typeof handler !== \"function\") return \"anonymous\";\n\n const name = handler.name?.replace(/^bound /, \"\").trim();\n\n return name ? name : \"anonymous\";\n}\n\n/**\n * Normalize a live {@link Route} into a printable {@link RouteRow}.\n *\n * @param route - The registered route\n * @returns The display-ready row\n */\nexport function toRouteRow(route: Route): RouteRow {\n return {\n method: route.method.toUpperCase(),\n path: route.path,\n name: route.name ?? \"\",\n action: routeAction(route),\n middleware: route.middleware?.length ?? 0,\n source: route.sourceFile ?? \"\",\n };\n}\n\n/**\n * Apply the `--method` / `--path` / `--name` filters to a set of rows. An\n * omitted filter matches everything; provided filters are AND-ed.\n *\n * @param rows - The rows to filter\n * @param filter - The active filters\n * @returns The matching rows (a new array)\n */\nexport function filterRouteRows(rows: RouteRow[], filter: RouteFilter): RouteRow[] {\n const method = filter.method?.toUpperCase();\n const path = filter.path?.toLowerCase();\n const name = filter.name?.toLowerCase();\n\n return rows.filter((row) => {\n if (method && row.method !== method) return false;\n if (path && !row.path.toLowerCase().includes(path)) return false;\n if (name && !row.name.toLowerCase().includes(name)) return false;\n return true;\n });\n}\n\n/**\n * Sort rows by path (ascending), then by HTTP-method order within a path, so\n * every verb of one resource lists together in a predictable sequence.\n *\n * @param rows - The rows to sort\n * @returns A new, sorted array\n */\nexport function sortRouteRows(rows: RouteRow[]): RouteRow[] {\n return [...rows].sort((a, b) => {\n if (a.path !== b.path) return a.path < b.path ? -1 : 1;\n return methodRank(a.method) - methodRank(b.method);\n });\n}\n"],"mappings":";;;;;AA6CA,MAAa,eAAe;CAC1B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;AASA,SAAgB,WAAW,QAAwB;CACjD,MAAM,QAAQ,aAAa,QAAQ,MAAM;CACzC,OAAO,UAAU,KAAK,aAAa,SAAS;AAC9C;;;;;;;;;AAUA,SAAS,YAAY,OAAsB;CACzC,MAAM,UAAU,MAAM;CAEtB,IAAI,OAAO,YAAY,YAAY,OAAO;CAE1C,MAAM,OAAO,QAAQ,MAAM,QAAQ,WAAW,EAAE,EAAE,KAAK;CAEvD,OAAO,OAAO,OAAO;AACvB;;;;;;;AAQA,SAAgB,WAAW,OAAwB;CACjD,OAAO;EACL,QAAQ,MAAM,OAAO,YAAY;EACjC,MAAM,MAAM;EACZ,MAAM,MAAM,QAAQ;EACpB,QAAQ,YAAY,KAAK;EACzB,YAAY,MAAM,YAAY,UAAU;EACxC,QAAQ,MAAM,cAAc;CAC9B;AACF;;;;;;;;;AAUA,SAAgB,gBAAgB,MAAkB,QAAiC;CACjF,MAAM,SAAS,OAAO,QAAQ,YAAY;CAC1C,MAAM,OAAO,OAAO,MAAM,YAAY;CACtC,MAAM,OAAO,OAAO,MAAM,YAAY;CAEtC,OAAO,KAAK,QAAQ,QAAQ;EAC1B,IAAI,UAAU,IAAI,WAAW,QAAQ,OAAO;EAC5C,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,SAAS,IAAI,GAAG,OAAO;EAC3D,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,SAAS,IAAI,GAAG,OAAO;EAC3D,OAAO;CACT,CAAC;AACH;;;;;;;;AASA,SAAgB,cAAc,MAA8B;CAC1D,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,GAAG,MAAM;EAC9B,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK;EACrD,OAAO,WAAW,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM;CACnD,CAAC;AACH"}
@@ -2,7 +2,7 @@ import { router } from "../../../router/router.mjs";
2
2
  import { filterRouteRows, sortRouteRows, toRouteRow } from "./route-row.mjs";
3
3
  import { printRoutesTable } from "./format-routes-table.mjs";
4
4
 
5
- //#region ../core/src/cli/commands/routes/routes-command.action.ts
5
+ //#region core/src/cli/commands/routes/routes-command.action.ts
6
6
  /**
7
7
  * Read the active option as a trimmed string, or `undefined` when it is absent
8
8
  * or not a string (a bare boolean flag).
@@ -1 +1 @@
1
- {"version":3,"file":"routes-command.action.mjs","names":[],"sources":["../../../../../../../../../core/src/cli/commands/routes/routes-command.action.ts"],"sourcesContent":["import { router } from \"../../../router/router\";\r\nimport type { CommandActionData } from \"../../../commands/types\";\r\nimport { printRoutesTable } from \"./format-routes-table\";\r\nimport { filterRouteRows, sortRouteRows, toRouteRow } from \"./route-row\";\r\n\r\n/**\r\n * Read the active option as a trimmed string, or `undefined` when it is absent\r\n * or not a string (a bare boolean flag).\r\n *\r\n * @param value - The parsed option value\r\n * @returns The string value, or `undefined`\r\n */\r\nfunction stringOption(value: string | number | boolean | undefined): string | undefined {\r\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\r\n}\r\n\r\n/**\r\n * Action behind `warlock routes`. Reads the registered routes from the router\r\n * singleton (populated by the `bootstrap` preload, with no connectors started),\r\n * applies the `--method` / `--path` / `--name` filters, sorts them, and either\r\n * prints a verb-colored table or — with `--json` — emits the normalized rows as\r\n * JSON for piping into scripts/CI.\r\n *\r\n * Read-only: it never opens a database/cache/socket connection and never\r\n * mutates the router.\r\n *\r\n * @param data - Parsed CLI args (`options.method` / `path` / `name` / `json`).\r\n */\r\nexport function routesCommandAction({ options }: CommandActionData): void {\r\n const rows = sortRouteRows(\r\n filterRouteRows(router.list().map(toRouteRow), {\r\n method: stringOption(options.method),\r\n path: stringOption(options.path),\r\n name: stringOption(options.name),\r\n }),\r\n );\r\n\r\n if (options.json) {\r\n console.log(JSON.stringify(rows, null, 2));\r\n return;\r\n }\r\n\r\n printRoutesTable(rows);\r\n}\r\n"],"mappings":";;;;;;;;;;;;AAYA,SAAS,aAAa,OAAkE;CACtF,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,CAAC,CAAC,SAAS,IAAI,MAAM,KAAK,IAAI;AAC/E;;;;;;;;;;;;;AAcA,SAAgB,oBAAoB,EAAE,WAAoC;CACxE,MAAM,OAAO,cACX,gBAAgB,OAAO,KAAK,CAAC,CAAC,IAAI,UAAU,GAAG;EAC7C,QAAQ,aAAa,QAAQ,MAAM;EACnC,MAAM,aAAa,QAAQ,IAAI;EAC/B,MAAM,aAAa,QAAQ,IAAI;CACjC,CAAC,CACH;CAEA,IAAI,QAAQ,MAAM;EAChB,QAAQ,IAAI,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;EACzC;CACF;CAEA,iBAAiB,IAAI;AACvB"}
1
+ {"version":3,"file":"routes-command.action.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/routes/routes-command.action.ts"],"sourcesContent":["import { router } from \"../../../router/router\";\r\nimport type { CommandActionData } from \"../../../commands/types\";\r\nimport { printRoutesTable } from \"./format-routes-table\";\r\nimport { filterRouteRows, sortRouteRows, toRouteRow } from \"./route-row\";\r\n\r\n/**\r\n * Read the active option as a trimmed string, or `undefined` when it is absent\r\n * or not a string (a bare boolean flag).\r\n *\r\n * @param value - The parsed option value\r\n * @returns The string value, or `undefined`\r\n */\r\nfunction stringOption(value: string | number | boolean | undefined): string | undefined {\r\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\r\n}\r\n\r\n/**\r\n * Action behind `warlock routes`. Reads the registered routes from the router\r\n * singleton (populated by the `bootstrap` preload, with no connectors started),\r\n * applies the `--method` / `--path` / `--name` filters, sorts them, and either\r\n * prints a verb-colored table or — with `--json` — emits the normalized rows as\r\n * JSON for piping into scripts/CI.\r\n *\r\n * Read-only: it never opens a database/cache/socket connection and never\r\n * mutates the router.\r\n *\r\n * @param data - Parsed CLI args (`options.method` / `path` / `name` / `json`).\r\n */\r\nexport function routesCommandAction({ options }: CommandActionData): void {\r\n const rows = sortRouteRows(\r\n filterRouteRows(router.list().map(toRouteRow), {\r\n method: stringOption(options.method),\r\n path: stringOption(options.path),\r\n name: stringOption(options.name),\r\n }),\r\n );\r\n\r\n if (options.json) {\r\n console.log(JSON.stringify(rows, null, 2));\r\n return;\r\n }\r\n\r\n printRoutesTable(rows);\r\n}\r\n"],"mappings":";;;;;;;;;;;;AAYA,SAAS,aAAa,OAAkE;CACtF,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,SAAS,IAAI,MAAM,KAAK,IAAI;AAC/E;;;;;;;;;;;;;AAcA,SAAgB,oBAAoB,EAAE,WAAoC;CACxE,MAAM,OAAO,cACX,gBAAgB,OAAO,KAAK,EAAE,IAAI,UAAU,GAAG;EAC7C,QAAQ,aAAa,QAAQ,MAAM;EACnC,MAAM,aAAa,QAAQ,IAAI;EAC/B,MAAM,aAAa,QAAQ,IAAI;CACjC,CAAC,CACH;CAEA,IAAI,QAAQ,MAAM;EAChB,QAAQ,IAAI,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;EACzC;CACF;CAEA,iBAAiB,IAAI;AACvB"}
@@ -0,0 +1,84 @@
1
+ import { router } from "../../../router/router.mjs";
2
+ import { resolveBuildConfig } from "../../../production/resolve-build-config.mjs";
3
+ import { bootForDiagnostics } from "../doctor/boot-for-diagnostics.mjs";
4
+ import { comparePageRoutes, diffPageRoutes } from "./diff-page-routes.mjs";
5
+ import path from "node:path";
6
+ import fs from "node:fs";
7
+
8
+ //#region core/src/cli/commands/routes/routes-diff.action.ts
9
+ const SNAPSHOT_FILE = "page-routes.manifest.json";
10
+ /**
11
+ * What a clean `warlock routes:diff` does and does NOT prove, printed on a
12
+ * clean run so the guarantee is stated where it is relied on.
13
+ */
14
+ const CLEAN_RUN_LIMIT = "Note: page names are compared as DERIVED by the build, so a clean diff does not prove that no route name collided at registration (the router appends `.<method>` to a name already claimed by another method). Run `warlock routes` to see the registered names.";
15
+ function routeFromLive(route) {
16
+ return {
17
+ method: route.method.toUpperCase(),
18
+ path: route.path,
19
+ name: route.name ?? "",
20
+ source: route.sourceFile ?? ""
21
+ };
22
+ }
23
+ function snapshotPath() {
24
+ return path.join(resolveBuildConfig().outdir, SNAPSHOT_FILE);
25
+ }
26
+ function readSnapshot(file) {
27
+ let raw;
28
+ try {
29
+ raw = fs.readFileSync(file, "utf-8");
30
+ } catch {
31
+ throw new Error(`Cannot compare page routes: no build snapshot exists at "${file}". Run \`warlock build\` successfully, then run \`warlock routes:diff\` again.`);
32
+ }
33
+ try {
34
+ const parsed = JSON.parse(raw);
35
+ if (typeof parsed !== "object" || parsed === null || parsed.version !== 1 || !Array.isArray(parsed.routes) || !parsed.routes.every((route) => typeof route === "object" && route !== null && route.method === "GET" && typeof route.path === "string" && typeof route.name === "string" && typeof route.source === "string")) throw new Error("invalid shape");
36
+ return parsed;
37
+ } catch {
38
+ throw new Error(`Cannot compare page routes: build snapshot "${file}" is malformed. Run \`warlock build\` successfully to replace it, then retry.`);
39
+ }
40
+ }
41
+ function printRoute(prefix, route) {
42
+ const source = route.source ? ` (${route.source})` : "";
43
+ console.log(`${prefix} GET ${route.path} ${route.name}${source}`);
44
+ }
45
+ /**
46
+ * Compare the last successful production page surface with the live dev
47
+ * surface.
48
+ *
49
+ * The comparison itself lives in `diff-page-routes.ts`, which also documents
50
+ * why the route-name method suffix is the one registration-time difference the
51
+ * build-time manifest cannot record — and therefore what a clean run of this
52
+ * command does not prove.
53
+ */
54
+ async function routesDiffCommandAction() {
55
+ const snapshot = readSnapshot(snapshotPath());
56
+ const context = await bootForDiagnostics();
57
+ if (!context.booted || context.moduleFailures.length > 0 || context.connectors.failures.length > 0 || context.connectors.registrationError !== void 0) {
58
+ const details = [
59
+ ...context.moduleFailures.map(({ file, message }) => `${file}: ${message}`),
60
+ ...context.connectors.failures.map(({ name, message }) => `${name}: ${message}`),
61
+ ...context.connectors.registrationError ? [context.connectors.registrationError] : []
62
+ ];
63
+ throw new Error(`Cannot compare page routes because diagnostic boot failed.${details.length ? `\n${details.join("\n")}` : ""}`);
64
+ }
65
+ const live = router.list().filter((route) => route.isPage).map(routeFromLive).sort(comparePageRoutes);
66
+ const expected = [...snapshot.routes].sort(comparePageRoutes);
67
+ const { changes, removed, added } = diffPageRoutes(expected, live);
68
+ if (changes.length === 0 && removed.length === 0 && added.length === 0) {
69
+ console.log(`Page routes match (${expected.length} routes).`);
70
+ console.log(CLEAN_RUN_LIMIT);
71
+ return;
72
+ }
73
+ for (const { before, after } of changes) {
74
+ printRoute("changed -", before);
75
+ printRoute(" +", after);
76
+ }
77
+ for (const route of removed) printRoute("removed -", route);
78
+ for (const route of added) printRoute("added +", route);
79
+ throw new Error(`Page route drift: ${changes.length} changed, ${removed.length} removed, ${added.length} added. Run \`warlock build\` after reviewing these changes.`);
80
+ }
81
+
82
+ //#endregion
83
+ export { routesDiffCommandAction };
84
+ //# sourceMappingURL=routes-diff.action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes-diff.action.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/routes/routes-diff.action.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { resolveBuildConfig } from \"../../../production/resolve-build-config\";\nimport { router } from \"../../../router/router\";\nimport type { Route } from \"../../../router/types\";\nimport { bootForDiagnostics } from \"../doctor/boot-for-diagnostics\";\nimport { comparePageRoutes, diffPageRoutes, type PageRoute } from \"./diff-page-routes\";\n\ntype PageRoutesSnapshot = {\n version: 1;\n routes: PageRoute[];\n};\n\nconst SNAPSHOT_FILE = \"page-routes.manifest.json\";\n\n/**\n * What a clean `warlock routes:diff` does and does NOT prove, printed on a\n * clean run so the guarantee is stated where it is relied on.\n */\nconst CLEAN_RUN_LIMIT =\n \"Note: page names are compared as DERIVED by the build, so a clean diff does not prove \" +\n \"that no route name collided at registration (the router appends `.<method>` to a name \" +\n \"already claimed by another method). Run `warlock routes` to see the registered names.\";\n\nfunction routeFromLive(route: Route): PageRoute {\n return {\n method: route.method.toUpperCase() as \"GET\",\n path: route.path,\n name: route.name ?? \"\",\n source: route.sourceFile ?? \"\",\n };\n}\n\nfunction snapshotPath(): string {\n return path.join(resolveBuildConfig().outdir, SNAPSHOT_FILE);\n}\n\nfunction readSnapshot(file: string): PageRoutesSnapshot {\n let raw: string;\n\n try {\n raw = fs.readFileSync(file, \"utf-8\");\n } catch {\n throw new Error(\n `Cannot compare page routes: no build snapshot exists at \"${file}\". Run \\`warlock build\\` successfully, then run \\`warlock routes:diff\\` again.`,\n );\n }\n\n try {\n const parsed: unknown = JSON.parse(raw);\n\n if (\n typeof parsed !== \"object\" ||\n parsed === null ||\n (parsed as { version?: unknown }).version !== 1 ||\n !Array.isArray((parsed as { routes?: unknown }).routes) ||\n !(parsed as { routes: unknown[] }).routes.every(\n (route) =>\n typeof route === \"object\" &&\n route !== null &&\n (route as PageRoute).method === \"GET\" &&\n typeof (route as PageRoute).path === \"string\" &&\n typeof (route as PageRoute).name === \"string\" &&\n typeof (route as PageRoute).source === \"string\",\n )\n ) {\n throw new Error(\"invalid shape\");\n }\n\n return parsed as PageRoutesSnapshot;\n } catch {\n throw new Error(\n `Cannot compare page routes: build snapshot \"${file}\" is malformed. Run \\`warlock build\\` successfully to replace it, then retry.`,\n );\n }\n}\n\nfunction printRoute(prefix: string, route: PageRoute): void {\n const source = route.source ? ` (${route.source})` : \"\";\n console.log(`${prefix} GET ${route.path} ${route.name}${source}`);\n}\n\n/**\n * Compare the last successful production page surface with the live dev\n * surface.\n *\n * The comparison itself lives in `diff-page-routes.ts`, which also documents\n * why the route-name method suffix is the one registration-time difference the\n * build-time manifest cannot record — and therefore what a clean run of this\n * command does not prove.\n */\nexport async function routesDiffCommandAction(): Promise<void> {\n const snapshot = readSnapshot(snapshotPath());\n const context = await bootForDiagnostics();\n\n if (\n !context.booted ||\n context.moduleFailures.length > 0 ||\n context.connectors.failures.length > 0 ||\n context.connectors.registrationError !== undefined\n ) {\n const details = [\n ...context.moduleFailures.map(({ file, message }) => `${file}: ${message}`),\n ...context.connectors.failures.map(({ name, message }) => `${name}: ${message}`),\n ...(context.connectors.registrationError ? [context.connectors.registrationError] : []),\n ];\n throw new Error(\n `Cannot compare page routes because diagnostic boot failed.${details.length ? `\\n${details.join(\"\\n\")}` : \"\"}`,\n );\n }\n\n const live = router\n .list()\n .filter((route) => route.isPage)\n .map(routeFromLive)\n .sort(comparePageRoutes);\n const expected = [...snapshot.routes].sort(comparePageRoutes);\n const { changes, removed, added } = diffPageRoutes(expected, live);\n\n if (changes.length === 0 && removed.length === 0 && added.length === 0) {\n console.log(`Page routes match (${expected.length} routes).`);\n console.log(CLEAN_RUN_LIMIT);\n return;\n }\n\n for (const { before, after } of changes) {\n printRoute(\"changed -\", before);\n printRoute(\" +\", after);\n }\n for (const route of removed) printRoute(\"removed -\", route);\n for (const route of added) printRoute(\"added +\", route);\n\n throw new Error(\n `Page route drift: ${changes.length} changed, ${removed.length} removed, ${added.length} added. Run \\`warlock build\\` after reviewing these changes.`,\n );\n}\n"],"mappings":";;;;;;;;AAaA,MAAM,gBAAgB;;;;;AAMtB,MAAM,kBACJ;AAIF,SAAS,cAAc,OAAyB;CAC9C,OAAO;EACL,QAAQ,MAAM,OAAO,YAAY;EACjC,MAAM,MAAM;EACZ,MAAM,MAAM,QAAQ;EACpB,QAAQ,MAAM,cAAc;CAC9B;AACF;AAEA,SAAS,eAAuB;CAC9B,OAAO,KAAK,KAAK,mBAAmB,EAAE,QAAQ,aAAa;AAC7D;AAEA,SAAS,aAAa,MAAkC;CACtD,IAAI;CAEJ,IAAI;EACF,MAAM,GAAG,aAAa,MAAM,OAAO;CACrC,QAAQ;EACN,MAAM,IAAI,MACR,4DAA4D,KAAK,+EACnE;CACF;CAEA,IAAI;EACF,MAAM,SAAkB,KAAK,MAAM,GAAG;EAEtC,IACE,OAAO,WAAW,YAClB,WAAW,QACV,OAAiC,YAAY,KAC9C,CAAC,MAAM,QAAS,OAAgC,MAAM,KACtD,CAAE,OAAiC,OAAO,OACvC,UACC,OAAO,UAAU,YACjB,UAAU,QACT,MAAoB,WAAW,SAChC,OAAQ,MAAoB,SAAS,YACrC,OAAQ,MAAoB,SAAS,YACrC,OAAQ,MAAoB,WAAW,QAC3C,GAEA,MAAM,IAAI,MAAM,eAAe;EAGjC,OAAO;CACT,QAAQ;EACN,MAAM,IAAI,MACR,+CAA+C,KAAK,8EACtD;CACF;AACF;AAEA,SAAS,WAAW,QAAgB,OAAwB;CAC1D,MAAM,SAAS,MAAM,SAAS,KAAK,MAAM,OAAO,KAAK;CACrD,QAAQ,IAAI,GAAG,OAAO,OAAO,MAAM,KAAK,IAAI,MAAM,OAAO,QAAQ;AACnE;;;;;;;;;;AAWA,eAAsB,0BAAyC;CAC7D,MAAM,WAAW,aAAa,aAAa,CAAC;CAC5C,MAAM,UAAU,MAAM,mBAAmB;CAEzC,IACE,CAAC,QAAQ,UACT,QAAQ,eAAe,SAAS,KAChC,QAAQ,WAAW,SAAS,SAAS,KACrC,QAAQ,WAAW,sBAAsB,QACzC;EACA,MAAM,UAAU;GACd,GAAG,QAAQ,eAAe,KAAK,EAAE,MAAM,cAAc,GAAG,KAAK,IAAI,SAAS;GAC1E,GAAG,QAAQ,WAAW,SAAS,KAAK,EAAE,MAAM,cAAc,GAAG,KAAK,IAAI,SAAS;GAC/E,GAAI,QAAQ,WAAW,oBAAoB,CAAC,QAAQ,WAAW,iBAAiB,IAAI,CAAC;EACvF;EACA,MAAM,IAAI,MACR,6DAA6D,QAAQ,SAAS,KAAK,QAAQ,KAAK,IAAI,MAAM,IAC5G;CACF;CAEA,MAAM,OAAO,OACV,KAAK,EACL,QAAQ,UAAU,MAAM,MAAM,EAC9B,IAAI,aAAa,EACjB,KAAK,iBAAiB;CACzB,MAAM,WAAW,CAAC,GAAG,SAAS,MAAM,EAAE,KAAK,iBAAiB;CAC5D,MAAM,EAAE,SAAS,SAAS,UAAU,eAAe,UAAU,IAAI;CAEjE,IAAI,QAAQ,WAAW,KAAK,QAAQ,WAAW,KAAK,MAAM,WAAW,GAAG;EACtE,QAAQ,IAAI,sBAAsB,SAAS,OAAO,UAAU;EAC5D,QAAQ,IAAI,eAAe;EAC3B;CACF;CAEA,KAAK,MAAM,EAAE,QAAQ,WAAW,SAAS;EACvC,WAAW,aAAa,MAAM;EAC9B,WAAW,aAAa,KAAK;CAC/B;CACA,KAAK,MAAM,SAAS,SAAS,WAAW,aAAa,KAAK;CAC1D,KAAK,MAAM,SAAS,OAAO,WAAW,aAAa,KAAK;CAExD,MAAM,IAAI,MACR,qBAAqB,QAAQ,OAAO,YAAY,QAAQ,OAAO,YAAY,MAAM,OAAO,6DAC1F;AACF"}
@@ -1,7 +1,8 @@
1
1
  import { command } from "../../commands/cli-command.mjs";
2
2
  import { routesCommandAction } from "./routes/routes-command.action.mjs";
3
+ import { routesDiffCommandAction } from "./routes/routes-diff.action.mjs";
3
4
 
4
- //#region ../core/src/cli/commands/routes.command.ts
5
+ //#region core/src/cli/commands/routes.command.ts
5
6
  /**
6
7
  * `warlock routes` — list every registered HTTP route as a table (a read-only
7
8
  * sibling of `warlock doctor`). Filter with `--method` / `--path` / `--name`,
@@ -45,7 +46,20 @@ const routesCommand = command({
45
46
  }
46
47
  ]
47
48
  });
49
+ /** Compare live development page routes with the last successful build. */
50
+ const routesDiffCommand = command({
51
+ name: "routes:diff",
52
+ description: "Compare live page routes with the last successful production build",
53
+ action: routesDiffCommandAction,
54
+ preload: {
55
+ runtimeStrategy: "development",
56
+ warlockConfig: true,
57
+ config: true,
58
+ env: true,
59
+ bootstrap: true
60
+ }
61
+ });
48
62
 
49
63
  //#endregion
50
- export { routesCommand };
64
+ export { routesCommand, routesDiffCommand };
51
65
  //# sourceMappingURL=routes.command.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.command.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/routes.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\r\nimport { routesCommandAction } from \"./routes/routes-command.action\";\r\n\r\n/**\r\n * `warlock routes` — list every registered HTTP route as a table (a read-only\r\n * sibling of `warlock doctor`). Filter with `--method` / `--path` / `--name`,\r\n * or emit the normalized rows as JSON with `--json`.\r\n *\r\n * Preload plan: load config + bootstrap app code so route modules register on\r\n * the router singleton, but start NO connectors — listing routes must never\r\n * open a database/cache/socket connection. Because the route-module loader is\r\n * fail-loud, a route file that throws on import surfaces here instead of being\r\n * silently omitted from the table.\r\n */\r\nexport const routesCommand = command({\r\n name: \"routes\",\r\n description:\r\n \"List the registered HTTP routes as a table (read-only); filter with --method / --path / --name, or emit JSON with --json\",\r\n action: routesCommandAction,\r\n preload: {\r\n config: true,\r\n env: true,\r\n bootstrap: true,\r\n },\r\n options: [\r\n {\r\n text: \"--method, -m\",\r\n description: \"Filter by HTTP method (case-insensitive, e.g. GET, POST)\",\r\n type: \"string\",\r\n },\r\n {\r\n text: \"--path, -p\",\r\n description: \"Filter by a case-insensitive path substring\",\r\n type: \"string\",\r\n },\r\n {\r\n text: \"--name, -n\",\r\n description: \"Filter by a case-insensitive route-name substring\",\r\n type: \"string\",\r\n },\r\n {\r\n text: \"--json, -j\",\r\n description: \"Output the routes as JSON instead of a table\",\r\n type: \"boolean\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,aACE;CACF,QAAQ;CACR,SAAS;EACP,QAAQ;EACR,KAAK;EACL,WAAW;CACb;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"routes.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/routes.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\r\nimport { routesCommandAction } from \"./routes/routes-command.action\";\nimport { routesDiffCommandAction } from \"./routes/routes-diff.action\";\n\r\n/**\r\n * `warlock routes` — list every registered HTTP route as a table (a read-only\r\n * sibling of `warlock doctor`). Filter with `--method` / `--path` / `--name`,\r\n * or emit the normalized rows as JSON with `--json`.\r\n *\r\n * Preload plan: load config + bootstrap app code so route modules register on\r\n * the router singleton, but start NO connectors — listing routes must never\r\n * open a database/cache/socket connection. Because the route-module loader is\r\n * fail-loud, a route file that throws on import surfaces here instead of being\r\n * silently omitted from the table.\r\n */\r\nexport const routesCommand = command({\n name: \"routes\",\r\n description:\r\n \"List the registered HTTP routes as a table (read-only); filter with --method / --path / --name, or emit JSON with --json\",\r\n action: routesCommandAction,\r\n preload: {\r\n config: true,\r\n env: true,\r\n bootstrap: true,\r\n },\r\n options: [\r\n {\r\n text: \"--method, -m\",\r\n description: \"Filter by HTTP method (case-insensitive, e.g. GET, POST)\",\r\n type: \"string\",\r\n },\r\n {\r\n text: \"--path, -p\",\r\n description: \"Filter by a case-insensitive path substring\",\r\n type: \"string\",\r\n },\r\n {\r\n text: \"--name, -n\",\r\n description: \"Filter by a case-insensitive route-name substring\",\r\n type: \"string\",\r\n },\r\n {\r\n text: \"--json, -j\",\r\n description: \"Output the routes as JSON instead of a table\",\r\n type: \"boolean\",\r\n },\r\n ],\r\n});\n\n/** Compare live development page routes with the last successful build. */\nexport const routesDiffCommand = command({\n name: \"routes:diff\",\n description: \"Compare live page routes with the last successful production build\",\n action: routesDiffCommandAction,\n preload: {\n runtimeStrategy: \"development\",\n warlockConfig: true,\n config: true,\n env: true,\n bootstrap: true,\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,aACE;CACF,QAAQ;CACR,SAAS;EACP,QAAQ;EACR,KAAK;EACL,WAAW;CACb;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC;;AAGD,MAAa,oBAAoB,QAAQ;CACvC,MAAM;CACN,aAAa;CACb,QAAQ;CACR,SAAS;EACP,iBAAiB;EACjB,eAAe;EACf,QAAQ;EACR,KAAK;EACL,WAAW;CACb;AACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { command } from "../../commands/cli-command.mjs";
2
2
  import { seedCommandAction } from "../../database/seed-command-action.mjs";
3
3
 
4
- //#region ../core/src/cli/commands/seed.command.ts
4
+ //#region core/src/cli/commands/seed.command.ts
5
5
  const seedCommand = command({
6
6
  action: seedCommandAction,
7
7
  name: "seed",
@@ -1 +1 @@
1
- {"version":3,"file":"seed.command.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/seed.command.ts"],"sourcesContent":["import { seedCommandAction } from \"../../database/seed-command-action\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const seedCommand = command({\r\n action: seedCommandAction,\r\n name: \"seed\",\r\n description: \"Run database seeds\",\r\n preload: {\r\n config: true,\r\n env: true,\r\n bootstrap: true,\r\n connectors: [\"database\", \"cache\", \"logger\"],\r\n },\r\n options: [\r\n {\r\n text: \"--fresh, -f\",\r\n description: \"Drop all tables records and run seeds\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--list, -l\",\r\n description: \"Display the seeds list in order without execution\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--transaction, -t\",\r\n description: \"Run seeds in a transaction\",\r\n type: \"boolean\",\r\n defaultValue: true,\r\n },\r\n {\r\n text: \"--drop, -d\",\r\n description:\r\n 'Undo seeded data — delete tracked records (reverse order) and reset the seed log; scope to one seeder with --drop=\"Seed Name\"',\r\n type: \"string\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;AAGA,MAAa,cAAc,QAAQ;CACjC,QAAQ;CACR,MAAM;CACN,aAAa;CACb,SAAS;EACP,QAAQ;EACR,KAAK;EACL,WAAW;EACX,YAAY;GAAC;GAAY;GAAS;EAAQ;CAC5C;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;GACN,cAAc;EAChB;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"seed.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/seed.command.ts"],"sourcesContent":["import { seedCommandAction } from \"../../database/seed-command-action\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const seedCommand = command({\r\n action: seedCommandAction,\r\n name: \"seed\",\r\n description: \"Run database seeds\",\r\n preload: {\r\n config: true,\r\n env: true,\r\n bootstrap: true,\r\n connectors: [\"database\", \"cache\", \"logger\"],\r\n },\r\n options: [\r\n {\r\n text: \"--fresh, -f\",\r\n description: \"Drop all tables records and run seeds\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--list, -l\",\r\n description: \"Display the seeds list in order without execution\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--transaction, -t\",\r\n description: \"Run seeds in a transaction\",\r\n type: \"boolean\",\r\n defaultValue: true,\r\n },\r\n {\r\n text: \"--drop, -d\",\r\n description:\r\n 'Undo seeded data — delete tracked records (reverse order) and reset the seed log; scope to one seeder with --drop=\"Seed Name\"',\r\n type: \"string\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;AAGA,MAAa,cAAc,QAAQ;CACjC,QAAQ;CACR,MAAM;CACN,aAAa;CACb,SAAS;EACP,QAAQ;EACR,KAAK;EACL,WAAW;EACX,YAAY;GAAC;GAAY;GAAS;EAAQ;CAC5C;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;GACN,cAAc;EAChB;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
@@ -1,15 +1,22 @@
1
1
  import { command } from "../../commands/cli-command.mjs";
2
2
  import { resolveBuildConfig } from "../../production/resolve-build-config.mjs";
3
+ import { checkDistReadyToStartAsync } from "../../production/assert-dist-ready-to-start.mjs";
3
4
  import { superviseProductionProcess } from "../../production/production-supervisor.mjs";
4
5
 
5
- //#region ../core/src/cli/commands/start-production.command.ts
6
+ //#region core/src/cli/commands/start-production.command.ts
6
7
  const startProductionCommand = command({
7
8
  name: "start",
8
9
  description: "Start production server",
9
10
  persistent: true,
10
11
  preload: { warlockConfig: true },
11
12
  action: async () => {
12
- const { entryPath, sourcemap } = resolveBuildConfig();
13
+ const { entryPath, sourcemap, outdir } = resolveBuildConfig();
14
+ const readiness = await checkDistReadyToStartAsync(outdir);
15
+ if (!readiness.ready) {
16
+ console.error(`✖ ${readiness.reason}`);
17
+ process.exit(1);
18
+ return;
19
+ }
13
20
  const nodeArgs = [];
14
21
  if (sourcemap !== false) nodeArgs.push("--enable-source-maps");
15
22
  nodeArgs.push(entryPath);
@@ -1 +1 @@
1
- {"version":3,"file":"start-production.command.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/start-production.command.ts"],"sourcesContent":["import { superviseProductionProcess } from \"../../production/production-supervisor\";\r\nimport { resolveBuildConfig } from \"../../production/resolve-build-config\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const startProductionCommand = command({\r\n name: \"start\",\r\n description: \"Start production server\",\r\n persistent: true,\r\n preload: {\r\n warlockConfig: true,\r\n },\r\n action: async () => {\r\n const { entryPath, sourcemap } = resolveBuildConfig();\r\n\r\n // Build node args\r\n const nodeArgs: string[] = [];\r\n\r\n // Enable source maps if configured\r\n if (sourcemap !== false) {\r\n nodeArgs.push(\"--enable-source-maps\");\r\n }\r\n\r\n // Add entry file\r\n nodeArgs.push(entryPath);\r\n\r\n // Pass through any additional flags after \"start\" command\r\n // process.argv = [node, cli.ts, start, ...extra]\r\n const startIndex = process.argv.findIndex((arg) => arg === \"start\");\r\n if (startIndex !== -1 && startIndex < process.argv.length - 1) {\r\n const extraArgs = process.argv.slice(startIndex + 1);\r\n nodeArgs.push(...extraArgs);\r\n }\r\n\r\n // Progress goes to stderr, never stdout. Stdout carries exactly one claim —\r\n // \"started\" — so that whatever greps it cannot mistake an intention for an\r\n // outcome. The banner that used to print here, in `preAction`, printed\r\n // before the child had even been spawned.\r\n console.error(`🚀 Starting production server...\\n`);\r\n\r\n const { exitCode } = await superviseProductionProcess({ nodeArgs });\r\n\r\n process.exit(exitCode);\r\n },\r\n});\r\n"],"mappings":";;;;;AAIA,MAAa,yBAAyB,QAAQ;CAC5C,MAAM;CACN,aAAa;CACb,YAAY;CACZ,SAAS,EACP,eAAe,KACjB;CACA,QAAQ,YAAY;EAClB,MAAM,EAAE,WAAW,cAAc,mBAAmB;EAGpD,MAAM,WAAqB,CAAC;EAG5B,IAAI,cAAc,OAChB,SAAS,KAAK,sBAAsB;EAItC,SAAS,KAAK,SAAS;EAIvB,MAAM,aAAa,QAAQ,KAAK,WAAW,QAAQ,QAAQ,OAAO;EAClE,IAAI,eAAe,MAAM,aAAa,QAAQ,KAAK,SAAS,GAAG;GAC7D,MAAM,YAAY,QAAQ,KAAK,MAAM,aAAa,CAAC;GACnD,SAAS,KAAK,GAAG,SAAS;EAC5B;EAMA,QAAQ,MAAM,oCAAoC;EAElD,MAAM,EAAE,aAAa,MAAM,2BAA2B,EAAE,SAAS,CAAC;EAElE,QAAQ,KAAK,QAAQ;CACvB;AACF,CAAC"}
1
+ {"version":3,"file":"start-production.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/start-production.command.ts"],"sourcesContent":["import { checkDistReadyToStartAsync } from \"../../production/assert-dist-ready-to-start\";\r\nimport { superviseProductionProcess } from \"../../production/production-supervisor\";\r\nimport { resolveBuildConfig } from \"../../production/resolve-build-config\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const startProductionCommand = command({\r\n name: \"start\",\r\n description: \"Start production server\",\r\n persistent: true,\r\n preload: {\r\n warlockConfig: true,\r\n },\r\n action: async () => {\r\n const { entryPath, sourcemap, outdir } = resolveBuildConfig();\r\n\r\n // Refuse a `dist` that did not come from a successful `warlock build` —\r\n // named explicitly, rather than failing later and incidentally because\r\n // some file the server happens to need (the client manifest, say) is\r\n // missing. See `assert-dist-ready-to-start.ts`.\r\n const readiness = await checkDistReadyToStartAsync(outdir);\r\n\r\n if (!readiness.ready) {\r\n console.error(`✖ ${readiness.reason}`);\r\n process.exit(1);\r\n return;\r\n }\r\n\r\n // Build node args\r\n const nodeArgs: string[] = [];\r\n\r\n // Enable source maps if configured\r\n if (sourcemap !== false) {\r\n nodeArgs.push(\"--enable-source-maps\");\r\n }\r\n\r\n // Add entry file\r\n nodeArgs.push(entryPath);\r\n\r\n // Pass through any additional flags after \"start\" command\r\n // process.argv = [node, cli.ts, start, ...extra]\r\n const startIndex = process.argv.findIndex((arg) => arg === \"start\");\r\n if (startIndex !== -1 && startIndex < process.argv.length - 1) {\r\n const extraArgs = process.argv.slice(startIndex + 1);\r\n nodeArgs.push(...extraArgs);\r\n }\r\n\r\n // Progress goes to stderr, never stdout. Stdout carries exactly one claim —\r\n // \"started\" — so that whatever greps it cannot mistake an intention for an\r\n // outcome. The banner that used to print here, in `preAction`, printed\r\n // before the child had even been spawned.\r\n console.error(`🚀 Starting production server...\\n`);\r\n\r\n const { exitCode } = await superviseProductionProcess({ nodeArgs });\r\n\r\n process.exit(exitCode);\r\n },\r\n});\r\n"],"mappings":";;;;;;AAKA,MAAa,yBAAyB,QAAQ;CAC5C,MAAM;CACN,aAAa;CACb,YAAY;CACZ,SAAS,EACP,eAAe,KACjB;CACA,QAAQ,YAAY;EAClB,MAAM,EAAE,WAAW,WAAW,WAAW,mBAAmB;EAM5D,MAAM,YAAY,MAAM,2BAA2B,MAAM;EAEzD,IAAI,CAAC,UAAU,OAAO;GACpB,QAAQ,MAAM,KAAK,UAAU,QAAQ;GACrC,QAAQ,KAAK,CAAC;GACd;EACF;EAGA,MAAM,WAAqB,CAAC;EAG5B,IAAI,cAAc,OAChB,SAAS,KAAK,sBAAsB;EAItC,SAAS,KAAK,SAAS;EAIvB,MAAM,aAAa,QAAQ,KAAK,WAAW,QAAQ,QAAQ,OAAO;EAClE,IAAI,eAAe,MAAM,aAAa,QAAQ,KAAK,SAAS,GAAG;GAC7D,MAAM,YAAY,QAAQ,KAAK,MAAM,aAAa,CAAC;GACnD,SAAS,KAAK,GAAG,SAAS;EAC5B;EAMA,QAAQ,MAAM,oCAAoC;EAElD,MAAM,EAAE,aAAa,MAAM,2BAA2B,EAAE,SAAS,CAAC;EAElE,QAAQ,KAAK,QAAQ;CACvB;AACF,CAAC"}
@@ -5,7 +5,7 @@ import "../../storage/index.mjs";
5
5
  import path from "path";
6
6
  import fs from "fs/promises";
7
7
 
8
- //#region ../core/src/cli/commands/storage-put.action.ts
8
+ //#region core/src/cli/commands/storage-put.action.ts
9
9
  /**
10
10
  * Action for `warlock storage.put <localPath> [destination] [--driver <name>] [--concurrency <n>]`
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"storage-put.action.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/storage-put.action.ts"],"sourcesContent":["import fs from \"fs/promises\";\r\nimport path from \"path\";\r\nimport { config } from \"../../config\";\r\nimport { storage } from \"../../storage\";\r\nimport type { CommandActionData } from \"../../commands/types\";\r\n\r\n/**\r\n * Action for `warlock storage.put <localPath> [destination] [--driver <name>] [--concurrency <n>]`\r\n *\r\n * Uploads a local file or directory into any configured storage driver.\r\n * Auto-detects whether <localPath> is a file or directory and calls the\r\n * appropriate storage method.\r\n *\r\n * @example\r\n * # Upload entire uploads directory to R2 (root of bucket)\r\n * warlock storage.put ./uploads --driver r2\r\n *\r\n * @example\r\n * # Upload to a specific destination prefix\r\n * warlock storage.put ./uploads backups/2026 --driver r2\r\n *\r\n * @example\r\n * # Single file upload with custom concurrency\r\n * warlock storage.put ./public/logo.png assets/logo.png --driver s3\r\n */\r\nexport async function storagePutAction({ args, options }: CommandActionData): Promise<void> {\r\n const [localPath, destination = \"\"] = args;\r\n\r\n if (!localPath) {\r\n console.error(\"✖ Missing required argument: <localPath>\");\r\n console.error(\" Usage: warlock storage.put <localPath> [destination] [--driver <name>]\");\r\n process.exit(1);\r\n }\r\n\r\n // Resolve to absolute path relative to CWD\r\n const absolutePath = path.resolve(process.cwd(), localPath);\r\n const driverName = options.driver as string | undefined;\r\n const concurrency = options.concurrency ? Number(options.concurrency) : 5;\r\n\r\n // Verify the local path exists\r\n let stat: Awaited<ReturnType<typeof fs.stat>>;\r\n try {\r\n stat = await fs.stat(absolutePath);\r\n } catch {\r\n console.error(`✖ Path not found: ${absolutePath}`);\r\n process.exit(1);\r\n }\r\n\r\n // Select the driver — use named driver or fall back to default\r\n const store = driverName ? storage.use(driverName) : storage;\r\n const driverLabel = driverName ?? config.get(\"storage.default\");\r\n\r\n console.log(`\\n Driver : ${driverLabel}`);\r\n console.log(` Source : ${absolutePath}`);\r\n console.log(` Dest : ${destination || \"(root)\"}\\n`);\r\n\r\n if (stat.isDirectory()) {\r\n // ── Directory upload ────────────────────────────────────────────────────\r\n const result = await store.putDirectory(absolutePath, destination, {\r\n concurrency,\r\n // Skip hidden files (e.g. .DS_Store) by default\r\n filter: (_, rel) => !path.basename(rel).startsWith(\".\"),\r\n onProgress: (done, total, file) => {\r\n process.stdout.write(`\\r Progress : ${done}/${total} ${file.path}`);\r\n },\r\n });\r\n\r\n // Clear the progress line and print summary\r\n process.stdout.write(\"\\n\");\r\n console.log(`\\n ✔ ${result.uploaded.length} file(s) uploaded`);\r\n\r\n if (result.failed.length > 0) {\r\n console.warn(`\\n ⚠ ${result.failed.length} file(s) failed:`);\r\n for (const { localPath: fp, error } of result.failed) {\r\n console.warn(` - ${fp}: ${error.message}`);\r\n }\r\n }\r\n } else {\r\n // ── Single file upload ──────────────────────────────────────────────────\r\n // Destination is used as the storage path; if empty, fall back to filename\r\n const storagePath = destination || path.basename(absolutePath);\r\n\r\n console.log(` Uploading : ${path.basename(absolutePath)} → ${storagePath}`);\r\n\r\n const file = await store.put(absolutePath, storagePath);\r\n\r\n console.log(`\\n ✔ Uploaded: ${file.url}`);\r\n }\r\n\r\n console.log();\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,eAAsB,iBAAiB,EAAE,MAAM,WAA6C;CAC1F,MAAM,CAAC,WAAW,cAAc,MAAM;CAEtC,IAAI,CAAC,WAAW;EACd,QAAQ,MAAM,2CAA2C;EACzD,QAAQ,MAAM,2EAA2E;EACzF,QAAQ,KAAK,CAAC;CAChB;CAGA,MAAM,eAAe,KAAK,QAAQ,QAAQ,IAAI,GAAG,SAAS;CAC1D,MAAM,aAAa,QAAQ;CAC3B,MAAM,cAAc,QAAQ,cAAc,OAAO,QAAQ,WAAW,IAAI;CAGxE,IAAI;CACJ,IAAI;EACF,OAAO,MAAM,GAAG,KAAK,YAAY;CACnC,QAAQ;EACN,QAAQ,MAAM,sBAAsB,cAAc;EAClD,QAAQ,KAAK,CAAC;CAChB;CAGA,MAAM,QAAQ,aAAa,QAAQ,IAAI,UAAU,IAAI;CACrD,MAAM,cAAc,cAAc,OAAO,IAAI,iBAAiB;CAE9D,QAAQ,IAAI,mBAAmB,aAAa;CAC5C,QAAQ,IAAI,iBAAiB,cAAc;CAC3C,QAAQ,IAAI,iBAAiB,eAAe,SAAS,GAAG;CAExD,IAAI,KAAK,YAAY,GAAG;EAEtB,MAAM,SAAS,MAAM,MAAM,aAAa,cAAc,aAAa;GACjE;GAEA,SAAS,GAAG,QAAQ,CAAC,KAAK,SAAS,GAAG,CAAC,CAAC,WAAW,GAAG;GACtD,aAAa,MAAM,OAAO,SAAS;IACjC,QAAQ,OAAO,MAAM,mBAAmB,KAAK,GAAG,MAAM,IAAI,KAAK,MAAM;GACvE;EACF,CAAC;EAGD,QAAQ,OAAO,MAAM,IAAI;EACzB,QAAQ,IAAI,UAAU,OAAO,SAAS,OAAO,kBAAkB;EAE/D,IAAI,OAAO,OAAO,SAAS,GAAG;GAC5B,QAAQ,KAAK,UAAU,OAAO,OAAO,OAAO,iBAAiB;GAC7D,KAAK,MAAM,EAAE,WAAW,IAAI,WAAW,OAAO,QAC5C,QAAQ,KAAK,UAAU,GAAG,IAAI,MAAM,SAAS;EAEjD;CACF,OAAO;EAGL,MAAM,cAAc,eAAe,KAAK,SAAS,YAAY;EAE7D,QAAQ,IAAI,iBAAiB,KAAK,SAAS,YAAY,EAAE,KAAK,aAAa;EAE3E,MAAM,OAAO,MAAM,MAAM,IAAI,cAAc,WAAW;EAEtD,QAAQ,IAAI,oBAAoB,KAAK,KAAK;CAC5C;CAEA,QAAQ,IAAI;AACd"}
1
+ {"version":3,"file":"storage-put.action.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/storage-put.action.ts"],"sourcesContent":["import fs from \"fs/promises\";\r\nimport path from \"path\";\r\nimport { config } from \"../../config\";\r\nimport { storage } from \"../../storage\";\r\nimport type { CommandActionData } from \"../../commands/types\";\r\n\r\n/**\r\n * Action for `warlock storage.put <localPath> [destination] [--driver <name>] [--concurrency <n>]`\r\n *\r\n * Uploads a local file or directory into any configured storage driver.\r\n * Auto-detects whether <localPath> is a file or directory and calls the\r\n * appropriate storage method.\r\n *\r\n * @example\r\n * # Upload entire uploads directory to R2 (root of bucket)\r\n * warlock storage.put ./uploads --driver r2\r\n *\r\n * @example\r\n * # Upload to a specific destination prefix\r\n * warlock storage.put ./uploads backups/2026 --driver r2\r\n *\r\n * @example\r\n * # Single file upload with custom concurrency\r\n * warlock storage.put ./public/logo.png assets/logo.png --driver s3\r\n */\r\nexport async function storagePutAction({ args, options }: CommandActionData): Promise<void> {\r\n const [localPath, destination = \"\"] = args;\r\n\r\n if (!localPath) {\r\n console.error(\"✖ Missing required argument: <localPath>\");\r\n console.error(\" Usage: warlock storage.put <localPath> [destination] [--driver <name>]\");\r\n process.exit(1);\r\n }\r\n\r\n // Resolve to absolute path relative to CWD\r\n const absolutePath = path.resolve(process.cwd(), localPath);\r\n const driverName = options.driver as string | undefined;\r\n const concurrency = options.concurrency ? Number(options.concurrency) : 5;\r\n\r\n // Verify the local path exists\r\n let stat: Awaited<ReturnType<typeof fs.stat>>;\r\n try {\r\n stat = await fs.stat(absolutePath);\r\n } catch {\r\n console.error(`✖ Path not found: ${absolutePath}`);\r\n process.exit(1);\r\n }\r\n\r\n // Select the driver — use named driver or fall back to default\r\n const store = driverName ? storage.use(driverName) : storage;\r\n const driverLabel = driverName ?? config.get(\"storage.default\");\r\n\r\n console.log(`\\n Driver : ${driverLabel}`);\r\n console.log(` Source : ${absolutePath}`);\r\n console.log(` Dest : ${destination || \"(root)\"}\\n`);\r\n\r\n if (stat.isDirectory()) {\r\n // ── Directory upload ────────────────────────────────────────────────────\r\n const result = await store.putDirectory(absolutePath, destination, {\r\n concurrency,\r\n // Skip hidden files (e.g. .DS_Store) by default\r\n filter: (_, rel) => !path.basename(rel).startsWith(\".\"),\r\n onProgress: (done, total, file) => {\r\n process.stdout.write(`\\r Progress : ${done}/${total} ${file.path}`);\r\n },\r\n });\r\n\r\n // Clear the progress line and print summary\r\n process.stdout.write(\"\\n\");\r\n console.log(`\\n ✔ ${result.uploaded.length} file(s) uploaded`);\r\n\r\n if (result.failed.length > 0) {\r\n console.warn(`\\n ⚠ ${result.failed.length} file(s) failed:`);\r\n for (const { localPath: fp, error } of result.failed) {\r\n console.warn(` - ${fp}: ${error.message}`);\r\n }\r\n }\r\n } else {\r\n // ── Single file upload ──────────────────────────────────────────────────\r\n // Destination is used as the storage path; if empty, fall back to filename\r\n const storagePath = destination || path.basename(absolutePath);\r\n\r\n console.log(` Uploading : ${path.basename(absolutePath)} → ${storagePath}`);\r\n\r\n const file = await store.put(absolutePath, storagePath);\r\n\r\n console.log(`\\n ✔ Uploaded: ${file.url}`);\r\n }\r\n\r\n console.log();\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,eAAsB,iBAAiB,EAAE,MAAM,WAA6C;CAC1F,MAAM,CAAC,WAAW,cAAc,MAAM;CAEtC,IAAI,CAAC,WAAW;EACd,QAAQ,MAAM,2CAA2C;EACzD,QAAQ,MAAM,2EAA2E;EACzF,QAAQ,KAAK,CAAC;CAChB;CAGA,MAAM,eAAe,KAAK,QAAQ,QAAQ,IAAI,GAAG,SAAS;CAC1D,MAAM,aAAa,QAAQ;CAC3B,MAAM,cAAc,QAAQ,cAAc,OAAO,QAAQ,WAAW,IAAI;CAGxE,IAAI;CACJ,IAAI;EACF,OAAO,MAAM,GAAG,KAAK,YAAY;CACnC,QAAQ;EACN,QAAQ,MAAM,sBAAsB,cAAc;EAClD,QAAQ,KAAK,CAAC;CAChB;CAGA,MAAM,QAAQ,aAAa,QAAQ,IAAI,UAAU,IAAI;CACrD,MAAM,cAAc,cAAc,OAAO,IAAI,iBAAiB;CAE9D,QAAQ,IAAI,mBAAmB,aAAa;CAC5C,QAAQ,IAAI,iBAAiB,cAAc;CAC3C,QAAQ,IAAI,iBAAiB,eAAe,SAAS,GAAG;CAExD,IAAI,KAAK,YAAY,GAAG;EAEtB,MAAM,SAAS,MAAM,MAAM,aAAa,cAAc,aAAa;GACjE;GAEA,SAAS,GAAG,QAAQ,CAAC,KAAK,SAAS,GAAG,EAAE,WAAW,GAAG;GACtD,aAAa,MAAM,OAAO,SAAS;IACjC,QAAQ,OAAO,MAAM,mBAAmB,KAAK,GAAG,MAAM,IAAI,KAAK,MAAM;GACvE;EACF,CAAC;EAGD,QAAQ,OAAO,MAAM,IAAI;EACzB,QAAQ,IAAI,UAAU,OAAO,SAAS,OAAO,kBAAkB;EAE/D,IAAI,OAAO,OAAO,SAAS,GAAG;GAC5B,QAAQ,KAAK,UAAU,OAAO,OAAO,OAAO,iBAAiB;GAC7D,KAAK,MAAM,EAAE,WAAW,IAAI,WAAW,OAAO,QAC5C,QAAQ,KAAK,UAAU,GAAG,IAAI,MAAM,SAAS;EAEjD;CACF,OAAO;EAGL,MAAM,cAAc,eAAe,KAAK,SAAS,YAAY;EAE7D,QAAQ,IAAI,iBAAiB,KAAK,SAAS,YAAY,EAAE,KAAK,aAAa;EAE3E,MAAM,OAAO,MAAM,MAAM,IAAI,cAAc,WAAW;EAEtD,QAAQ,IAAI,oBAAoB,KAAK,KAAK;CAC5C;CAEA,QAAQ,IAAI;AACd"}
@@ -1,7 +1,7 @@
1
1
  import { command } from "../../commands/cli-command.mjs";
2
2
  import { storagePutAction } from "./storage-put.action.mjs";
3
3
 
4
- //#region ../core/src/cli/commands/storage-put.command.ts
4
+ //#region core/src/cli/commands/storage-put.command.ts
5
5
  /**
6
6
  * `storage.put` CLI command
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"storage-put.command.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/storage-put.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\r\nimport { storagePutAction } from \"./storage-put.action\";\r\n\r\n/**\r\n * `storage.put` CLI command\r\n *\r\n * Uploads a local file or directory to any configured storage driver.\r\n * Auto-detects file vs directory and streams each file (no full buffer in memory).\r\n *\r\n * @example\r\n * # Upload full uploads/ directory to R2 (migrating from local to cloud)\r\n * warlock storage.put ./uploads --driver r2\r\n *\r\n * @example\r\n * # Upload under a specific prefix\r\n * warlock storage.put ./uploads backups/2026 --driver r2\r\n *\r\n * @example\r\n * # Single file upload to default driver\r\n * warlock storage.put ./public/logo.png assets/logo.png\r\n */\r\nexport const storagePutCommand = command({\r\n name: \"storage.put <localPath> [destination]\",\r\n alias: \"sput\",\r\n action: storagePutAction,\r\n description: \"Upload a local file or directory to storage\",\r\n preload: {\r\n env: true,\r\n config: [\"storage\"],\r\n connectors: [\"storage\"],\r\n },\r\n options: [\r\n {\r\n text: \"--driver, -d\",\r\n description:\r\n \"Storage driver name (as defined in config). Defaults to the configured default driver.\",\r\n },\r\n {\r\n text: \"--concurrency, -c\",\r\n description: \"Number of concurrent uploads when uploading a directory\",\r\n type: \"number\",\r\n defaultValue: 5,\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,oBAAoB,QAAQ;CACvC,MAAM;CACN,OAAO;CACP,QAAQ;CACR,aAAa;CACb,SAAS;EACP,KAAK;EACL,QAAQ,CAAC,SAAS;EAClB,YAAY,CAAC,SAAS;CACxB;CACA,SAAS,CACP;EACE,MAAM;EACN,aACE;CACJ,GACA;EACE,MAAM;EACN,aAAa;EACb,MAAM;EACN,cAAc;CAChB,CACF;AACF,CAAC"}
1
+ {"version":3,"file":"storage-put.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/storage-put.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\r\nimport { storagePutAction } from \"./storage-put.action\";\r\n\r\n/**\r\n * `storage.put` CLI command\r\n *\r\n * Uploads a local file or directory to any configured storage driver.\r\n * Auto-detects file vs directory and streams each file (no full buffer in memory).\r\n *\r\n * @example\r\n * # Upload full uploads/ directory to R2 (migrating from local to cloud)\r\n * warlock storage.put ./uploads --driver r2\r\n *\r\n * @example\r\n * # Upload under a specific prefix\r\n * warlock storage.put ./uploads backups/2026 --driver r2\r\n *\r\n * @example\r\n * # Single file upload to default driver\r\n * warlock storage.put ./public/logo.png assets/logo.png\r\n */\r\nexport const storagePutCommand = command({\r\n name: \"storage.put <localPath> [destination]\",\r\n alias: \"sput\",\r\n action: storagePutAction,\r\n description: \"Upload a local file or directory to storage\",\r\n preload: {\r\n env: true,\r\n config: [\"storage\"],\r\n connectors: [\"storage\"],\r\n },\r\n options: [\r\n {\r\n text: \"--driver, -d\",\r\n description:\r\n \"Storage driver name (as defined in config). Defaults to the configured default driver.\",\r\n },\r\n {\r\n text: \"--concurrency, -c\",\r\n description: \"Number of concurrent uploads when uploading a directory\",\r\n type: \"number\",\r\n defaultValue: 5,\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,oBAAoB,QAAQ;CACvC,MAAM;CACN,OAAO;CACP,QAAQ;CACR,aAAa;CACb,SAAS;EACP,KAAK;EACL,QAAQ,CAAC,SAAS;EAClB,YAAY,CAAC,SAAS;CACxB;CACA,SAAS,CACP;EACE,MAAM;EACN,aACE;CACJ,GACA;EACE,MAAM;EACN,aAAa;EACb,MAAM;EACN,cAAc;CAChB,CACF;AACF,CAAC"}
@@ -6,7 +6,7 @@ import { getFilesFromDirectory } from "../../dev-server/utils.mjs";
6
6
  import { filesOrchestrator } from "../../dev-server/files-orchestrator.mjs";
7
7
  import { typeGenerator } from "../../dev-server/type-generator.mjs";
8
8
 
9
- //#region ../core/src/cli/commands/typings-generator.command.ts
9
+ //#region core/src/cli/commands/typings-generator.command.ts
10
10
  const typingsGeneratorCommand = command({
11
11
  name: "generate.typings",
12
12
  description: "Generate type definitions for the project",
@@ -1 +1 @@
1
- {"version":3,"file":"typings-generator.command.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/typings-generator.command.ts"],"sourcesContent":["import { filesOrchestrator } from \"../../dev-server/files-orchestrator\";\r\nimport { Path } from \"../../utils/normalized-path\";\r\nimport { typeGenerator } from \"../../dev-server/type-generator\";\r\nimport { getFilesFromDirectory } from \"../../dev-server/utils\";\r\nimport { srcPath } from \"../../utils\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const typingsGeneratorCommand = command({\r\n name: \"generate.typings\",\r\n description: \"Generate type definitions for the project\",\r\n options: [\r\n {\r\n text: \"--files, -f\",\r\n description:\r\n \"Files to generate typings for, if not passed, it will generate typings for all files\",\r\n },\r\n ],\r\n action: async ({ options }) => {\r\n const configFilesPaths: string[] = [];\r\n if (options.files) {\r\n const files = String(options.files)\r\n .split(\",\")\r\n .map((file) => {\r\n if (file.startsWith(\"./\")) {\r\n return Path.toAbsolute(file);\r\n }\r\n\r\n return file;\r\n });\r\n\r\n if (files?.length) {\r\n configFilesPaths.push(...files);\r\n }\r\n }\r\n\r\n if (configFilesPaths.length === 0) {\r\n // grab all config files\r\n const configFiles = await getFilesFromDirectory(srcPath(\"config\"));\r\n configFilesPaths.push(...configFiles);\r\n }\r\n\r\n const results = await Promise.allSettled(\r\n configFilesPaths.map((path) => filesOrchestrator.add(Path.toRelative(path))),\r\n );\r\n\r\n const failed = results.filter((r) => r.status === \"rejected\");\r\n\r\n if (failed.length) {\r\n console.warn(`Failed to process ${failed.length} files`);\r\n }\r\n\r\n await typeGenerator.generateAll();\r\n },\r\n});\r\n"],"mappings":";;;;;;;;;AAOA,MAAa,0BAA0B,QAAQ;CAC7C,MAAM;CACN,aAAa;CACb,SAAS,CACP;EACE,MAAM;EACN,aACE;CACJ,CACF;CACA,QAAQ,OAAO,EAAE,cAAc;EAC7B,MAAM,mBAA6B,CAAC;EACpC,IAAI,QAAQ,OAAO;GACjB,MAAM,QAAQ,OAAO,QAAQ,KAAK,CAAC,CAChC,MAAM,GAAG,CAAC,CACV,KAAK,SAAS;IACb,IAAI,KAAK,WAAW,IAAI,GACtB,OAAO,KAAK,WAAW,IAAI;IAG7B,OAAO;GACT,CAAC;GAEH,IAAI,OAAO,QACT,iBAAiB,KAAK,GAAG,KAAK;EAElC;EAEA,IAAI,iBAAiB,WAAW,GAAG;GAEjC,MAAM,cAAc,MAAM,sBAAsB,QAAQ,QAAQ,CAAC;GACjE,iBAAiB,KAAK,GAAG,WAAW;EACtC;EAMA,MAAM,UAAS,MAJO,QAAQ,WAC5B,iBAAiB,KAAK,SAAS,kBAAkB,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,CAC7E,EAEsB,CAAC,QAAQ,MAAM,EAAE,WAAW,UAAU;EAE5D,IAAI,OAAO,QACT,QAAQ,KAAK,qBAAqB,OAAO,OAAO,OAAO;EAGzD,MAAM,cAAc,YAAY;CAClC;AACF,CAAC"}
1
+ {"version":3,"file":"typings-generator.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/typings-generator.command.ts"],"sourcesContent":["import { filesOrchestrator } from \"../../dev-server/files-orchestrator\";\r\nimport { Path } from \"../../utils/normalized-path\";\r\nimport { typeGenerator } from \"../../dev-server/type-generator\";\r\nimport { getFilesFromDirectory } from \"../../dev-server/utils\";\r\nimport { srcPath } from \"../../utils\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const typingsGeneratorCommand = command({\r\n name: \"generate.typings\",\r\n description: \"Generate type definitions for the project\",\r\n options: [\r\n {\r\n text: \"--files, -f\",\r\n description:\r\n \"Files to generate typings for, if not passed, it will generate typings for all files\",\r\n },\r\n ],\r\n action: async ({ options }) => {\r\n const configFilesPaths: string[] = [];\r\n if (options.files) {\r\n const files = String(options.files)\r\n .split(\",\")\r\n .map((file) => {\r\n if (file.startsWith(\"./\")) {\r\n return Path.toAbsolute(file);\r\n }\r\n\r\n return file;\r\n });\r\n\r\n if (files?.length) {\r\n configFilesPaths.push(...files);\r\n }\r\n }\r\n\r\n if (configFilesPaths.length === 0) {\r\n // grab all config files\r\n const configFiles = await getFilesFromDirectory(srcPath(\"config\"));\r\n configFilesPaths.push(...configFiles);\r\n }\r\n\r\n const results = await Promise.allSettled(\r\n configFilesPaths.map((path) => filesOrchestrator.add(Path.toRelative(path))),\r\n );\r\n\r\n const failed = results.filter((r) => r.status === \"rejected\");\r\n\r\n if (failed.length) {\r\n console.warn(`Failed to process ${failed.length} files`);\r\n }\r\n\r\n await typeGenerator.generateAll();\r\n },\r\n});\r\n"],"mappings":";;;;;;;;;AAOA,MAAa,0BAA0B,QAAQ;CAC7C,MAAM;CACN,aAAa;CACb,SAAS,CACP;EACE,MAAM;EACN,aACE;CACJ,CACF;CACA,QAAQ,OAAO,EAAE,cAAc;EAC7B,MAAM,mBAA6B,CAAC;EACpC,IAAI,QAAQ,OAAO;GACjB,MAAM,QAAQ,OAAO,QAAQ,KAAK,EAC/B,MAAM,GAAG,EACT,KAAK,SAAS;IACb,IAAI,KAAK,WAAW,IAAI,GACtB,OAAO,KAAK,WAAW,IAAI;IAG7B,OAAO;GACT,CAAC;GAEH,IAAI,OAAO,QACT,iBAAiB,KAAK,GAAG,KAAK;EAElC;EAEA,IAAI,iBAAiB,WAAW,GAAG;GAEjC,MAAM,cAAc,MAAM,sBAAsB,QAAQ,QAAQ,CAAC;GACjE,iBAAiB,KAAK,GAAG,WAAW;EACtC;EAMA,MAAM,UAAS,MAJO,QAAQ,WAC5B,iBAAiB,KAAK,SAAS,kBAAkB,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,CAC7E,GAEuB,QAAQ,MAAM,EAAE,WAAW,UAAU;EAE5D,IAAI,OAAO,QACT,QAAQ,KAAK,qBAAqB,OAAO,OAAO,OAAO;EAGzD,MAAM,cAAc,YAAY;CAClC;AACF,CAAC"}
@@ -2,7 +2,7 @@ import { command } from "../../commands/cli-command.mjs";
2
2
  import { updateWarlockPackages } from "../../updater/update-warlock-packages.mjs";
3
3
  import { colors } from "@mongez/copper";
4
4
 
5
- //#region ../core/src/cli/commands/update.command.ts
5
+ //#region core/src/cli/commands/update.command.ts
6
6
  const updateCommand = command({
7
7
  name: "update",
8
8
  description: "Update all @warlock.js packages in this project to their latest version",
@@ -1 +1 @@
1
- {"version":3,"file":"update.command.mjs","names":[],"sources":["../../../../../../../../core/src/cli/commands/update.command.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\r\nimport { updateWarlockPackages } from \"../../updater/update-warlock-packages\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const updateCommand = command({\r\n name: \"update\",\r\n description: \"Update all @warlock.js packages in this project to their latest version\",\r\n action: async (data) => {\r\n // `parseCliArgs` camelCases every flag, so `--no-install` arrives as\r\n // `options.noInstall` (not `options[\"no-install\"]`).\r\n const check = Boolean(data.options.check);\r\n const dryRun = check || Boolean(data.options.dryRun);\r\n\r\n const result = await updateWarlockPackages({\r\n install: !data.options.noInstall,\r\n dryRun,\r\n });\r\n\r\n // `updateWarlockPackages` resolves on a failed install so the dev-server\r\n // shortcut can survive it; a one-shot CLI run must still exit non-zero.\r\n if (result.outcome === \"install-failed\") {\r\n throw result.error ?? new Error(\"Package manager install failed.\");\r\n }\r\n\r\n // `--check` is a gate, so its exit code carries the answer: 0 current,\r\n // 1 behind. `--dry-run` only reports, and always succeeds.\r\n if (check && result.outcome === \"outdated\") {\r\n console.log(\r\n colors.dim(\"Run \") +\r\n colors.cyan(\"warlock update\") +\r\n colors.dim(\" to apply these, or --dry-run to preview without a gate.\"),\r\n );\r\n process.exit(1);\r\n }\r\n },\r\n options: [\r\n {\r\n text: \"--no-install\",\r\n description:\r\n \"Rewrite the @warlock.js versions in package.json without running the package manager install\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--dry-run\",\r\n description: \"Show which packages would be updated without changing package.json\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--check\",\r\n description:\r\n \"Like --dry-run, but exits 1 when any package is behind — a CI gate for staying current\",\r\n type: \"boolean\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;;AAIA,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,aAAa;CACb,QAAQ,OAAO,SAAS;EAGtB,MAAM,QAAQ,QAAQ,KAAK,QAAQ,KAAK;EACxC,MAAM,SAAS,SAAS,QAAQ,KAAK,QAAQ,MAAM;EAEnD,MAAM,SAAS,MAAM,sBAAsB;GACzC,SAAS,CAAC,KAAK,QAAQ;GACvB;EACF,CAAC;EAID,IAAI,OAAO,YAAY,kBACrB,MAAM,OAAO,yBAAS,IAAI,MAAM,iCAAiC;EAKnE,IAAI,SAAS,OAAO,YAAY,YAAY;GAC1C,QAAQ,IACN,OAAO,IAAI,MAAM,IACf,OAAO,KAAK,gBAAgB,IAC5B,OAAO,IAAI,0DAA0D,CACzE;GACA,QAAQ,KAAK,CAAC;EAChB;CACF;CACA,SAAS;EACP;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"update.command.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands/update.command.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\r\nimport { updateWarlockPackages } from \"../../updater/update-warlock-packages\";\r\nimport { command } from \"../../commands/cli-command\";\r\n\r\nexport const updateCommand = command({\r\n name: \"update\",\r\n description: \"Update all @warlock.js packages in this project to their latest version\",\r\n action: async (data) => {\r\n // `parseCliArgs` camelCases every flag, so `--no-install` arrives as\r\n // `options.noInstall` (not `options[\"no-install\"]`).\r\n const check = Boolean(data.options.check);\r\n const dryRun = check || Boolean(data.options.dryRun);\r\n\r\n const result = await updateWarlockPackages({\r\n install: !data.options.noInstall,\r\n dryRun,\r\n });\r\n\r\n // `updateWarlockPackages` resolves on a failed install so the dev-server\r\n // shortcut can survive it; a one-shot CLI run must still exit non-zero.\r\n if (result.outcome === \"install-failed\") {\r\n throw result.error ?? new Error(\"Package manager install failed.\");\r\n }\r\n\r\n // `--check` is a gate, so its exit code carries the answer: 0 current,\r\n // 1 behind. `--dry-run` only reports, and always succeeds.\r\n if (check && result.outcome === \"outdated\") {\r\n console.log(\r\n colors.dim(\"Run \") +\r\n colors.cyan(\"warlock update\") +\r\n colors.dim(\" to apply these, or --dry-run to preview without a gate.\"),\r\n );\r\n process.exit(1);\r\n }\r\n },\r\n options: [\r\n {\r\n text: \"--no-install\",\r\n description:\r\n \"Rewrite the @warlock.js versions in package.json without running the package manager install\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--dry-run\",\r\n description: \"Show which packages would be updated without changing package.json\",\r\n type: \"boolean\",\r\n },\r\n {\r\n text: \"--check\",\r\n description:\r\n \"Like --dry-run, but exits 1 when any package is behind — a CI gate for staying current\",\r\n type: \"boolean\",\r\n },\r\n ],\r\n});\r\n"],"mappings":";;;;;AAIA,MAAa,gBAAgB,QAAQ;CACnC,MAAM;CACN,aAAa;CACb,QAAQ,OAAO,SAAS;EAGtB,MAAM,QAAQ,QAAQ,KAAK,QAAQ,KAAK;EACxC,MAAM,SAAS,SAAS,QAAQ,KAAK,QAAQ,MAAM;EAEnD,MAAM,SAAS,MAAM,sBAAsB;GACzC,SAAS,CAAC,KAAK,QAAQ;GACvB;EACF,CAAC;EAID,IAAI,OAAO,YAAY,kBACrB,MAAM,OAAO,yBAAS,IAAI,MAAM,iCAAiC;EAKnE,IAAI,SAAS,OAAO,YAAY,YAAY;GAC1C,QAAQ,IACN,OAAO,IAAI,MAAM,IACf,OAAO,KAAK,gBAAgB,IAC5B,OAAO,IAAI,0DAA0D,CACzE;GACA,QAAQ,KAAK,CAAC;EAChB;CACF;CACA,SAAS;EACP;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
@@ -5,7 +5,7 @@ import { getFilesFromDirectory } from "../dev-server/utils.mjs";
5
5
  import { filesOrchestrator } from "../dev-server/files-orchestrator.mjs";
6
6
  import { isMatchingCommandName } from "./cli-commands.utils.mjs";
7
7
 
8
- //#region ../core/src/cli/commands-loader.ts
8
+ //#region core/src/cli/commands-loader.ts
9
9
  var CLICommandsLoader = class {
10
10
  /**
11
11
  * Locate command by name
@@ -1 +1 @@
1
- {"version":3,"file":"commands-loader.mjs","names":[],"sources":["../../../../../../../core/src/cli/commands-loader.ts"],"sourcesContent":["import { filesOrchestrator } from \"../dev-server/files-orchestrator\";\r\nimport { Path } from \"../utils/normalized-path\";\r\nimport { getFilesFromDirectory } from \"../dev-server/utils\";\r\nimport { srcPath } from \"../utils\";\r\nimport { CLICommand } from \"../commands/cli-command\";\r\nimport { isMatchingCommandName } from \"./cli-commands.utils\";\r\n\r\nexport class CLICommandsLoader {\r\n /**\r\n * Locate command by name\r\n */\r\n public async locate(commandName: string): Promise<CLICommand | undefined> {\r\n const files = await getFilesFromDirectory(srcPath(\"app\"), \"**/commands/*.{ts,tsx}\");\r\n // now convert them into relative paths\r\n const relativeFiles = files.map((path) => Path.toRelative(path));\r\n\r\n for (const relativeFile of relativeFiles) {\r\n const command = await this.load(relativeFile);\r\n if (command) {\r\n command.$relativePath(relativeFile);\r\n if (isMatchingCommandName(command.name, commandName)) {\r\n return command;\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n /**\r\n * Scan all project commands and return them\r\n * Used for warm cache functionality\r\n */\r\n public async scanAll(): Promise<CLICommand[]> {\r\n const files = await getFilesFromDirectory(srcPath(\"app\"), \"**/commands/*.{ts,tsx}\");\r\n const relativeFiles = files.map((path) => Path.toRelative(path));\r\n const commands: CLICommand[] = [];\r\n\r\n for (const relativeFile of relativeFiles) {\r\n const command = await this.load(relativeFile);\r\n if (command) {\r\n command.$relativePath(relativeFile);\r\n commands.push(command);\r\n }\r\n }\r\n\r\n return commands;\r\n }\r\n\r\n /**\r\n * Load command from a relative path\r\n */\r\n public async load(relativePath: string): Promise<CLICommand | undefined> {\r\n const output = await filesOrchestrator.load<{ default: CLICommand }>(relativePath);\r\n\r\n return output?.default;\r\n }\r\n}\r\n\r\nexport const cliCommandsLoader = new CLICommandsLoader();\r\n"],"mappings":";;;;;;;;AAOA,IAAa,oBAAb,MAA+B;;;;CAI7B,MAAa,OAAO,aAAsD;EAGxE,MAAM,iBAAgB,MAFF,sBAAsB,QAAQ,KAAK,GAAG,wBAAwB,EAEvD,CAAC,KAAK,SAAS,KAAK,WAAW,IAAI,CAAC;EAE/D,KAAK,MAAM,gBAAgB,eAAe;GACxC,MAAM,UAAU,MAAM,KAAK,KAAK,YAAY;GAC5C,IAAI,SAAS;IACX,QAAQ,cAAc,YAAY;IAClC,IAAI,sBAAsB,QAAQ,MAAM,WAAW,GACjD,OAAO;GAEX;EACF;CAGF;;;;;CAMA,MAAa,UAAiC;EAE5C,MAAM,iBAAgB,MADF,sBAAsB,QAAQ,KAAK,GAAG,wBAAwB,EACvD,CAAC,KAAK,SAAS,KAAK,WAAW,IAAI,CAAC;EAC/D,MAAM,WAAyB,CAAC;EAEhC,KAAK,MAAM,gBAAgB,eAAe;GACxC,MAAM,UAAU,MAAM,KAAK,KAAK,YAAY;GAC5C,IAAI,SAAS;IACX,QAAQ,cAAc,YAAY;IAClC,SAAS,KAAK,OAAO;GACvB;EACF;EAEA,OAAO;CACT;;;;CAKA,MAAa,KAAK,cAAuD;EAGvE,QAAO,MAFc,kBAAkB,KAA8B,YAAY,EAEpE,EAAE;CACjB;AACF;AAEA,MAAa,oBAAoB,IAAI,kBAAkB"}
1
+ {"version":3,"file":"commands-loader.mjs","names":[],"sources":["C:/Work/Warlock.js/core/src/cli/commands-loader.ts"],"sourcesContent":["import { filesOrchestrator } from \"../dev-server/files-orchestrator\";\r\nimport { Path } from \"../utils/normalized-path\";\r\nimport { getFilesFromDirectory } from \"../dev-server/utils\";\r\nimport { srcPath } from \"../utils\";\r\nimport { CLICommand } from \"../commands/cli-command\";\r\nimport { isMatchingCommandName } from \"./cli-commands.utils\";\r\n\r\nexport class CLICommandsLoader {\r\n /**\r\n * Locate command by name\r\n */\r\n public async locate(commandName: string): Promise<CLICommand | undefined> {\r\n const files = await getFilesFromDirectory(srcPath(\"app\"), \"**/commands/*.{ts,tsx}\");\r\n // now convert them into relative paths\r\n const relativeFiles = files.map((path) => Path.toRelative(path));\r\n\r\n for (const relativeFile of relativeFiles) {\r\n const command = await this.load(relativeFile);\r\n if (command) {\r\n command.$relativePath(relativeFile);\r\n if (isMatchingCommandName(command.name, commandName)) {\r\n return command;\r\n }\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n /**\r\n * Scan all project commands and return them\r\n * Used for warm cache functionality\r\n */\r\n public async scanAll(): Promise<CLICommand[]> {\r\n const files = await getFilesFromDirectory(srcPath(\"app\"), \"**/commands/*.{ts,tsx}\");\r\n const relativeFiles = files.map((path) => Path.toRelative(path));\r\n const commands: CLICommand[] = [];\r\n\r\n for (const relativeFile of relativeFiles) {\r\n const command = await this.load(relativeFile);\r\n if (command) {\r\n command.$relativePath(relativeFile);\r\n commands.push(command);\r\n }\r\n }\r\n\r\n return commands;\r\n }\r\n\r\n /**\r\n * Load command from a relative path\r\n */\r\n public async load(relativePath: string): Promise<CLICommand | undefined> {\r\n const output = await filesOrchestrator.load<{ default: CLICommand }>(relativePath);\r\n\r\n return output?.default;\r\n }\r\n}\r\n\r\nexport const cliCommandsLoader = new CLICommandsLoader();\r\n"],"mappings":";;;;;;;;AAOA,IAAa,oBAAb,MAA+B;;;;CAI7B,MAAa,OAAO,aAAsD;EAGxE,MAAM,iBAAgB,MAFF,sBAAsB,QAAQ,KAAK,GAAG,wBAAwB,GAEtD,KAAK,SAAS,KAAK,WAAW,IAAI,CAAC;EAE/D,KAAK,MAAM,gBAAgB,eAAe;GACxC,MAAM,UAAU,MAAM,KAAK,KAAK,YAAY;GAC5C,IAAI,SAAS;IACX,QAAQ,cAAc,YAAY;IAClC,IAAI,sBAAsB,QAAQ,MAAM,WAAW,GACjD,OAAO;GAEX;EACF;CAGF;;;;;CAMA,MAAa,UAAiC;EAE5C,MAAM,iBAAgB,MADF,sBAAsB,QAAQ,KAAK,GAAG,wBAAwB,GACtD,KAAK,SAAS,KAAK,WAAW,IAAI,CAAC;EAC/D,MAAM,WAAyB,CAAC;EAEhC,KAAK,MAAM,gBAAgB,eAAe;GACxC,MAAM,UAAU,MAAM,KAAK,KAAK,YAAY;GAC5C,IAAI,SAAS;IACX,QAAQ,cAAc,YAAY;IAClC,SAAS,KAAK,OAAO;GACvB;EACF;EAEA,OAAO;CACT;;;;CAKA,MAAa,KAAK,cAAuD;EAGvE,QAAO,MAFc,kBAAkB,KAA8B,YAAY,IAElE;CACjB;AACF;AAEA,MAAa,oBAAoB,IAAI,kBAAkB"}
@@ -6,19 +6,20 @@ import { doctorCommand } from "./commands/doctor.command.mjs";
6
6
  import { dropTablesCommand } from "./commands/drop-tables.command.mjs";
7
7
  import { generateCommand, generateControllerCommand, generateMigrationCommand, generateModelCommand, generateModuleCommand, generateRepositoryCommand, generateResourceCommand, generateServiceCommand } from "./commands/generate/generate.command.mjs";
8
8
  import { migrateCommand } from "./commands/migrate.command.mjs";
9
- import { routesCommand } from "./commands/routes.command.mjs";
9
+ import { routesCommand, routesDiffCommand } from "./commands/routes.command.mjs";
10
10
  import { seedCommand } from "./commands/seed.command.mjs";
11
11
  import { startProductionCommand } from "./commands/start-production.command.mjs";
12
12
  import { storagePutCommand } from "./commands/storage-put.command.mjs";
13
13
  import { typingsGeneratorCommand } from "./commands/typings-generator.command.mjs";
14
14
  import { updateCommand } from "./commands/update.command.mjs";
15
15
 
16
- //#region ../core/src/cli/framework-cli-commands.ts
16
+ //#region core/src/cli/framework-cli-commands.ts
17
17
  const frameworkCommands = [
18
18
  devServerCommand,
19
19
  typingsGeneratorCommand,
20
20
  doctorCommand,
21
21
  routesCommand,
22
+ routesDiffCommand,
22
23
  buildCommand,
23
24
  startProductionCommand,
24
25
  migrateCommand,