@warlock.js/core 3.0.40 → 4.0.2

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 (351) hide show
  1. package/cjs/code-quality/config.js +1 -7
  2. package/cjs/code-quality/config.js.map +1 -1
  3. package/cjs/code-quality/issue-tracker.js +1 -119
  4. package/cjs/code-quality/issue-tracker.js.map +1 -1
  5. package/cjs/dev2-server/config-handlers.d.ts +8 -0
  6. package/cjs/dev2-server/config-handlers.d.ts.map +1 -0
  7. package/cjs/dev2-server/config-handlers.js +56 -0
  8. package/cjs/dev2-server/config-handlers.js.map +1 -0
  9. package/cjs/dev2-server/config-loader.d.ts +61 -0
  10. package/cjs/dev2-server/config-loader.d.ts.map +1 -0
  11. package/cjs/dev2-server/config-loader.js +122 -0
  12. package/cjs/dev2-server/config-loader.js.map +1 -0
  13. package/cjs/dev2-server/connectors/base-connector.d.ts +49 -0
  14. package/cjs/dev2-server/connectors/base-connector.d.ts.map +1 -0
  15. package/cjs/dev2-server/connectors/base-connector.js +48 -0
  16. package/cjs/dev2-server/connectors/base-connector.js.map +1 -0
  17. package/cjs/dev2-server/connectors/cache-connector.d.ts +23 -0
  18. package/cjs/dev2-server/connectors/cache-connector.d.ts.map +1 -0
  19. package/cjs/dev2-server/connectors/cache-connector.js +35 -0
  20. package/cjs/dev2-server/connectors/cache-connector.js.map +1 -0
  21. package/cjs/dev2-server/connectors/database-connector.d.ts +23 -0
  22. package/cjs/dev2-server/connectors/database-connector.d.ts.map +1 -0
  23. package/cjs/dev2-server/connectors/database-connector.js +46 -0
  24. package/cjs/dev2-server/connectors/database-connector.js.map +1 -0
  25. package/cjs/dev2-server/connectors/http-connector.d.ts +29 -0
  26. package/cjs/dev2-server/connectors/http-connector.d.ts.map +1 -0
  27. package/cjs/dev2-server/connectors/http-connector.js +71 -0
  28. package/cjs/dev2-server/connectors/http-connector.js.map +1 -0
  29. package/cjs/dev2-server/connectors/index.d.ts +10 -0
  30. package/cjs/dev2-server/connectors/index.d.ts.map +1 -0
  31. package/cjs/dev2-server/connectors/types.d.ts +49 -0
  32. package/cjs/dev2-server/connectors/types.d.ts.map +1 -0
  33. package/cjs/dev2-server/connectors/types.js +9 -0
  34. package/cjs/dev2-server/connectors/types.js.map +1 -0
  35. package/cjs/dev2-server/dependency-graph.d.ts +93 -0
  36. package/cjs/dev2-server/dependency-graph.d.ts.map +1 -0
  37. package/cjs/dev2-server/dependency-graph.js +266 -0
  38. package/cjs/dev2-server/dependency-graph.js.map +1 -0
  39. package/cjs/dev2-server/dev-logger.d.ts +14 -0
  40. package/cjs/dev2-server/dev-logger.d.ts.map +1 -0
  41. package/cjs/dev2-server/dev-logger.js +105 -0
  42. package/cjs/dev2-server/dev-logger.js.map +1 -0
  43. package/cjs/dev2-server/development-server.d.ts +97 -0
  44. package/cjs/dev2-server/development-server.d.ts.map +1 -0
  45. package/cjs/dev2-server/development-server.js +224 -0
  46. package/cjs/dev2-server/development-server.js.map +1 -0
  47. package/cjs/dev2-server/events.d.ts +5 -0
  48. package/cjs/dev2-server/events.d.ts.map +1 -0
  49. package/cjs/dev2-server/events.js +4 -0
  50. package/cjs/dev2-server/events.js.map +1 -0
  51. package/cjs/dev2-server/file-event-handler.d.ts +58 -0
  52. package/cjs/dev2-server/file-event-handler.d.ts.map +1 -0
  53. package/cjs/dev2-server/file-event-handler.js +140 -0
  54. package/cjs/dev2-server/file-event-handler.js.map +1 -0
  55. package/cjs/dev2-server/file-manager.d.ts +115 -0
  56. package/cjs/dev2-server/file-manager.d.ts.map +1 -0
  57. package/cjs/dev2-server/file-manager.js +319 -0
  58. package/cjs/dev2-server/file-manager.js.map +1 -0
  59. package/cjs/dev2-server/file-operations.d.ts +54 -0
  60. package/cjs/dev2-server/file-operations.d.ts.map +1 -0
  61. package/cjs/dev2-server/file-operations.js +191 -0
  62. package/cjs/dev2-server/file-operations.js.map +1 -0
  63. package/cjs/dev2-server/files-orchestrator.d.ts +88 -0
  64. package/cjs/dev2-server/files-orchestrator.d.ts.map +1 -0
  65. package/cjs/dev2-server/files-orchestrator.js +273 -0
  66. package/cjs/dev2-server/files-orchestrator.js.map +1 -0
  67. package/cjs/dev2-server/files-watcher.d.ts +53 -0
  68. package/cjs/dev2-server/files-watcher.d.ts.map +1 -0
  69. package/cjs/dev2-server/files-watcher.js +88 -0
  70. package/cjs/dev2-server/files-watcher.js.map +1 -0
  71. package/cjs/dev2-server/flags.d.ts +10 -0
  72. package/cjs/dev2-server/flags.d.ts.map +1 -0
  73. package/cjs/dev2-server/flags.js +9 -0
  74. package/cjs/dev2-server/flags.js.map +1 -0
  75. package/cjs/dev2-server/health-checker.d.ts +3 -0
  76. package/cjs/dev2-server/health-checker.d.ts.map +1 -0
  77. package/cjs/dev2-server/health-checker.js +2 -0
  78. package/cjs/dev2-server/health-checker.js.map +1 -0
  79. package/cjs/dev2-server/import-transformer.d.ts +16 -0
  80. package/cjs/dev2-server/import-transformer.d.ts.map +1 -0
  81. package/cjs/dev2-server/import-transformer.js +248 -0
  82. package/cjs/dev2-server/import-transformer.js.map +1 -0
  83. package/cjs/dev2-server/index.d.ts +1 -0
  84. package/cjs/dev2-server/index.d.ts.map +1 -0
  85. package/cjs/dev2-server/layer-executor.d.ts +64 -0
  86. package/cjs/dev2-server/layer-executor.d.ts.map +1 -0
  87. package/cjs/dev2-server/layer-executor.js +292 -0
  88. package/cjs/dev2-server/layer-executor.js.map +1 -0
  89. package/cjs/dev2-server/manifest-manager.d.ts +80 -0
  90. package/cjs/dev2-server/manifest-manager.d.ts.map +1 -0
  91. package/cjs/dev2-server/manifest-manager.js +107 -0
  92. package/cjs/dev2-server/manifest-manager.js.map +1 -0
  93. package/cjs/dev2-server/module-loader.d.ts +100 -0
  94. package/cjs/dev2-server/module-loader.d.ts.map +1 -0
  95. package/cjs/dev2-server/module-loader.js +228 -0
  96. package/cjs/dev2-server/module-loader.js.map +1 -0
  97. package/cjs/dev2-server/package-json-manager.d.ts +16 -0
  98. package/cjs/dev2-server/package-json-manager.d.ts.map +1 -0
  99. package/cjs/dev2-server/package-json-manager.js +20 -0
  100. package/cjs/dev2-server/package-json-manager.js.map +1 -0
  101. package/cjs/dev2-server/parse-imports.d.ts +8 -0
  102. package/cjs/dev2-server/parse-imports.d.ts.map +1 -0
  103. package/cjs/dev2-server/parse-imports.js +322 -0
  104. package/cjs/dev2-server/parse-imports.js.map +1 -0
  105. package/cjs/dev2-server/path.d.ts +39 -0
  106. package/cjs/dev2-server/path.d.ts.map +1 -0
  107. package/cjs/dev2-server/path.js +56 -0
  108. package/cjs/dev2-server/path.js.map +1 -0
  109. package/cjs/dev2-server/runtime-import-helper.d.ts +9 -0
  110. package/cjs/dev2-server/runtime-import-helper.d.ts.map +1 -0
  111. package/cjs/dev2-server/runtime-import-helper.js +157 -0
  112. package/cjs/dev2-server/runtime-import-helper.js.map +1 -0
  113. package/cjs/dev2-server/special-files-collector.d.ts +114 -0
  114. package/cjs/dev2-server/special-files-collector.d.ts.map +1 -0
  115. package/cjs/dev2-server/special-files-collector.js +212 -0
  116. package/cjs/dev2-server/special-files-collector.js.map +1 -0
  117. package/cjs/dev2-server/start-development-server.d.ts +7 -0
  118. package/cjs/dev2-server/start-development-server.d.ts.map +1 -0
  119. package/cjs/dev2-server/start-development-server.js +21 -0
  120. package/cjs/dev2-server/start-development-server.js.map +1 -0
  121. package/cjs/dev2-server/transpile-file.d.ts +10 -0
  122. package/cjs/dev2-server/transpile-file.d.ts.map +1 -0
  123. package/cjs/dev2-server/transpile-file.js +31 -0
  124. package/cjs/dev2-server/transpile-file.js.map +1 -0
  125. package/cjs/dev2-server/tsconfig-manager.d.ts +45 -0
  126. package/cjs/dev2-server/tsconfig-manager.d.ts.map +1 -0
  127. package/cjs/dev2-server/tsconfig-manager.js +105 -0
  128. package/cjs/dev2-server/tsconfig-manager.js.map +1 -0
  129. package/cjs/dev2-server/types.d.ts +16 -0
  130. package/cjs/dev2-server/types.d.ts.map +1 -0
  131. package/cjs/dev2-server/utils.d.ts +8 -0
  132. package/cjs/dev2-server/utils.d.ts.map +1 -0
  133. package/cjs/dev2-server/utils.js +28 -0
  134. package/cjs/dev2-server/utils.js.map +1 -0
  135. package/cjs/router/route-registry.d.ts +4 -0
  136. package/cjs/router/route-registry.d.ts.map +1 -1
  137. package/cjs/router/route-registry.js +26 -7
  138. package/cjs/router/route-registry.js.map +1 -1
  139. package/cjs/router/router.d.ts +13 -8
  140. package/cjs/router/router.d.ts.map +1 -1
  141. package/cjs/router/router.js +73 -35
  142. package/cjs/router/router.js.map +1 -1
  143. package/cjs/router/types.d.ts +10 -2
  144. package/cjs/router/types.d.ts.map +1 -1
  145. package/cjs/starters/start-cli-server.js +1 -1
  146. package/cjs/starters/start-cli-server.js.map +1 -1
  147. package/cjs/starters/start-http-server.d.ts.map +1 -1
  148. package/cjs/starters/start-http-server.js +4 -99
  149. package/cjs/starters/start-http-server.js.map +1 -1
  150. package/esm/code-quality/config.js +1 -7
  151. package/esm/code-quality/config.js.map +1 -1
  152. package/esm/code-quality/issue-tracker.js +1 -119
  153. package/esm/code-quality/issue-tracker.js.map +1 -1
  154. package/esm/dev2-server/config-handlers.d.ts +8 -0
  155. package/esm/dev2-server/config-handlers.d.ts.map +1 -0
  156. package/esm/dev2-server/config-handlers.js +56 -0
  157. package/esm/dev2-server/config-handlers.js.map +1 -0
  158. package/esm/dev2-server/config-loader.d.ts +61 -0
  159. package/esm/dev2-server/config-loader.d.ts.map +1 -0
  160. package/esm/dev2-server/config-loader.js +122 -0
  161. package/esm/dev2-server/config-loader.js.map +1 -0
  162. package/esm/dev2-server/connectors/base-connector.d.ts +49 -0
  163. package/esm/dev2-server/connectors/base-connector.d.ts.map +1 -0
  164. package/esm/dev2-server/connectors/base-connector.js +48 -0
  165. package/esm/dev2-server/connectors/base-connector.js.map +1 -0
  166. package/esm/dev2-server/connectors/cache-connector.d.ts +23 -0
  167. package/esm/dev2-server/connectors/cache-connector.d.ts.map +1 -0
  168. package/esm/dev2-server/connectors/cache-connector.js +35 -0
  169. package/esm/dev2-server/connectors/cache-connector.js.map +1 -0
  170. package/esm/dev2-server/connectors/database-connector.d.ts +23 -0
  171. package/esm/dev2-server/connectors/database-connector.d.ts.map +1 -0
  172. package/esm/dev2-server/connectors/database-connector.js +46 -0
  173. package/esm/dev2-server/connectors/database-connector.js.map +1 -0
  174. package/esm/dev2-server/connectors/http-connector.d.ts +29 -0
  175. package/esm/dev2-server/connectors/http-connector.d.ts.map +1 -0
  176. package/esm/dev2-server/connectors/http-connector.js +71 -0
  177. package/esm/dev2-server/connectors/http-connector.js.map +1 -0
  178. package/esm/dev2-server/connectors/index.d.ts +10 -0
  179. package/esm/dev2-server/connectors/index.d.ts.map +1 -0
  180. package/esm/dev2-server/connectors/types.d.ts +49 -0
  181. package/esm/dev2-server/connectors/types.d.ts.map +1 -0
  182. package/esm/dev2-server/connectors/types.js +9 -0
  183. package/esm/dev2-server/connectors/types.js.map +1 -0
  184. package/esm/dev2-server/dependency-graph.d.ts +93 -0
  185. package/esm/dev2-server/dependency-graph.d.ts.map +1 -0
  186. package/esm/dev2-server/dependency-graph.js +266 -0
  187. package/esm/dev2-server/dependency-graph.js.map +1 -0
  188. package/esm/dev2-server/dev-logger.d.ts +14 -0
  189. package/esm/dev2-server/dev-logger.d.ts.map +1 -0
  190. package/esm/dev2-server/dev-logger.js +105 -0
  191. package/esm/dev2-server/dev-logger.js.map +1 -0
  192. package/esm/dev2-server/development-server.d.ts +97 -0
  193. package/esm/dev2-server/development-server.d.ts.map +1 -0
  194. package/esm/dev2-server/development-server.js +224 -0
  195. package/esm/dev2-server/development-server.js.map +1 -0
  196. package/esm/dev2-server/events.d.ts +5 -0
  197. package/esm/dev2-server/events.d.ts.map +1 -0
  198. package/esm/dev2-server/events.js +4 -0
  199. package/esm/dev2-server/events.js.map +1 -0
  200. package/esm/dev2-server/file-event-handler.d.ts +58 -0
  201. package/esm/dev2-server/file-event-handler.d.ts.map +1 -0
  202. package/esm/dev2-server/file-event-handler.js +140 -0
  203. package/esm/dev2-server/file-event-handler.js.map +1 -0
  204. package/esm/dev2-server/file-manager.d.ts +115 -0
  205. package/esm/dev2-server/file-manager.d.ts.map +1 -0
  206. package/esm/dev2-server/file-manager.js +319 -0
  207. package/esm/dev2-server/file-manager.js.map +1 -0
  208. package/esm/dev2-server/file-operations.d.ts +54 -0
  209. package/esm/dev2-server/file-operations.d.ts.map +1 -0
  210. package/esm/dev2-server/file-operations.js +191 -0
  211. package/esm/dev2-server/file-operations.js.map +1 -0
  212. package/esm/dev2-server/files-orchestrator.d.ts +88 -0
  213. package/esm/dev2-server/files-orchestrator.d.ts.map +1 -0
  214. package/esm/dev2-server/files-orchestrator.js +273 -0
  215. package/esm/dev2-server/files-orchestrator.js.map +1 -0
  216. package/esm/dev2-server/files-watcher.d.ts +53 -0
  217. package/esm/dev2-server/files-watcher.d.ts.map +1 -0
  218. package/esm/dev2-server/files-watcher.js +88 -0
  219. package/esm/dev2-server/files-watcher.js.map +1 -0
  220. package/esm/dev2-server/flags.d.ts +10 -0
  221. package/esm/dev2-server/flags.d.ts.map +1 -0
  222. package/esm/dev2-server/flags.js +9 -0
  223. package/esm/dev2-server/flags.js.map +1 -0
  224. package/esm/dev2-server/health-checker.d.ts +3 -0
  225. package/esm/dev2-server/health-checker.d.ts.map +1 -0
  226. package/esm/dev2-server/health-checker.js +2 -0
  227. package/esm/dev2-server/health-checker.js.map +1 -0
  228. package/esm/dev2-server/import-transformer.d.ts +16 -0
  229. package/esm/dev2-server/import-transformer.d.ts.map +1 -0
  230. package/esm/dev2-server/import-transformer.js +248 -0
  231. package/esm/dev2-server/import-transformer.js.map +1 -0
  232. package/esm/dev2-server/index.d.ts +1 -0
  233. package/esm/dev2-server/index.d.ts.map +1 -0
  234. package/esm/dev2-server/layer-executor.d.ts +64 -0
  235. package/esm/dev2-server/layer-executor.d.ts.map +1 -0
  236. package/esm/dev2-server/layer-executor.js +292 -0
  237. package/esm/dev2-server/layer-executor.js.map +1 -0
  238. package/esm/dev2-server/manifest-manager.d.ts +80 -0
  239. package/esm/dev2-server/manifest-manager.d.ts.map +1 -0
  240. package/esm/dev2-server/manifest-manager.js +107 -0
  241. package/esm/dev2-server/manifest-manager.js.map +1 -0
  242. package/esm/dev2-server/module-loader.d.ts +100 -0
  243. package/esm/dev2-server/module-loader.d.ts.map +1 -0
  244. package/esm/dev2-server/module-loader.js +228 -0
  245. package/esm/dev2-server/module-loader.js.map +1 -0
  246. package/esm/dev2-server/package-json-manager.d.ts +16 -0
  247. package/esm/dev2-server/package-json-manager.d.ts.map +1 -0
  248. package/esm/dev2-server/package-json-manager.js +20 -0
  249. package/esm/dev2-server/package-json-manager.js.map +1 -0
  250. package/esm/dev2-server/parse-imports.d.ts +8 -0
  251. package/esm/dev2-server/parse-imports.d.ts.map +1 -0
  252. package/esm/dev2-server/parse-imports.js +322 -0
  253. package/esm/dev2-server/parse-imports.js.map +1 -0
  254. package/esm/dev2-server/path.d.ts +39 -0
  255. package/esm/dev2-server/path.d.ts.map +1 -0
  256. package/esm/dev2-server/path.js +56 -0
  257. package/esm/dev2-server/path.js.map +1 -0
  258. package/esm/dev2-server/runtime-import-helper.d.ts +9 -0
  259. package/esm/dev2-server/runtime-import-helper.d.ts.map +1 -0
  260. package/esm/dev2-server/runtime-import-helper.js +157 -0
  261. package/esm/dev2-server/runtime-import-helper.js.map +1 -0
  262. package/esm/dev2-server/special-files-collector.d.ts +114 -0
  263. package/esm/dev2-server/special-files-collector.d.ts.map +1 -0
  264. package/esm/dev2-server/special-files-collector.js +212 -0
  265. package/esm/dev2-server/special-files-collector.js.map +1 -0
  266. package/esm/dev2-server/start-development-server.d.ts +7 -0
  267. package/esm/dev2-server/start-development-server.d.ts.map +1 -0
  268. package/esm/dev2-server/start-development-server.js +21 -0
  269. package/esm/dev2-server/start-development-server.js.map +1 -0
  270. package/esm/dev2-server/transpile-file.d.ts +10 -0
  271. package/esm/dev2-server/transpile-file.d.ts.map +1 -0
  272. package/esm/dev2-server/transpile-file.js +31 -0
  273. package/esm/dev2-server/transpile-file.js.map +1 -0
  274. package/esm/dev2-server/tsconfig-manager.d.ts +45 -0
  275. package/esm/dev2-server/tsconfig-manager.d.ts.map +1 -0
  276. package/esm/dev2-server/tsconfig-manager.js +105 -0
  277. package/esm/dev2-server/tsconfig-manager.js.map +1 -0
  278. package/esm/dev2-server/types.d.ts +16 -0
  279. package/esm/dev2-server/types.d.ts.map +1 -0
  280. package/esm/dev2-server/utils.d.ts +8 -0
  281. package/esm/dev2-server/utils.d.ts.map +1 -0
  282. package/esm/dev2-server/utils.js +28 -0
  283. package/esm/dev2-server/utils.js.map +1 -0
  284. package/esm/router/route-registry.d.ts +4 -0
  285. package/esm/router/route-registry.d.ts.map +1 -1
  286. package/esm/router/route-registry.js +26 -7
  287. package/esm/router/route-registry.js.map +1 -1
  288. package/esm/router/router.d.ts +13 -8
  289. package/esm/router/router.d.ts.map +1 -1
  290. package/esm/router/router.js +73 -35
  291. package/esm/router/router.js.map +1 -1
  292. package/esm/router/types.d.ts +10 -2
  293. package/esm/router/types.d.ts.map +1 -1
  294. package/esm/starters/start-cli-server.js +1 -1
  295. package/esm/starters/start-cli-server.js.map +1 -1
  296. package/esm/starters/start-http-server.d.ts.map +1 -1
  297. package/esm/starters/start-http-server.js +4 -99
  298. package/esm/starters/start-http-server.js.map +1 -1
  299. package/package.json +3 -3
  300. package/cjs/code-quality/checkers/eslint-checker.js +0 -39
  301. package/cjs/code-quality/checkers/eslint-checker.js.map +0 -1
  302. package/cjs/code-quality/checkers/typescript-checker.js +0 -76
  303. package/cjs/code-quality/checkers/typescript-checker.js.map +0 -1
  304. package/cjs/code-quality/formatters/eslint-formatter.js +0 -56
  305. package/cjs/code-quality/formatters/eslint-formatter.js.map +0 -1
  306. package/cjs/code-quality/formatters/summary-formatter.js +0 -102
  307. package/cjs/code-quality/formatters/summary-formatter.js.map +0 -1
  308. package/cjs/code-quality/formatters/typescript-formatter.js +0 -64
  309. package/cjs/code-quality/formatters/typescript-formatter.js.map +0 -1
  310. package/cjs/code-quality/project-scanner.js +0 -78
  311. package/cjs/code-quality/project-scanner.js.map +0 -1
  312. package/cjs/code-quality/single-file-checker.js +0 -153
  313. package/cjs/code-quality/single-file-checker.js.map +0 -1
  314. package/cjs/dev-server/file-health.d.ts +0 -9
  315. package/cjs/dev-server/file-health.d.ts.map +0 -1
  316. package/cjs/dev-server/file-manager.d.ts +0 -39
  317. package/cjs/dev-server/file-manager.d.ts.map +0 -1
  318. package/cjs/dev-server/files-orchestrator.d.ts +0 -1
  319. package/cjs/dev-server/files-orchestrator.d.ts.map +0 -1
  320. package/cjs/dev-server/types.d.ts +0 -2
  321. package/cjs/dev-server/types.d.ts.map +0 -1
  322. package/cjs/starters/http-server-starter.js +0 -34
  323. package/cjs/starters/http-server-starter.js.map +0 -1
  324. package/cjs/utils/internal.js +0 -3
  325. package/cjs/utils/internal.js.map +0 -1
  326. package/esm/code-quality/checkers/eslint-checker.js +0 -39
  327. package/esm/code-quality/checkers/eslint-checker.js.map +0 -1
  328. package/esm/code-quality/checkers/typescript-checker.js +0 -76
  329. package/esm/code-quality/checkers/typescript-checker.js.map +0 -1
  330. package/esm/code-quality/formatters/eslint-formatter.js +0 -56
  331. package/esm/code-quality/formatters/eslint-formatter.js.map +0 -1
  332. package/esm/code-quality/formatters/summary-formatter.js +0 -102
  333. package/esm/code-quality/formatters/summary-formatter.js.map +0 -1
  334. package/esm/code-quality/formatters/typescript-formatter.js +0 -64
  335. package/esm/code-quality/formatters/typescript-formatter.js.map +0 -1
  336. package/esm/code-quality/project-scanner.js +0 -78
  337. package/esm/code-quality/project-scanner.js.map +0 -1
  338. package/esm/code-quality/single-file-checker.js +0 -153
  339. package/esm/code-quality/single-file-checker.js.map +0 -1
  340. package/esm/dev-server/file-health.d.ts +0 -9
  341. package/esm/dev-server/file-health.d.ts.map +0 -1
  342. package/esm/dev-server/file-manager.d.ts +0 -39
  343. package/esm/dev-server/file-manager.d.ts.map +0 -1
  344. package/esm/dev-server/files-orchestrator.d.ts +0 -1
  345. package/esm/dev-server/files-orchestrator.d.ts.map +0 -1
  346. package/esm/dev-server/types.d.ts +0 -2
  347. package/esm/dev-server/types.d.ts.map +0 -1
  348. package/esm/starters/http-server-starter.js +0 -34
  349. package/esm/starters/http-server-starter.js.map +0 -1
  350. package/esm/utils/internal.js +0 -3
  351. package/esm/utils/internal.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/dev2-server/path.ts"],"names":[],"mappings":"AAEA,qBAAa,IAAI;IACf;;OAEG;WACW,UAAU,CAAC,YAAY,EAAE,MAAM;IAI7C;;OAEG;WACW,QAAQ,CAAC,YAAY,EAAE,MAAM;IAI3C;;OAEG;WACW,oBAAoB,CAAC,YAAY,EAAE,MAAM;IAIvD;;OAEG;WACW,UAAU,CAAC,YAAY,EAAE,MAAM;IAI7C;;OAEG;WACW,SAAS,CAAC,QAAQ,EAAE,MAAM;IAIxC;;OAEG;WACW,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE;IAIrC;;OAEG;WACW,OAAO,CAAC,QAAQ,EAAE,MAAM;IAItC;;OAEG;WACW,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAIrD;;OAEG;WACW,OAAO,CAAC,QAAQ,EAAE,MAAM;CAGvC"}
@@ -0,0 +1,56 @@
1
+ import path from'node:path';class Path {
2
+ /**
3
+ * Convert the given absolute path to a relative path
4
+ */
5
+ static toRelative(absolutePath) {
6
+ return this.normalize(path.relative(process.cwd(), absolutePath));
7
+ }
8
+ /**
9
+ * Get relative path of the given path
10
+ */
11
+ static relative(relativePath) {
12
+ return this.normalize(path.relative(process.cwd(), relativePath));
13
+ }
14
+ /**
15
+ * Get normalized absolute path of the given path
16
+ */
17
+ static toNormalizedAbsolute(relativePath) {
18
+ return this.normalize(path.resolve(process.cwd(), relativePath));
19
+ }
20
+ /**
21
+ * Get absolute path of the given path
22
+ */
23
+ static toAbsolute(relativePath) {
24
+ return this.normalize(path.resolve(process.cwd(), relativePath));
25
+ }
26
+ /**
27
+ * Normalize the given path (convert backslashes to forward slashes)
28
+ */
29
+ static normalize(filePath) {
30
+ return filePath.replace(/\\/g, "/");
31
+ }
32
+ /**
33
+ * Join paths and normalize
34
+ */
35
+ static join(...paths) {
36
+ return this.normalize(path.join(...paths));
37
+ }
38
+ /**
39
+ * Get directory name of a path
40
+ */
41
+ static dirname(filePath) {
42
+ return this.normalize(path.dirname(filePath));
43
+ }
44
+ /**
45
+ * Get base name of a path
46
+ */
47
+ static basename(filePath, ext) {
48
+ return path.basename(filePath, ext);
49
+ }
50
+ /**
51
+ * Get extension of a path
52
+ */
53
+ static extname(filePath) {
54
+ return path.extname(filePath);
55
+ }
56
+ }export{Path};//# sourceMappingURL=path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path.js","sources":["../../src/dev2-server/path.ts"],"sourcesContent":[null],"names":[],"mappings":"kCAEa,IAAI,CAAA;AACf;;AAEG;IACI,OAAO,UAAU,CAAC,YAAoB,EAAA;AAC3C,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;KACnE;AAED;;AAEG;IACI,OAAO,QAAQ,CAAC,YAAoB,EAAA;AACzC,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;KACnE;AAED;;AAEG;IACI,OAAO,oBAAoB,CAAC,YAAoB,EAAA;AACrD,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;KAClE;AAED;;AAEG;IACI,OAAO,UAAU,CAAC,YAAoB,EAAA;AAC3C,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;KAClE;AAED;;AAEG;IACI,OAAO,SAAS,CAAC,QAAgB,EAAA;QACtC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACrC;AAED;;AAEG;AACI,IAAA,OAAO,IAAI,CAAC,GAAG,KAAe,EAAA;AACnC,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;KAC5C;AAED;;AAEG;IACI,OAAO,OAAO,CAAC,QAAgB,EAAA;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC/C;AAED;;AAEG;AACI,IAAA,OAAO,QAAQ,CAAC,QAAgB,EAAE,GAAY,EAAA;QACnD,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;KACrC;AAED;;AAEG;IACI,OAAO,OAAO,CAAC,QAAgB,EAAA;AACpC,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC/B;AACF"}
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ var __import: (modulePath: string) => Promise<any>;
3
+ var __updateModuleVersion: (modulePath: string, timestamp?: number) => void;
4
+ var __clearModuleVersion: (modulePath: string) => void;
5
+ var __clearAllModuleVersions: () => void;
6
+ var __getModuleVersion: (modulePath: string) => number | undefined;
7
+ }
8
+ export declare function initializeRuntimeImportHelper(): void;
9
+ //# sourceMappingURL=runtime-import-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-import-helper.d.ts","sourceRoot":"","sources":["../../src/dev2-server/runtime-import-helper.ts"],"names":[],"mappings":"AA4LA,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnD,IAAI,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,IAAI,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,IAAI,wBAAwB,EAAE,MAAM,IAAI,CAAC;IACzC,IAAI,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CACpE;AAGD,wBAAgB,6BAA6B,IAAI,IAAI,CAMpD"}
@@ -0,0 +1,157 @@
1
+ import {pathToFileURL}from'node:url';import {warlockCachePath}from'./utils.js';/**
2
+ * Runtime Import Helper
3
+ *
4
+ * This module provides a global __import function that handles cache busting
5
+ * for HMR. Instead of static imports, we transform them to use this helper
6
+ * which appends timestamps to force module reloads.
7
+ *
8
+ * Example transformation:
9
+ * FROM: import { foo } from "./bar.js"
10
+ * TO: const { foo } = await __import("./bar.js")
11
+ */
12
+ /**
13
+ * Module version registry
14
+ * Maps module paths to their current version timestamp
15
+ */
16
+ const moduleVersions = new Map();
17
+ /**
18
+ * Modules currently being loaded
19
+ * Used to detect and handle circular dependencies
20
+ */
21
+ const loadingModules = new Set();
22
+ /**
23
+ * Module import promise cache
24
+ * Maps module paths to their import promises
25
+ * Prevents duplicate imports and handles circular dependencies
26
+ */
27
+ const modulePromises = new Map();
28
+ /**
29
+ * Get last version of timestamp for a module
30
+ * if not found set it then return it
31
+ */
32
+ function useModuleVersion(modulePath) {
33
+ const cleanPath = modulePath.startsWith("./")
34
+ ? modulePath.slice(2)
35
+ : modulePath;
36
+ if (!moduleVersions.has(cleanPath)) {
37
+ moduleVersions.set(cleanPath, Date.now());
38
+ }
39
+ return moduleVersions.get(cleanPath);
40
+ }
41
+ /**
42
+ * Dynamic import with cache busting and circular dependency protection
43
+ *
44
+ * @param modulePath - The relative cache path (e.g., "./src-app-users-shared-utils.js")
45
+ * @returns The imported module
46
+ */
47
+ async function __import(modulePath) {
48
+ // Normalize the module path (remove leading "./" if present)
49
+ const cleanPath = modulePath.startsWith("./")
50
+ ? modulePath.slice(2)
51
+ : modulePath;
52
+ // Check if this module is already being loaded (circular dependency detected)
53
+ if (loadingModules.has(cleanPath)) {
54
+ // Return the existing promise - this prevents deadlock
55
+ // The promise should already be cached since we cache it before marking as loading
56
+ const existingPromise = modulePromises.get(cleanPath);
57
+ if (existingPromise) {
58
+ return existingPromise;
59
+ }
60
+ // This should rarely happen, but handle the edge case where promise isn't cached yet
61
+ // This can occur in a race condition scenario
62
+ throw new Error(`Circular dependency detected: Module "${cleanPath}" is being loaded but no promise is cached. This may indicate a timing issue in module loading.`);
63
+ }
64
+ // Get the current version timestamp for this module
65
+ const timestamp = useModuleVersion(modulePath);
66
+ // Resolve the module path relative to the cache directory
67
+ const absolutePath = warlockCachePath(cleanPath);
68
+ // Convert to file:// URL for cross-platform compatibility
69
+ const fileUrl = pathToFileURL(absolutePath).href;
70
+ // Append timestamp as query parameter to bust cache
71
+ const moduleUrl = `${fileUrl}?t=${timestamp}`;
72
+ // Create the import promise and cache it BEFORE marking as loading
73
+ // This ensures circular dependencies can always find the promise
74
+ const importPromise = import(moduleUrl);
75
+ modulePromises.set(cleanPath, importPromise);
76
+ // Mark module as loading AFTER caching the promise
77
+ // This order is critical for circular dependency handling
78
+ loadingModules.add(cleanPath);
79
+ try {
80
+ // Wait for the import to complete
81
+ const module = await importPromise;
82
+ return module;
83
+ }
84
+ catch (error) {
85
+ // Remove from cache on error so it can be retried
86
+ modulePromises.delete(cleanPath);
87
+ throw error;
88
+ }
89
+ finally {
90
+ // Mark module as no longer loading
91
+ loadingModules.delete(cleanPath);
92
+ }
93
+ }
94
+ /**
95
+ * Update the version timestamp for a module
96
+ * This forces the next import to load a fresh version
97
+ *
98
+ * @param modulePath - The path to the module
99
+ * @param timestamp - Optional timestamp (defaults to current time)
100
+ */
101
+ function __updateModuleVersion(modulePath, timestamp) {
102
+ // Normalize the module path
103
+ const cleanPath = modulePath.startsWith("./")
104
+ ? modulePath.slice(2)
105
+ : modulePath;
106
+ // Update the version timestamp
107
+ moduleVersions.set(modulePath, timestamp || Date.now());
108
+ // Clear the cached promise so the new version gets loaded
109
+ // Only clear if the module is not currently loading (to avoid breaking circular deps)
110
+ if (!loadingModules.has(cleanPath)) {
111
+ modulePromises.delete(cleanPath);
112
+ }
113
+ }
114
+ /**
115
+ * Clear version for a module (reset to default behavior)
116
+ *
117
+ * @param modulePath - The path to the module
118
+ */
119
+ function __clearModuleVersion(modulePath) {
120
+ const cleanPath = modulePath.startsWith("./")
121
+ ? modulePath.slice(2)
122
+ : modulePath;
123
+ moduleVersions.delete(modulePath);
124
+ // Clear cached promise if not currently loading
125
+ if (!loadingModules.has(cleanPath)) {
126
+ modulePromises.delete(cleanPath);
127
+ }
128
+ }
129
+ /**
130
+ * Clear all module versions and caches
131
+ */
132
+ function __clearAllModuleVersions() {
133
+ moduleVersions.clear();
134
+ // Clear all cached promises that aren't currently loading
135
+ for (const [path] of modulePromises) {
136
+ if (!loadingModules.has(path)) {
137
+ modulePromises.delete(path);
138
+ }
139
+ }
140
+ }
141
+ /**
142
+ * Get current version timestamp for a module
143
+ *
144
+ * @param modulePath - The path to the module
145
+ * @returns The timestamp or undefined if not set
146
+ */
147
+ function __getModuleVersion(modulePath) {
148
+ return moduleVersions.get(modulePath);
149
+ }
150
+ // Export for initialization
151
+ function initializeRuntimeImportHelper() {
152
+ global.__import = __import;
153
+ global.__updateModuleVersion = __updateModuleVersion;
154
+ global.__clearModuleVersion = __clearModuleVersion;
155
+ global.__clearAllModuleVersions = __clearAllModuleVersions;
156
+ global.__getModuleVersion = __getModuleVersion;
157
+ }export{initializeRuntimeImportHelper};//# sourceMappingURL=runtime-import-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-import-helper.js","sources":["../../src/dev2-server/runtime-import-helper.ts"],"sourcesContent":[null],"names":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,CAAC,IAAI,CAAC;AAC3C,UAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;UACnB,UAAU,CAAC;AAEf,IAAA,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;;AAGlC,IAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;AAClC,QAAA,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAClC,KAAA;AACH,CAAC;AAED;;AAEG;AACH,SAAS,wBAAwB,GAAA;IAC/B,cAAc,CAAC,KAAK,EAAE,CAAC;;AAGvB,IAAA,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,EAAE;AACnC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AAC7B,YAAA,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC7B,SAAA;AACF,KAAA;AACH,CAAC;AAED;;;;;AAKG;AACH,SAAS,kBAAkB,CAAC,UAAkB,EAAA;AAC5C,IAAA,OAAO,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxC,CAAC;AAWD;SACgB,6BAA6B,GAAA;AAC1C,IAAA,MAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnC,IAAA,MAAc,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;AAC7D,IAAA,MAAc,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;AAC3D,IAAA,MAAc,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AACnE,IAAA,MAAc,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AAC1D"}
@@ -0,0 +1,114 @@
1
+ import { FileManager } from "./file-manager";
2
+ /**
3
+ * Special File Types
4
+ */
5
+ export type SpecialFileType = "config" | "main" | "route" | "event" | "locale";
6
+ /**
7
+ * Special Files Collector
8
+ * Detects and categorizes special files in the project
9
+ * Provides query APIs for accessing special files by type
10
+ */
11
+ export declare class SpecialFilesCollector {
12
+ /**
13
+ * Categorized special files
14
+ */
15
+ private readonly configFiles;
16
+ private readonly mainFiles;
17
+ private readonly routeFiles;
18
+ private readonly eventFiles;
19
+ private readonly localeFiles;
20
+ /**
21
+ * Collect special files from all tracked files
22
+ * @param files Map of all tracked files
23
+ */
24
+ collect(files: Map<string, FileManager>): void;
25
+ /**
26
+ * Categorize a single file
27
+ * @param relativePath Relative path of the file
28
+ * @param fileManager FileManager instance
29
+ */
30
+ private categorizeFile;
31
+ /**
32
+ * Check if file is a config file
33
+ * Pattern: src/config/$config.ts
34
+ */
35
+ private isConfigFile;
36
+ /**
37
+ * Check if file is a main file
38
+ * Pattern: src/app/$module/main.ts
39
+ */
40
+ private isMainFile;
41
+ /**
42
+ * Check if file is a route file
43
+ * Pattern: src/app/$module/routes.ts
44
+ */
45
+ private isRouteFile;
46
+ /**
47
+ * Check if file is an event file
48
+ * Pattern: src/app/$module/events/$event.ts
49
+ */
50
+ private isEventFile;
51
+ /**
52
+ * Check if file is a locale file
53
+ * Pattern: src/app/$module/utils/locales.ts
54
+ */
55
+ private isLocaleFile;
56
+ /**
57
+ * Add a new file to the appropriate collection
58
+ * @param fileManager FileManager instance
59
+ */
60
+ addFile(fileManager: FileManager): void;
61
+ /**
62
+ * Remove a file from all collections
63
+ * @param relativePath Relative path of the file
64
+ */
65
+ removeFile(relativePath: string): void;
66
+ /**
67
+ * Update a file in the collections
68
+ * @param fileManager FileManager instance
69
+ */
70
+ updateFile(fileManager: FileManager): void;
71
+ /**
72
+ * Get all config files
73
+ * @returns Array of FileManager instances
74
+ */
75
+ getConfigFiles(): FileManager[];
76
+ /**
77
+ * Get all main files
78
+ * Sort order does not matter here
79
+ * @TODO later we can allow export const priority from the main file itself
80
+ * @returns Array of FileManager instances
81
+ */
82
+ getMainFiles(): FileManager[];
83
+ /**
84
+ * Get all route files
85
+ * Sorted alphabetically by path
86
+ * @returns Array of FileManager instances
87
+ */
88
+ getRouteFiles(): FileManager[];
89
+ /**
90
+ * Get all event files
91
+ * @returns Array of FileManager instances
92
+ */
93
+ getEventFiles(): FileManager[];
94
+ /**
95
+ * Get all locale files
96
+ * @returns Array of FileManager instances
97
+ */
98
+ getLocaleFiles(): FileManager[];
99
+ /**
100
+ * Get statistics about collected special files
101
+ */
102
+ getStats(): Record<SpecialFileType, number>;
103
+ /**
104
+ * Check if a file is a special file
105
+ * @param relativePath Relative path of the file
106
+ * @returns Special file type or null
107
+ */
108
+ getFileType(relativePath: string): SpecialFileType | null;
109
+ /**
110
+ * Clear all collections
111
+ */
112
+ clear(): void;
113
+ }
114
+ //# sourceMappingURL=special-files-collector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"special-files-collector.d.ts","sourceRoot":"","sources":["../../src/dev2-server/special-files-collector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE/E;;;;GAIG;AACH,qBAAa,qBAAqB;IAChC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;IAC7D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;IAC7D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAE9D;;;OAGG;IACI,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,IAAI;IAcrD;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAgCtB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAIpB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAOlB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAInB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAIpB;;;OAGG;IACI,OAAO,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAK9C;;;OAGG;IACI,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAQ7C;;;OAGG;IACI,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAUjD;;;OAGG;IACI,cAAc,IAAI,WAAW,EAAE;IAItC;;;;;OAKG;IACI,YAAY,IAAI,WAAW,EAAE;IAIpC;;;;OAIG;IACI,aAAa,IAAI,WAAW,EAAE;IAUrC;;;OAGG;IACI,aAAa,IAAI,WAAW,EAAE;IAIrC;;;OAGG;IACI,cAAc,IAAI,WAAW,EAAE;IAItC;;OAEG;IACI,QAAQ,IAAI,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC;IAUlD;;;;OAIG;IACI,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI;IAUhE;;OAEG;IACI,KAAK,IAAI,IAAI;CAOrB"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Special Files Collector
3
+ * Detects and categorizes special files in the project
4
+ * Provides query APIs for accessing special files by type
5
+ */
6
+ class SpecialFilesCollector {
7
+ /**
8
+ * Categorized special files
9
+ */
10
+ configFiles = new Map();
11
+ mainFiles = new Map();
12
+ routeFiles = new Map();
13
+ eventFiles = new Map();
14
+ localeFiles = new Map();
15
+ /**
16
+ * Collect special files from all tracked files
17
+ * @param files Map of all tracked files
18
+ */
19
+ collect(files) {
20
+ // Clear existing collections
21
+ this.configFiles.clear();
22
+ this.mainFiles.clear();
23
+ this.routeFiles.clear();
24
+ this.eventFiles.clear();
25
+ this.localeFiles.clear();
26
+ // Categorize each file
27
+ for (const [relativePath, fileManager] of files) {
28
+ this.categorizeFile(relativePath, fileManager);
29
+ }
30
+ }
31
+ /**
32
+ * Categorize a single file
33
+ * @param relativePath Relative path of the file
34
+ * @param fileManager FileManager instance
35
+ */
36
+ categorizeFile(relativePath, fileManager) {
37
+ // Config files: src/config/**/*.{ts,tsx}
38
+ if (this.isConfigFile(relativePath)) {
39
+ this.configFiles.set(relativePath, fileManager);
40
+ return;
41
+ }
42
+ // Main files: src/app/**/main.{ts,tsx}
43
+ if (this.isMainFile(relativePath)) {
44
+ this.mainFiles.set(relativePath, fileManager);
45
+ return;
46
+ }
47
+ // Route files: src/app/**/routes.{ts,tsx}
48
+ if (this.isRouteFile(relativePath)) {
49
+ this.routeFiles.set(relativePath, fileManager);
50
+ return;
51
+ }
52
+ // Event files: src/app/**/events/**/*.{ts,tsx}
53
+ if (this.isEventFile(relativePath)) {
54
+ this.eventFiles.set(relativePath, fileManager);
55
+ return;
56
+ }
57
+ // Locale files: src/app/**/utils/locales.{ts,tsx}
58
+ if (this.isLocaleFile(relativePath)) {
59
+ this.localeFiles.set(relativePath, fileManager);
60
+ return;
61
+ }
62
+ }
63
+ /**
64
+ * Check if file is a config file
65
+ * Pattern: src/config/$config.ts
66
+ */
67
+ isConfigFile(path) {
68
+ return /^src\/config\/.*\.(ts|tsx)$/.test(path);
69
+ }
70
+ /**
71
+ * Check if file is a main file
72
+ * Pattern: src/app/$module/main.ts
73
+ */
74
+ isMainFile(path) {
75
+ return (/^src\/app\/[^/]+\/main\.(ts|tsx)$/.test(path) ||
76
+ ["src/app/main.ts", "src/app/main.tsx"].includes(path));
77
+ }
78
+ /**
79
+ * Check if file is a route file
80
+ * Pattern: src/app/$module/routes.ts
81
+ */
82
+ isRouteFile(path) {
83
+ return /^src\/app\/[^/]+\/routes\.(ts|tsx)$/.test(path);
84
+ }
85
+ /**
86
+ * Check if file is an event file
87
+ * Pattern: src/app/$module/events/$event.ts
88
+ */
89
+ isEventFile(path) {
90
+ return /^src\/app\/[^/]+\/events\/[^/]+\.(ts|tsx)$/.test(path);
91
+ }
92
+ /**
93
+ * Check if file is a locale file
94
+ * Pattern: src/app/$module/utils/locales.ts
95
+ */
96
+ isLocaleFile(path) {
97
+ return /^src\/app\/[^/]+\/utils\/locales\.(ts|tsx)$/.test(path);
98
+ }
99
+ /**
100
+ * Add a new file to the appropriate collection
101
+ * @param fileManager FileManager instance
102
+ */
103
+ addFile(fileManager) {
104
+ const relativePath = fileManager.relativePath;
105
+ this.categorizeFile(relativePath, fileManager);
106
+ }
107
+ /**
108
+ * Remove a file from all collections
109
+ * @param relativePath Relative path of the file
110
+ */
111
+ removeFile(relativePath) {
112
+ this.configFiles.delete(relativePath);
113
+ this.mainFiles.delete(relativePath);
114
+ this.routeFiles.delete(relativePath);
115
+ this.eventFiles.delete(relativePath);
116
+ this.localeFiles.delete(relativePath);
117
+ }
118
+ /**
119
+ * Update a file in the collections
120
+ * @param fileManager FileManager instance
121
+ */
122
+ updateFile(fileManager) {
123
+ const relativePath = fileManager.relativePath;
124
+ // Remove from all collections first
125
+ this.removeFile(relativePath);
126
+ // Re-categorize
127
+ this.categorizeFile(relativePath, fileManager);
128
+ }
129
+ /**
130
+ * Get all config files
131
+ * @returns Array of FileManager instances
132
+ */
133
+ getConfigFiles() {
134
+ return Array.from(this.configFiles.values());
135
+ }
136
+ /**
137
+ * Get all main files
138
+ * Sort order does not matter here
139
+ * @TODO later we can allow export const priority from the main file itself
140
+ * @returns Array of FileManager instances
141
+ */
142
+ getMainFiles() {
143
+ return Array.from(this.mainFiles.values());
144
+ }
145
+ /**
146
+ * Get all route files
147
+ * Sorted alphabetically by path
148
+ * @returns Array of FileManager instances
149
+ */
150
+ getRouteFiles() {
151
+ const routeFiles = Array.from(this.routeFiles.values());
152
+ return routeFiles.sort((a, b) => {
153
+ const pathA = a.relativePath;
154
+ const pathB = b.relativePath;
155
+ return pathA.localeCompare(pathB);
156
+ });
157
+ }
158
+ /**
159
+ * Get all event files
160
+ * @returns Array of FileManager instances
161
+ */
162
+ getEventFiles() {
163
+ return Array.from(this.eventFiles.values());
164
+ }
165
+ /**
166
+ * Get all locale files
167
+ * @returns Array of FileManager instances
168
+ */
169
+ getLocaleFiles() {
170
+ return Array.from(this.localeFiles.values());
171
+ }
172
+ /**
173
+ * Get statistics about collected special files
174
+ */
175
+ getStats() {
176
+ return {
177
+ config: this.configFiles.size,
178
+ main: this.mainFiles.size,
179
+ route: this.routeFiles.size,
180
+ event: this.eventFiles.size,
181
+ locale: this.localeFiles.size,
182
+ };
183
+ }
184
+ /**
185
+ * Check if a file is a special file
186
+ * @param relativePath Relative path of the file
187
+ * @returns Special file type or null
188
+ */
189
+ getFileType(relativePath) {
190
+ if (this.configFiles.has(relativePath))
191
+ return "config";
192
+ if (this.mainFiles.has(relativePath))
193
+ return "main";
194
+ if (this.routeFiles.has(relativePath))
195
+ return "route";
196
+ if (this.eventFiles.has(relativePath))
197
+ return "event";
198
+ if (this.localeFiles.has(relativePath))
199
+ return "locale";
200
+ return null;
201
+ }
202
+ /**
203
+ * Clear all collections
204
+ */
205
+ clear() {
206
+ this.configFiles.clear();
207
+ this.mainFiles.clear();
208
+ this.routeFiles.clear();
209
+ this.eventFiles.clear();
210
+ this.localeFiles.clear();
211
+ }
212
+ }export{SpecialFilesCollector};//# sourceMappingURL=special-files-collector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"special-files-collector.js","sources":["../../src/dev2-server/special-files-collector.ts"],"sourcesContent":[null],"names":[],"mappings":"AAOA;;;;AAIG;MACU,qBAAqB,CAAA;AAChC;;AAEG;AACc,IAAA,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC7C,IAAA,SAAS,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC3C,IAAA,UAAU,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC5C,IAAA,UAAU,GAAG,IAAI,GAAG,EAAuB,CAAC;AAC5C,IAAA,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;AAE9D;;;AAGG;AACI,IAAA,OAAO,CAAC,KAA+B,EAAA;;AAE5C,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;AACzB,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;AACvB,QAAA,IAAI,CAAC,U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B,YAAA,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI;AAC3B,YAAA,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;SAC9B,CAAC;KACH;AAED;;;;AAIG;AACI,IAAA,WAAW,CAAC,YAAoB,EAAA;AACrC,QAAA,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;AAAE,YAAA,OAAO,QAAQ,CAAC;AACxD,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;AAAE,YAAA,OAAO,MAAM,CAAC;AACpD,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC;AAAE,YAAA,OAAO,OAAO,CAAC;AACtD,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC;AAAE,YAAA,OAAO,OAAO,CAAC;AACtD,QAAA,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC;AAAE,YAAA,OAAO,QAAQ,CAAC;AAExD,QAAA,OAAO,IAAI,CAAC;KACb;AAED;;AAEG;IACI,KAAK,GAAA;AACV,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;AACzB,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;AACvB,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;AACxB,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;KAC1B;AACF"}
@@ -0,0 +1,7 @@
1
+ import { DevelopmentServer } from "./development-server";
2
+ /**
3
+ * Start the development server
4
+ * Main entry point for the dev server
5
+ */
6
+ export declare function startDevelopmentServer(): Promise<DevelopmentServer>;
7
+ //# sourceMappingURL=start-development-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-development-server.d.ts","sourceRoot":"","sources":["../../src/dev2-server/start-development-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;GAGG;AACH,wBAAsB,sBAAsB,+BAoB3C"}
@@ -0,0 +1,21 @@
1
+ import {DevelopmentServer}from'./development-server.js';/**
2
+ * Start the development server
3
+ * Main entry point for the dev server
4
+ */
5
+ async function startDevelopmentServer() {
6
+ const devServer = new DevelopmentServer();
7
+ // Handle graceful shutdown
8
+ process.on("SIGINT", async () => {
9
+ console.log("\n\nšŸ“” Received SIGINT signal");
10
+ await devServer.shutdown();
11
+ process.exit(0);
12
+ });
13
+ process.on("SIGTERM", async () => {
14
+ console.log("\n\nšŸ“” Received SIGTERM signal");
15
+ await devServer.shutdown();
16
+ process.exit(0);
17
+ });
18
+ // Start the server
19
+ await devServer.start();
20
+ return devServer;
21
+ }export{startDevelopmentServer};//# sourceMappingURL=start-development-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-development-server.js","sources":["../../src/dev2-server/start-development-server.ts"],"sourcesContent":[null],"names":[],"mappings":"wDAEA;;;AAGG;AACI,eAAe,sBAAsB,GAAA;AAC1C,IAAA,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;;AAG1C,IAAA,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAW;AAC9B,QAAA,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAC7C,QAAA,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC3B,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,KAAC,CAAC,CAAC;AAEH,IAAA,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,YAAW;AAC/B,QAAA,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAC9C,QAAA,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC3B,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,KAAC,CAAC,CAAC;;AAGH,IAAA,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;AAExB,IAAA,OAAO,SAAS,CAAC;AACnB"}
@@ -0,0 +1,10 @@
1
+ import type { FileManager } from "./file-manager";
2
+ /**
3
+ * Using esbuild to transpile the given code
4
+ * Uses external sourcemaps for better performance:
5
+ * - Inline sourcemaps double file size and require base64 parsing on every import
6
+ * - External sourcemaps keep files small and fast to parse
7
+ * - Sourcemap files are written separately and only loaded when debugging
8
+ */
9
+ export declare function transpile(fileManager: FileManager): Promise<any>;
10
+ //# sourceMappingURL=transpile-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transpile-file.d.ts","sourceRoot":"","sources":["../../src/dev2-server/transpile-file.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,WAAW,EAAE,WAAW,gBA+BvD"}
@@ -0,0 +1,31 @@
1
+ import {putFileAsync}from'@mongez/fs';import {transform}from'esbuild';import {tsconfigManager}from'./tsconfig-manager.js';import {warlockCachePath}from'./utils.js';/**
2
+ * Using esbuild to transpile the given code
3
+ * Uses external sourcemaps for better performance:
4
+ * - Inline sourcemaps double file size and require base64 parsing on every import
5
+ * - External sourcemaps keep files small and fast to parse
6
+ * - Sourcemap files are written separately and only loaded when debugging
7
+ */
8
+ async function transpile(fileManager) {
9
+ const { code: transpiled, map: sourceMap } = await transform(fileManager.source, {
10
+ loader: fileManager.absolutePath.endsWith(".tsx") ? "tsx" : "ts",
11
+ format: "esm",
12
+ sourcemap: "external",
13
+ target: "es2022",
14
+ sourcefile: fileManager.absolutePath,
15
+ tsconfigRaw: tsconfigManager.tsconfig,
16
+ });
17
+ // Write sourcemap file if it exists and add sourceMappingURL comment
18
+ if (sourceMap) {
19
+ const sourceMapFileName = fileManager.cachePath.replace(/\.js$/, ".js.map");
20
+ const sourceMapPath = warlockCachePath(sourceMapFileName);
21
+ // Add sourceMappingURL comment to the transpiled code
22
+ // This tells Node.js/debuggers where to find the sourcemap
23
+ const codeWithSourceMap = transpiled + `\n//# sourceMappingURL=${sourceMapFileName}`;
24
+ // Don't await - write sourcemap asynchronously to not block transpilation
25
+ putFileAsync(sourceMapPath, sourceMap).catch(() => {
26
+ // Silently fail - sourcemaps are optional
27
+ });
28
+ return codeWithSourceMap;
29
+ }
30
+ return transpiled;
31
+ }export{transpile};//# sourceMappingURL=transpile-file.js.map