resuxjs 0.3.11 → 0.4.0-beta.3

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 (361) hide show
  1. package/README.md +23 -1
  2. package/dist/bin.d.ts +1 -2
  3. package/dist/bin.js +5 -0
  4. package/dist/bin.js.map +1 -1
  5. package/dist/build/index.d.ts +29 -0
  6. package/dist/build/index.js +51 -0
  7. package/dist/build/index.js.map +1 -0
  8. package/dist/cli.d.ts +19 -8
  9. package/dist/cli.js +2653 -3688
  10. package/dist/cli.js.map +1 -1
  11. package/dist/compiler/adapter.d.ts +19 -15
  12. package/dist/compiler/adapter.js +69 -93
  13. package/dist/compiler/adapter.js.map +1 -1
  14. package/dist/compiler/dev-warnings.d.ts +14 -10
  15. package/dist/compiler/dev-warnings.js +247 -319
  16. package/dist/compiler/dev-warnings.js.map +1 -1
  17. package/dist/compiler/directives.d.ts +7 -3
  18. package/dist/compiler/directives.js +125 -150
  19. package/dist/compiler/directives.js.map +1 -1
  20. package/dist/compiler/implementation.d.ts +117 -112
  21. package/dist/compiler/implementation.js +2954 -3426
  22. package/dist/compiler/index.d.ts +19 -15
  23. package/dist/compiler/index.js +69 -93
  24. package/dist/compiler/index.js.map +1 -1
  25. package/dist/core/config.d.ts +19 -10
  26. package/dist/core/config.js +42 -25
  27. package/dist/core/config.js.map +1 -1
  28. package/dist/core/hooks.d.ts +133 -131
  29. package/dist/core/hooks.js +45 -55
  30. package/dist/core/hooks.js.map +1 -1
  31. package/dist/core/index.d.ts +5 -4
  32. package/dist/core/index.js +6 -5
  33. package/dist/core/module-container.d.ts +97 -93
  34. package/dist/core/module-container.js +180 -185
  35. package/dist/core/module-container.js.map +1 -1
  36. package/dist/core/resux.d.ts +20 -15
  37. package/dist/core/resux.js +18 -13
  38. package/dist/core/resux.js.map +1 -1
  39. package/dist/create-bin.d.ts +1 -2
  40. package/dist/create-bin.js +5 -0
  41. package/dist/create-bin.js.map +1 -1
  42. package/dist/create.d.ts +6 -2
  43. package/dist/create.js +496 -638
  44. package/dist/create.js.map +1 -1
  45. package/dist/deploy/cloudflare.d.ts +7 -2
  46. package/dist/deploy/cloudflare.js +31 -34
  47. package/dist/deploy/cloudflare.js.map +1 -1
  48. package/dist/deploy/common.d.ts +19 -15
  49. package/dist/deploy/common.js +119 -188
  50. package/dist/deploy/common.js.map +1 -1
  51. package/dist/deploy/framework-runtime.d.ts +5 -1
  52. package/dist/deploy/framework-runtime.js +44 -48
  53. package/dist/deploy/framework-runtime.js.map +1 -1
  54. package/dist/deploy/index.d.ts +8 -3
  55. package/dist/deploy/index.js +56 -80
  56. package/dist/deploy/index.js.map +1 -1
  57. package/dist/deploy/netlify.d.ts +7 -2
  58. package/dist/deploy/netlify.js +41 -41
  59. package/dist/deploy/netlify.js.map +1 -1
  60. package/dist/deploy/node.d.ts +7 -2
  61. package/dist/deploy/node.js +24 -19
  62. package/dist/deploy/node.js.map +1 -1
  63. package/dist/deploy/production-report.d.ts +5 -1
  64. package/dist/deploy/production-report.js +15 -14
  65. package/dist/deploy/production-report.js.map +1 -1
  66. package/dist/deploy/runtime-dependencies.d.ts +8 -4
  67. package/dist/deploy/runtime-dependencies.js +158 -220
  68. package/dist/deploy/runtime-dependencies.js.map +1 -1
  69. package/dist/deploy/static.d.ts +7 -2
  70. package/dist/deploy/static.js +17 -14
  71. package/dist/deploy/static.js.map +1 -1
  72. package/dist/deploy/types.d.ts +33 -29
  73. package/dist/deploy/types.js +1 -2
  74. package/dist/deploy/vercel.d.ts +8 -3
  75. package/dist/deploy/vercel.js +138 -188
  76. package/dist/deploy/vercel.js.map +1 -1
  77. package/dist/fonts/index.d.ts +19 -14
  78. package/dist/fonts/index.js +115 -134
  79. package/dist/fonts/index.js.map +1 -1
  80. package/dist/globals.d.ts +79 -78
  81. package/dist/globals.js +1 -2
  82. package/dist/halal-core/ai/classifyProject.d.ts +9 -4
  83. package/dist/halal-core/ai/classifyProject.js +82 -95
  84. package/dist/halal-core/ai/classifyProject.js.map +1 -1
  85. package/dist/halal-core/ai/classifyRuntimeContent.d.ts +8 -3
  86. package/dist/halal-core/ai/classifyRuntimeContent.js +78 -95
  87. package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
  88. package/dist/halal-core/ai/createProjectSummary.d.ts +40 -36
  89. package/dist/halal-core/ai/createProjectSummary.js +39 -39
  90. package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
  91. package/dist/halal-core/ai/halalClassifierPrompt.d.ts +5 -1
  92. package/dist/halal-core/ai/halalClassifierPrompt.js +5 -1
  93. package/dist/halal-core/ai/halalClassifierPrompt.js.map +1 -1
  94. package/dist/halal-core/ai/redactSensitiveData.d.ts +5 -1
  95. package/dist/halal-core/ai/redactSensitiveData.js +82 -110
  96. package/dist/halal-core/ai/redactSensitiveData.js.map +1 -1
  97. package/dist/halal-core/ai/validateAiResponse.d.ts +7 -2
  98. package/dist/halal-core/ai/validateAiResponse.js +56 -83
  99. package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
  100. package/dist/halal-core/cli/check.d.ts +5 -1
  101. package/dist/halal-core/cli/check.js +28 -30
  102. package/dist/halal-core/cli/check.js.map +1 -1
  103. package/dist/halal-core/cli/explain.d.ts +5 -1
  104. package/dist/halal-core/cli/explain.js +27 -31
  105. package/dist/halal-core/cli/explain.js.map +1 -1
  106. package/dist/halal-core/cli/report.d.ts +5 -1
  107. package/dist/halal-core/cli/report.js +14 -10
  108. package/dist/halal-core/cli/report.js.map +1 -1
  109. package/dist/halal-core/cli/submitReview.d.ts +5 -1
  110. package/dist/halal-core/cli/submitReview.js +13 -9
  111. package/dist/halal-core/cli/submitReview.js.map +1 -1
  112. package/dist/halal-core/cli/verifyReview.d.ts +5 -1
  113. package/dist/halal-core/cli/verifyReview.js +17 -15
  114. package/dist/halal-core/cli/verifyReview.js.map +1 -1
  115. package/dist/halal-core/config.d.ts +39 -35
  116. package/dist/halal-core/config.js +77 -118
  117. package/dist/halal-core/config.js.map +1 -1
  118. package/dist/halal-core/crypto/integrity.d.ts +12 -8
  119. package/dist/halal-core/crypto/integrity.js +65 -87
  120. package/dist/halal-core/crypto/integrity.js.map +1 -1
  121. package/dist/halal-core/enforce.d.ts +9 -5
  122. package/dist/halal-core/enforce.js +90 -105
  123. package/dist/halal-core/enforce.js.map +1 -1
  124. package/dist/halal-core/index.d.ts +20 -16
  125. package/dist/halal-core/index.js +19 -19
  126. package/dist/halal-core/lifecycle.d.ts +5 -1
  127. package/dist/halal-core/lifecycle.js +16 -13
  128. package/dist/halal-core/lifecycle.js.map +1 -1
  129. package/dist/halal-core/policy.d.ts +7 -2
  130. package/dist/halal-core/policy.js +7 -2
  131. package/dist/halal-core/policy.js.map +1 -1
  132. package/dist/halal-core/report/formatBrowserOverlay.d.ts +7 -2
  133. package/dist/halal-core/report/formatBrowserOverlay.js +10 -8
  134. package/dist/halal-core/report/formatBrowserOverlay.js.map +1 -1
  135. package/dist/halal-core/report/formatTerminalReport.d.ts +7 -2
  136. package/dist/halal-core/report/formatTerminalReport.js +27 -37
  137. package/dist/halal-core/report/formatTerminalReport.js.map +1 -1
  138. package/dist/halal-core/report/generateHalalReport.d.ts +11 -6
  139. package/dist/halal-core/report/generateHalalReport.js +25 -27
  140. package/dist/halal-core/report/generateHalalReport.js.map +1 -1
  141. package/dist/halal-core/report/signReport.d.ts +8 -3
  142. package/dist/halal-core/report/signReport.js +17 -12
  143. package/dist/halal-core/report/signReport.js.map +1 -1
  144. package/dist/halal-core/report/verifyReport.d.ts +14 -9
  145. package/dist/halal-core/report/verifyReport.js +52 -41
  146. package/dist/halal-core/report/verifyReport.js.map +1 -1
  147. package/dist/halal-core/review/createReviewRequest.d.ts +7 -2
  148. package/dist/halal-core/review/createReviewRequest.js +21 -17
  149. package/dist/halal-core/review/createReviewRequest.js.map +1 -1
  150. package/dist/halal-core/review/reviewPolicy.d.ts +7 -3
  151. package/dist/halal-core/review/reviewPolicy.js +19 -17
  152. package/dist/halal-core/review/reviewPolicy.js.map +1 -1
  153. package/dist/halal-core/review/signedReviewFile.d.ts +17 -12
  154. package/dist/halal-core/review/signedReviewFile.js +25 -22
  155. package/dist/halal-core/review/signedReviewFile.js.map +1 -1
  156. package/dist/halal-core/review/verifyReviewApproval.d.ts +12 -8
  157. package/dist/halal-core/review/verifyReviewApproval.js +69 -62
  158. package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
  159. package/dist/halal-core/rules/adultContentRules.d.ts +6 -2
  160. package/dist/halal-core/rules/adultContentRules.js +23 -23
  161. package/dist/halal-core/rules/adultContentRules.js.map +1 -1
  162. package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +6 -2
  163. package/dist/halal-core/rules/alcoholDrugVapeRules.js +22 -22
  164. package/dist/halal-core/rules/alcoholDrugVapeRules.js.map +1 -1
  165. package/dist/halal-core/rules/childSafetyRules.d.ts +6 -2
  166. package/dist/halal-core/rules/childSafetyRules.js +19 -19
  167. package/dist/halal-core/rules/childSafetyRules.js.map +1 -1
  168. package/dist/halal-core/rules/coreCategories.d.ts +10 -6
  169. package/dist/halal-core/rules/coreCategories.js +237 -110
  170. package/dist/halal-core/rules/coreCategories.js.map +1 -1
  171. package/dist/halal-core/rules/cyberAbuseRules.d.ts +6 -2
  172. package/dist/halal-core/rules/cyberAbuseRules.js +27 -27
  173. package/dist/halal-core/rules/cyberAbuseRules.js.map +1 -1
  174. package/dist/halal-core/rules/defaultBlockedRules.d.ts +24 -19
  175. package/dist/halal-core/rules/defaultBlockedRules.js +156 -199
  176. package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
  177. package/dist/halal-core/rules/dependencyRules.d.ts +11 -7
  178. package/dist/halal-core/rules/dependencyRules.js +50 -56
  179. package/dist/halal-core/rules/dependencyRules.js.map +1 -1
  180. package/dist/halal-core/rules/endpointRules.d.ts +9 -5
  181. package/dist/halal-core/rules/endpointRules.js +21 -23
  182. package/dist/halal-core/rules/endpointRules.js.map +1 -1
  183. package/dist/halal-core/rules/environmentalHarmRules.d.ts +6 -2
  184. package/dist/halal-core/rules/environmentalHarmRules.js +17 -17
  185. package/dist/halal-core/rules/environmentalHarmRules.js.map +1 -1
  186. package/dist/halal-core/rules/financeRibaRules.d.ts +6 -2
  187. package/dist/halal-core/rules/financeRibaRules.js +20 -20
  188. package/dist/halal-core/rules/financeRibaRules.js.map +1 -1
  189. package/dist/halal-core/rules/gamblingRules.d.ts +6 -2
  190. package/dist/halal-core/rules/gamblingRules.js +22 -22
  191. package/dist/halal-core/rules/gamblingRules.js.map +1 -1
  192. package/dist/halal-core/rules/generalHarmRules.d.ts +6 -2
  193. package/dist/halal-core/rules/generalHarmRules.js +15 -15
  194. package/dist/halal-core/rules/generalHarmRules.js.map +1 -1
  195. package/dist/halal-core/rules/healthHarmRules.d.ts +6 -2
  196. package/dist/halal-core/rules/healthHarmRules.js +19 -19
  197. package/dist/halal-core/rules/healthHarmRules.js.map +1 -1
  198. package/dist/halal-core/rules/keywordRules.d.ts +13 -9
  199. package/dist/halal-core/rules/keywordRules.js +90 -39
  200. package/dist/halal-core/rules/keywordRules.js.map +1 -1
  201. package/dist/halal-core/rules/privacyAbuseRules.d.ts +6 -2
  202. package/dist/halal-core/rules/privacyAbuseRules.js +21 -21
  203. package/dist/halal-core/rules/privacyAbuseRules.js.map +1 -1
  204. package/dist/halal-core/rules/scamFraudRules.d.ts +6 -2
  205. package/dist/halal-core/rules/scamFraudRules.js +29 -29
  206. package/dist/halal-core/rules/scamFraudRules.js.map +1 -1
  207. package/dist/halal-core/rules/selfHarmRules.d.ts +6 -2
  208. package/dist/halal-core/rules/selfHarmRules.js +17 -17
  209. package/dist/halal-core/rules/selfHarmRules.js.map +1 -1
  210. package/dist/halal-core/rules/violenceExtremismRules.d.ts +6 -2
  211. package/dist/halal-core/rules/violenceExtremismRules.js +30 -30
  212. package/dist/halal-core/rules/violenceExtremismRules.js.map +1 -1
  213. package/dist/halal-core/runtime/guard.d.ts +22 -17
  214. package/dist/halal-core/runtime/guard.js +163 -183
  215. package/dist/halal-core/runtime/guard.js.map +1 -1
  216. package/dist/halal-core/runtime/index.d.ts +5 -4
  217. package/dist/halal-core/runtime/index.js +5 -5
  218. package/dist/halal-core/runtime/reviewedMemory.d.ts +10 -5
  219. package/dist/halal-core/runtime/reviewedMemory.js +75 -110
  220. package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
  221. package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +17 -12
  222. package/dist/halal-core/runtime/serializeRuntimeContent.js +133 -156
  223. package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
  224. package/dist/halal-core/runtime/types.d.ts +55 -50
  225. package/dist/halal-core/runtime/types.js +1 -2
  226. package/dist/halal-core/scanner/scanApiRoutes.d.ts +5 -1
  227. package/dist/halal-core/scanner/scanApiRoutes.js +33 -36
  228. package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
  229. package/dist/halal-core/scanner/scanComponents.d.ts +5 -1
  230. package/dist/halal-core/scanner/scanComponents.js +13 -13
  231. package/dist/halal-core/scanner/scanComponents.js.map +1 -1
  232. package/dist/halal-core/scanner/scanContent.d.ts +8 -4
  233. package/dist/halal-core/scanner/scanContent.js +192 -261
  234. package/dist/halal-core/scanner/scanContent.js.map +1 -1
  235. package/dist/halal-core/scanner/scanDependencies.d.ts +5 -1
  236. package/dist/halal-core/scanner/scanDependencies.js +17 -15
  237. package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
  238. package/dist/halal-core/scanner/scanDomains.d.ts +7 -3
  239. package/dist/halal-core/scanner/scanDomains.js +12 -12
  240. package/dist/halal-core/scanner/scanDomains.js.map +1 -1
  241. package/dist/halal-core/scanner/scanEnvNames.d.ts +5 -1
  242. package/dist/halal-core/scanner/scanEnvNames.js +24 -26
  243. package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
  244. package/dist/halal-core/scanner/scanMetadata.d.ts +9 -5
  245. package/dist/halal-core/scanner/scanMetadata.js +21 -29
  246. package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
  247. package/dist/halal-core/scanner/scanPages.d.ts +5 -1
  248. package/dist/halal-core/scanner/scanPages.js +13 -15
  249. package/dist/halal-core/scanner/scanPages.js.map +1 -1
  250. package/dist/halal-core/scanner/scanProject.d.ts +19 -12
  251. package/dist/halal-core/scanner/scanProject.js +44 -49
  252. package/dist/halal-core/scanner/scanProject.js.map +1 -1
  253. package/dist/halal-core/scanner/scanRoutes.d.ts +5 -1
  254. package/dist/halal-core/scanner/scanRoutes.js +33 -39
  255. package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
  256. package/dist/halal-core/scanner/scanTranslations.d.ts +5 -1
  257. package/dist/halal-core/scanner/scanTranslations.js +22 -29
  258. package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
  259. package/dist/halal-core/status.d.ts +17 -13
  260. package/dist/halal-core/status.js +1 -2
  261. package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +5 -1
  262. package/dist/halal-core/tamper/verifyCoreIntegrity.js +27 -24
  263. package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
  264. package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +5 -1
  265. package/dist/halal-core/tamper/verifyLifecycleHooks.js +13 -12
  266. package/dist/halal-core/tamper/verifyLifecycleHooks.js.map +1 -1
  267. package/dist/halal-core/tamper/verifyReportSignature.d.ts +9 -4
  268. package/dist/halal-core/tamper/verifyReportSignature.js +20 -14
  269. package/dist/halal-core/tamper/verifyReportSignature.js.map +1 -1
  270. package/dist/halal.d.ts +20 -1
  271. package/dist/halal.js +19 -2
  272. package/dist/i18n/index.d.ts +44 -40
  273. package/dist/i18n/index.js +218 -288
  274. package/dist/i18n/index.js.map +1 -1
  275. package/dist/i18n/shared.d.ts +33 -29
  276. package/dist/i18n/shared.js +204 -266
  277. package/dist/i18n/shared.js.map +1 -1
  278. package/dist/icons/index.d.ts +160 -154
  279. package/dist/icons/index.js +323 -273
  280. package/dist/icons/index.js.map +1 -1
  281. package/dist/index.d.ts +8 -1
  282. package/dist/index.js +8 -2
  283. package/dist/kit/index.d.ts +32 -27
  284. package/dist/kit/index.js +46 -43
  285. package/dist/kit/index.js.map +1 -1
  286. package/dist/nitro-server/index.d.ts +10 -6
  287. package/dist/nitro-server/index.js +6 -2
  288. package/dist/nitro-server/index.js.map +1 -1
  289. package/dist/node.d.ts +9 -4
  290. package/dist/node.js +89 -116
  291. package/dist/node.js.map +1 -1
  292. package/dist/reactivity/computed.d.ts +11 -6
  293. package/dist/reactivity/computed.js +46 -53
  294. package/dist/reactivity/computed.js.map +1 -1
  295. package/dist/reactivity/effect.d.ts +23 -18
  296. package/dist/reactivity/effect.js +105 -147
  297. package/dist/reactivity/effect.js.map +1 -1
  298. package/dist/reactivity/index.d.ts +8 -8
  299. package/dist/reactivity/index.js +8 -8
  300. package/dist/reactivity/reactive.d.ts +9 -5
  301. package/dist/reactivity/reactive.js +95 -134
  302. package/dist/reactivity/reactive.js.map +1 -1
  303. package/dist/reactivity/readonly.d.ts +2 -1
  304. package/dist/reactivity/readonly.js +3 -2
  305. package/dist/reactivity/ref.d.ts +23 -21
  306. package/dist/reactivity/ref.js +71 -81
  307. package/dist/reactivity/ref.js.map +1 -1
  308. package/dist/reactivity/scheduler.d.ts +8 -5
  309. package/dist/reactivity/scheduler.js +67 -69
  310. package/dist/reactivity/scheduler.js.map +1 -1
  311. package/dist/reactivity/types.d.ts +29 -25
  312. package/dist/reactivity/types.js +1 -2
  313. package/dist/reactivity/utils.d.ts +17 -13
  314. package/dist/reactivity/utils.js +25 -24
  315. package/dist/reactivity/utils.js.map +1 -1
  316. package/dist/reactivity/watch.d.ts +8 -4
  317. package/dist/reactivity/watch.js +74 -103
  318. package/dist/reactivity/watch.js.map +1 -1
  319. package/dist/runtime/core.d.ts +32 -0
  320. package/dist/runtime/core.js +155 -0
  321. package/dist/runtime/core.js.map +1 -0
  322. package/dist/runtime/index.d.ts +649 -622
  323. package/dist/runtime/index.js +4105 -5243
  324. package/dist/runtime/index.js.map +1 -1
  325. package/dist/runtime/reactivity.d.ts +7 -0
  326. package/dist/runtime/reactivity.js +7 -0
  327. package/dist/runtime/resume.d.ts +80 -0
  328. package/dist/runtime/resume.js +482 -0
  329. package/dist/runtime/resume.js.map +1 -0
  330. package/dist/runtime/router.d.ts +21 -0
  331. package/dist/runtime/router.js +60 -0
  332. package/dist/runtime/router.js.map +1 -0
  333. package/dist/runtime/streaming.d.ts +25 -0
  334. package/dist/runtime/streaming.js +200 -0
  335. package/dist/runtime/streaming.js.map +1 -0
  336. package/dist/security/media-fetch.d.ts +33 -0
  337. package/dist/security/media-fetch.js +302 -0
  338. package/dist/security/media-fetch.js.map +1 -0
  339. package/dist/security/path-boundary.d.ts +8 -0
  340. package/dist/security/path-boundary.js +71 -0
  341. package/dist/security/path-boundary.js.map +1 -0
  342. package/dist/ui/index.d.ts +1774 -1768
  343. package/dist/ui/index.js +974 -674
  344. package/dist/ui/index.js.map +1 -1
  345. package/dist/vite-builder/index.d.ts +9 -5
  346. package/dist/vite-builder/index.js +6 -2
  347. package/dist/vite-builder/index.js.map +1 -1
  348. package/package.json +46 -86
  349. package/dist/compiler/implementation.js.map +0 -1
  350. package/dist/core/index.js.map +0 -1
  351. package/dist/deploy/types.js.map +0 -1
  352. package/dist/globals.js.map +0 -1
  353. package/dist/halal-core/index.js.map +0 -1
  354. package/dist/halal-core/runtime/index.js.map +0 -1
  355. package/dist/halal-core/runtime/types.js.map +0 -1
  356. package/dist/halal-core/status.js.map +0 -1
  357. package/dist/halal.js.map +0 -1
  358. package/dist/index.js.map +0 -1
  359. package/dist/reactivity/index.js.map +0 -1
  360. package/dist/reactivity/readonly.js.map +0 -1
  361. package/dist/reactivity/types.js.map +0 -1
@@ -1,14 +1,14 @@
1
- export function scanDomains(texts) {
2
- const domains = new Set();
3
- const urlRegex = /(https?|wss?):\/\/([a-zA-Z0-9.-]+)/gi;
4
- for (const item of texts) {
5
- let match;
6
- while ((match = urlRegex.exec(item.text)) !== null) {
7
- if (match[2]) {
8
- domains.add(match[2].toLowerCase());
9
- }
10
- }
11
- }
12
- return Array.from(domains);
1
+ //#region src/halal-core/scanner/scanDomains.ts
2
+ function scanDomains(texts) {
3
+ const domains = /* @__PURE__ */ new Set();
4
+ const urlRegex = /(https?|wss?):\/\/([a-zA-Z0-9.-]+)/gi;
5
+ for (const item of texts) {
6
+ let match;
7
+ while ((match = urlRegex.exec(item.text)) !== null) if (match[2]) domains.add(match[2].toLowerCase());
8
+ }
9
+ return Array.from(domains);
13
10
  }
11
+
12
+ //#endregion
13
+ export { scanDomains };
14
14
  //# sourceMappingURL=scanDomains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanDomains.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanDomains.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAA4C;IACtE,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,QAAQ,GAAG,sCAAsC,CAAC;IAExD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,KAAK,CAAC;QACV,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACnD,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC"}
1
+ {"version":3,"file":"scanDomains.js","names":[],"sources":["../../../src/halal-core/scanner/scanDomains.ts"],"sourcesContent":["export function scanDomains(texts: Array<{ file: string; text: string }>): string[] {\n const domains = new Set<string>();\n const urlRegex = /(https?|wss?):\\/\\/([a-zA-Z0-9.-]+)/gi;\n\n for (const item of texts) {\n let match;\n while ((match = urlRegex.exec(item.text)) !== null) {\n if (match[2]) {\n domains.add(match[2].toLowerCase());\n }\n }\n }\n\n return Array.from(domains);\n}\n"],"mappings":";AAAA,SAAgB,YAAY,OAAwD;CAClF,MAAM,0BAAU,IAAI,KAAa;CACjC,MAAM,WAAW;AAEjB,MAAK,MAAM,QAAQ,OAAO;EACxB,IAAI;AACJ,UAAQ,QAAQ,SAAS,KAAK,KAAK,KAAK,MAAM,KAC5C,KAAI,MAAM,GACR,SAAQ,IAAI,MAAM,GAAG,aAAa,CAAC;;AAKzC,QAAO,MAAM,KAAK,QAAQ"}
@@ -1 +1,5 @@
1
- export declare function scanEnvNames(appRoot: string): string[];
1
+ //#region src/halal-core/scanner/scanEnvNames.d.ts
2
+ declare function scanEnvNames(appRoot: string): string[];
3
+ //#endregion
4
+ export { scanEnvNames };
5
+ //# sourceMappingURL=scanEnvNames.d.ts.map
@@ -1,30 +1,28 @@
1
1
  import { existsSync, readFileSync, readdirSync } from "node:fs";
2
2
  import path from "node:path";
3
- export function scanEnvNames(appRoot) {
4
- const envNames = new Set();
5
- try {
6
- const files = readdirSync(appRoot).filter(f => f.startsWith(".env"));
7
- for (const file of files) {
8
- const fullPath = path.join(appRoot, file);
9
- if (existsSync(fullPath)) {
10
- const content = readFileSync(fullPath, "utf8");
11
- const lines = content.split(/\r?\n/);
12
- for (const line of lines) {
13
- const trimmed = line.trim();
14
- if (trimmed && !trimmed.startsWith("#")) {
15
- const parts = trimmed.split("=");
16
- const name = parts[0]?.trim();
17
- if (name) {
18
- envNames.add(name);
19
- }
20
- }
21
- }
22
- }
23
- }
24
- }
25
- catch {
26
- // Ignore folder read errors
27
- }
28
- return Array.from(envNames);
3
+
4
+ //#region src/halal-core/scanner/scanEnvNames.ts
5
+ function scanEnvNames(appRoot) {
6
+ const envNames = /* @__PURE__ */ new Set();
7
+ try {
8
+ const files = readdirSync(appRoot).filter((f) => f.startsWith(".env"));
9
+ for (const file of files) {
10
+ const fullPath = path.join(appRoot, file);
11
+ if (existsSync(fullPath)) {
12
+ const lines = readFileSync(fullPath, "utf8").split(/\r?\n/);
13
+ for (const line of lines) {
14
+ const trimmed = line.trim();
15
+ if (trimmed && !trimmed.startsWith("#")) {
16
+ const name = trimmed.split("=")[0]?.trim();
17
+ if (name) envNames.add(name);
18
+ }
19
+ }
20
+ }
21
+ }
22
+ } catch {}
23
+ return Array.from(envNames);
29
24
  }
25
+
26
+ //#endregion
27
+ export { scanEnvNames };
30
28
  //# sourceMappingURL=scanEnvNames.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanEnvNames.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanEnvNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAEnC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QACrE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1C,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAC/C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACrC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;oBACzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;oBAC5B,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;wBACxC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACjC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;wBAC9B,IAAI,IAAI,EAAE,CAAC;4BACT,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;wBACrB,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,4BAA4B;IAC9B,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
1
+ {"version":3,"file":"scanEnvNames.js","names":[],"sources":["../../../src/halal-core/scanner/scanEnvNames.ts"],"sourcesContent":["import { existsSync, readFileSync, readdirSync } from \"node:fs\";\nimport path from \"node:path\";\n\nexport function scanEnvNames(appRoot: string): string[] {\n const envNames = new Set<string>();\n\n try {\n const files = readdirSync(appRoot).filter(f => f.startsWith(\".env\"));\n for (const file of files) {\n const fullPath = path.join(appRoot, file);\n if (existsSync(fullPath)) {\n const content = readFileSync(fullPath, \"utf8\");\n const lines = content.split(/\\r?\\n/);\n for (const line of lines) {\n const trimmed = line.trim();\n if (trimmed && !trimmed.startsWith(\"#\")) {\n const parts = trimmed.split(\"=\");\n const name = parts[0]?.trim();\n if (name) {\n envNames.add(name);\n }\n }\n }\n }\n }\n } catch {\n // Ignore folder read errors\n }\n\n return Array.from(envNames);\n}\n"],"mappings":";;;;AAGA,SAAgB,aAAa,SAA2B;CACtD,MAAM,2BAAW,IAAI,KAAa;AAElC,KAAI;EACF,MAAM,QAAQ,YAAY,QAAQ,CAAC,QAAO,MAAK,EAAE,WAAW,OAAO,CAAC;AACpE,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,WAAW,KAAK,KAAK,SAAS,KAAK;AACzC,OAAI,WAAW,SAAS,EAAE;IAExB,MAAM,QADU,aAAa,UAAU,OAAO,CACxB,MAAM,QAAQ;AACpC,SAAK,MAAM,QAAQ,OAAO;KACxB,MAAM,UAAU,KAAK,MAAM;AAC3B,SAAI,WAAW,CAAC,QAAQ,WAAW,IAAI,EAAE;MAEvC,MAAM,OADQ,QAAQ,MAAM,IAAI,CACb,IAAI,MAAM;AAC7B,UAAI,KACF,UAAS,IAAI,KAAK;;;;;SAMtB;AAIR,QAAO,MAAM,KAAK,SAAS"}
@@ -1,6 +1,10 @@
1
- export interface ScanMetadataResult {
2
- title?: string;
3
- description?: string;
4
- meta?: Record<string, string>;
1
+ //#region src/halal-core/scanner/scanMetadata.d.ts
2
+ interface ScanMetadataResult {
3
+ title?: string;
4
+ description?: string;
5
+ meta?: Record<string, string>;
5
6
  }
6
- export declare function scanMetadata(appRoot: string): ScanMetadataResult;
7
+ declare function scanMetadata(appRoot: string): ScanMetadataResult;
8
+ //#endregion
9
+ export { ScanMetadataResult, scanMetadata };
10
+ //# sourceMappingURL=scanMetadata.d.ts.map
@@ -1,33 +1,25 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import path from "node:path";
3
- export function scanMetadata(appRoot) {
4
- const result = { meta: {} };
5
- // Check common files for SEO metadata
6
- const possibleFiles = [
7
- path.join(appRoot, "app.config.ts"),
8
- path.join(appRoot, "app.config.js"),
9
- path.join(appRoot, "resux.config.ts"),
10
- path.join(appRoot, "resux.config.js"),
11
- ];
12
- for (const file of possibleFiles) {
13
- if (existsSync(file)) {
14
- try {
15
- const content = readFileSync(file, "utf8");
16
- // Simple regex search for titles/descriptions
17
- const titleMatch = content.match(/title:\s*["']([^"']+)["']/);
18
- if (titleMatch && titleMatch[1]) {
19
- result.title = titleMatch[1];
20
- }
21
- const descMatch = content.match(/description:\s*["']([^"']+)["']/);
22
- if (descMatch && descMatch[1]) {
23
- result.description = descMatch[1];
24
- }
25
- }
26
- catch {
27
- // Ignore errors
28
- }
29
- }
30
- }
31
- return result;
3
+
4
+ //#region src/halal-core/scanner/scanMetadata.ts
5
+ function scanMetadata(appRoot) {
6
+ const result = { meta: {} };
7
+ const possibleFiles = [
8
+ path.join(appRoot, "app.config.ts"),
9
+ path.join(appRoot, "app.config.js"),
10
+ path.join(appRoot, "resux.config.ts"),
11
+ path.join(appRoot, "resux.config.js")
12
+ ];
13
+ for (const file of possibleFiles) if (existsSync(file)) try {
14
+ const content = readFileSync(file, "utf8");
15
+ const titleMatch = content.match(/title:\s*["']([^"']+)["']/);
16
+ if (titleMatch && titleMatch[1]) result.title = titleMatch[1];
17
+ const descMatch = content.match(/description:\s*["']([^"']+)["']/);
18
+ if (descMatch && descMatch[1]) result.description = descMatch[1];
19
+ } catch {}
20
+ return result;
32
21
  }
22
+
23
+ //#endregion
24
+ export { scanMetadata };
33
25
  //# sourceMappingURL=scanMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanMetadata.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,MAAM,MAAM,GAAuB,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAEhD,sCAAsC;IACtC,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC;KACtC,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;QACjC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBAC3C,8CAA8C;gBAC9C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;gBAC9D,IAAI,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;oBAChC,MAAM,CAAC,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;gBAC/B,CAAC;gBACD,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;gBACnE,IAAI,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC9B,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;gBACpC,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,gBAAgB;YAClB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"scanMetadata.js","names":[],"sources":["../../../src/halal-core/scanner/scanMetadata.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\n\nexport interface ScanMetadataResult {\n title?: string;\n description?: string;\n meta?: Record<string, string>;\n}\n\nexport function scanMetadata(appRoot: string): ScanMetadataResult {\n const result: ScanMetadataResult = { meta: {} };\n\n // Check common files for SEO metadata\n const possibleFiles = [\n path.join(appRoot, \"app.config.ts\"),\n path.join(appRoot, \"app.config.js\"),\n path.join(appRoot, \"resux.config.ts\"),\n path.join(appRoot, \"resux.config.js\"),\n ];\n\n for (const file of possibleFiles) {\n if (existsSync(file)) {\n try {\n const content = readFileSync(file, \"utf8\");\n // Simple regex search for titles/descriptions\n const titleMatch = content.match(/title:\\s*[\"']([^\"']+)[\"']/);\n if (titleMatch && titleMatch[1]) {\n result.title = titleMatch[1];\n }\n const descMatch = content.match(/description:\\s*[\"']([^\"']+)[\"']/);\n if (descMatch && descMatch[1]) {\n result.description = descMatch[1];\n }\n } catch {\n // Ignore errors\n }\n }\n }\n\n return result;\n}\n"],"mappings":";;;;AASA,SAAgB,aAAa,SAAqC;CAChE,MAAM,SAA6B,EAAE,MAAM,EAAE,EAAE;CAG/C,MAAM,gBAAgB;EACpB,KAAK,KAAK,SAAS,gBAAgB;EACnC,KAAK,KAAK,SAAS,gBAAgB;EACnC,KAAK,KAAK,SAAS,kBAAkB;EACrC,KAAK,KAAK,SAAS,kBAAkB;EACtC;AAED,MAAK,MAAM,QAAQ,cACjB,KAAI,WAAW,KAAK,CAClB,KAAI;EACF,MAAM,UAAU,aAAa,MAAM,OAAO;EAE1C,MAAM,aAAa,QAAQ,MAAM,4BAA4B;AAC7D,MAAI,cAAc,WAAW,GAC3B,QAAO,QAAQ,WAAW;EAE5B,MAAM,YAAY,QAAQ,MAAM,kCAAkC;AAClE,MAAI,aAAa,UAAU,GACzB,QAAO,cAAc,UAAU;SAE3B;AAMZ,QAAO"}
@@ -1 +1,5 @@
1
- export declare function scanPages(appRoot: string): string[];
1
+ //#region src/halal-core/scanner/scanPages.d.ts
2
+ declare function scanPages(appRoot: string): string[];
3
+ //#endregion
4
+ export { scanPages };
5
+ //# sourceMappingURL=scanPages.d.ts.map
@@ -1,19 +1,17 @@
1
1
  import { existsSync, readdirSync } from "node:fs";
2
2
  import path from "node:path";
3
- export function scanPages(appRoot) {
4
- const pages = [];
5
- const dirs = [path.join(appRoot, "pages"), path.join(appRoot, "layouts")];
6
- for (const dir of dirs) {
7
- if (existsSync(dir)) {
8
- try {
9
- const files = readdirSync(dir);
10
- pages.push(...files.map(f => f.toLowerCase()));
11
- }
12
- catch {
13
- // Ignore
14
- }
15
- }
16
- }
17
- return pages;
3
+
4
+ //#region src/halal-core/scanner/scanPages.ts
5
+ function scanPages(appRoot) {
6
+ const pages = [];
7
+ const dirs = [path.join(appRoot, "pages"), path.join(appRoot, "layouts")];
8
+ for (const dir of dirs) if (existsSync(dir)) try {
9
+ const files = readdirSync(dir);
10
+ pages.push(...files.map((f) => f.toLowerCase()));
11
+ } catch {}
12
+ return pages;
18
13
  }
14
+
15
+ //#endregion
16
+ export { scanPages };
19
17
  //# sourceMappingURL=scanPages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanPages.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanPages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAE1E,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;gBAC/B,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YACjD,CAAC;YAAC,MAAM,CAAC;gBACP,SAAS;YACX,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"scanPages.js","names":[],"sources":["../../../src/halal-core/scanner/scanPages.ts"],"sourcesContent":["import { existsSync, readdirSync } from \"node:fs\";\nimport path from \"node:path\";\n\nexport function scanPages(appRoot: string): string[] {\n const pages: string[] = [];\n const dirs = [path.join(appRoot, \"pages\"), path.join(appRoot, \"layouts\")];\n\n for (const dir of dirs) {\n if (existsSync(dir)) {\n try {\n const files = readdirSync(dir);\n pages.push(...files.map(f => f.toLowerCase()));\n } catch {\n // Ignore\n }\n }\n }\n\n return pages;\n}\n"],"mappings":";;;;AAGA,SAAgB,UAAU,SAA2B;CACnD,MAAM,QAAkB,EAAE;CAC1B,MAAM,OAAO,CAAC,KAAK,KAAK,SAAS,QAAQ,EAAE,KAAK,KAAK,SAAS,UAAU,CAAC;AAEzE,MAAK,MAAM,OAAO,KAChB,KAAI,WAAW,IAAI,CACjB,KAAI;EACF,MAAM,QAAQ,YAAY,IAAI;AAC9B,QAAM,KAAK,GAAG,MAAM,KAAI,MAAK,EAAE,aAAa,CAAC,CAAC;SACxC;AAMZ,QAAO"}
@@ -1,13 +1,20 @@
1
- export declare function getGitignoredPaths(appRoot: string): Set<string>;
2
- export declare function scanProject(appRoot: string): {
3
- routes: string[];
4
- pages: string[];
5
- components: string[];
6
- apiRoutes: string[];
7
- metadata: import("./scanMetadata.js").ScanMetadataResult;
8
- envNames: string[];
9
- dependencies: Record<string, string>;
10
- i18nWords: string[];
11
- contentTexts: import("./scanContent.js").ScanResult[];
12
- endpoints: string[];
1
+ import { ScanMetadataResult } from "./scanMetadata.js";
2
+ import { ScanResult } from "./scanContent.js";
3
+
4
+ //#region src/halal-core/scanner/scanProject.d.ts
5
+ declare function getGitignoredPaths(appRoot: string): Set<string>;
6
+ declare function scanProject(appRoot: string): {
7
+ routes: string[];
8
+ pages: string[];
9
+ components: string[];
10
+ apiRoutes: string[];
11
+ metadata: ScanMetadataResult;
12
+ envNames: string[];
13
+ dependencies: Record<string, string>;
14
+ i18nWords: string[];
15
+ contentTexts: ScanResult[];
16
+ endpoints: string[];
13
17
  };
18
+ //#endregion
19
+ export { getGitignoredPaths, scanProject };
20
+ //# sourceMappingURL=scanProject.d.ts.map
@@ -1,5 +1,3 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import path from "node:path";
3
1
  import { scanRoutes } from "./scanRoutes.js";
4
2
  import { scanPages } from "./scanPages.js";
5
3
  import { scanComponents } from "./scanComponents.js";
@@ -10,53 +8,50 @@ import { scanDependencies } from "./scanDependencies.js";
10
8
  import { scanTranslations } from "./scanTranslations.js";
11
9
  import { scanContentFiles } from "./scanContent.js";
12
10
  import { scanDomains } from "./scanDomains.js";
13
- export function getGitignoredPaths(appRoot) {
14
- const ignored = new Set();
15
- const gitignorePath = path.join(appRoot, ".gitignore");
16
- if (existsSync(gitignorePath)) {
17
- try {
18
- const content = readFileSync(gitignorePath, "utf8");
19
- const lines = content.split(/\r?\n/);
20
- for (const line of lines) {
21
- const trimmed = line.trim();
22
- if (trimmed && !trimmed.startsWith("#")) {
23
- // Preserve a leading slash so root-anchored gitignore rules stay anchored.
24
- const cleaned = trimmed.replace(/\/$/, "");
25
- if (cleaned) {
26
- ignored.add(cleaned);
27
- }
28
- }
29
- }
30
- }
31
- catch {
32
- // Ignore errors
33
- }
34
- }
35
- return ignored;
11
+ import { existsSync, readFileSync } from "node:fs";
12
+ import path from "node:path";
13
+
14
+ //#region src/halal-core/scanner/scanProject.ts
15
+ function getGitignoredPaths(appRoot) {
16
+ const ignored = /* @__PURE__ */ new Set();
17
+ const gitignorePath = path.join(appRoot, ".gitignore");
18
+ if (existsSync(gitignorePath)) try {
19
+ const lines = readFileSync(gitignorePath, "utf8").split(/\r?\n/);
20
+ for (const line of lines) {
21
+ const trimmed = line.trim();
22
+ if (trimmed && !trimmed.startsWith("#")) {
23
+ const cleaned = trimmed.replace(/\/$/, "");
24
+ if (cleaned) ignored.add(cleaned);
25
+ }
26
+ }
27
+ } catch {}
28
+ return ignored;
36
29
  }
37
- export function scanProject(appRoot) {
38
- const ignored = getGitignoredPaths(appRoot);
39
- const routes = scanRoutes(appRoot);
40
- const pages = scanPages(appRoot);
41
- const components = scanComponents(appRoot);
42
- const apiRoutes = scanApiRoutes(appRoot);
43
- const metadata = scanMetadata(appRoot);
44
- const envNames = scanEnvNames(appRoot);
45
- const dependencies = scanDependencies(appRoot);
46
- const i18nWords = scanTranslations(appRoot);
47
- const contentTexts = scanContentFiles(appRoot, appRoot, ignored);
48
- const endpoints = scanDomains(contentTexts);
49
- return {
50
- routes,
51
- pages,
52
- components,
53
- apiRoutes,
54
- metadata,
55
- envNames,
56
- dependencies,
57
- i18nWords,
58
- contentTexts,
59
- endpoints
60
- };
30
+ function scanProject(appRoot) {
31
+ const ignored = getGitignoredPaths(appRoot);
32
+ const routes = scanRoutes(appRoot);
33
+ const pages = scanPages(appRoot);
34
+ const components = scanComponents(appRoot);
35
+ const apiRoutes = scanApiRoutes(appRoot);
36
+ const metadata = scanMetadata(appRoot);
37
+ const envNames = scanEnvNames(appRoot);
38
+ const dependencies = scanDependencies(appRoot);
39
+ const i18nWords = scanTranslations(appRoot);
40
+ const contentTexts = scanContentFiles(appRoot, appRoot, ignored);
41
+ return {
42
+ routes,
43
+ pages,
44
+ components,
45
+ apiRoutes,
46
+ metadata,
47
+ envNames,
48
+ dependencies,
49
+ i18nWords,
50
+ contentTexts,
51
+ endpoints: scanDomains(contentTexts)
52
+ };
61
53
  }
54
+
55
+ //#endregion
56
+ export { getGitignoredPaths, scanProject };
62
57
  //# sourceMappingURL=scanProject.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanProject.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanProject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEvD,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACrC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;gBAC5B,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBACxC,2EAA2E;oBAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBAC3C,IAAI,OAAO,EAAE,CAAC;wBACZ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACvB,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,MAAM,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IAE5C,OAAO;QACL,MAAM;QACN,KAAK;QACL,UAAU;QACV,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,SAAS;KACV,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"scanProject.js","names":[],"sources":["../../../src/halal-core/scanner/scanProject.ts"],"sourcesContent":["import { existsSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { scanRoutes } from \"./scanRoutes.js\";\nimport { scanPages } from \"./scanPages.js\";\nimport { scanComponents } from \"./scanComponents.js\";\nimport { scanApiRoutes } from \"./scanApiRoutes.js\";\nimport { scanMetadata } from \"./scanMetadata.js\";\nimport { scanEnvNames } from \"./scanEnvNames.js\";\nimport { scanDependencies } from \"./scanDependencies.js\";\nimport { scanTranslations } from \"./scanTranslations.js\";\nimport { scanContentFiles } from \"./scanContent.js\";\nimport { scanDomains } from \"./scanDomains.js\";\n\nexport function getGitignoredPaths(appRoot: string): Set<string> {\n const ignored = new Set<string>();\n const gitignorePath = path.join(appRoot, \".gitignore\");\n \n if (existsSync(gitignorePath)) {\n try {\n const content = readFileSync(gitignorePath, \"utf8\");\n const lines = content.split(/\\r?\\n/);\n for (const line of lines) {\n const trimmed = line.trim();\n if (trimmed && !trimmed.startsWith(\"#\")) {\n // Preserve a leading slash so root-anchored gitignore rules stay anchored.\n const cleaned = trimmed.replace(/\\/$/, \"\");\n if (cleaned) {\n ignored.add(cleaned);\n }\n }\n }\n } catch {\n // Ignore errors\n }\n }\n \n return ignored;\n}\n\nexport function scanProject(appRoot: string) {\n const ignored = getGitignoredPaths(appRoot);\n \n const routes = scanRoutes(appRoot);\n const pages = scanPages(appRoot);\n const components = scanComponents(appRoot);\n const apiRoutes = scanApiRoutes(appRoot);\n const metadata = scanMetadata(appRoot);\n const envNames = scanEnvNames(appRoot);\n const dependencies = scanDependencies(appRoot);\n const i18nWords = scanTranslations(appRoot);\n \n const contentTexts = scanContentFiles(appRoot, appRoot, ignored);\n const endpoints = scanDomains(contentTexts);\n \n return {\n routes,\n pages,\n components,\n apiRoutes,\n metadata,\n envNames,\n dependencies,\n i18nWords,\n contentTexts,\n endpoints\n };\n}"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,mBAAmB,SAA8B;CAC/D,MAAM,0BAAU,IAAI,KAAa;CACjC,MAAM,gBAAgB,KAAK,KAAK,SAAS,aAAa;AAEtD,KAAI,WAAW,cAAc,CAC3B,KAAI;EAEF,MAAM,QADU,aAAa,eAAe,OAAO,CAC7B,MAAM,QAAQ;AACpC,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,UAAU,KAAK,MAAM;AAC3B,OAAI,WAAW,CAAC,QAAQ,WAAW,IAAI,EAAE;IAEvC,MAAM,UAAU,QAAQ,QAAQ,OAAO,GAAG;AAC1C,QAAI,QACF,SAAQ,IAAI,QAAQ;;;SAIpB;AAKV,QAAO;;AAGT,SAAgB,YAAY,SAAiB;CAC3C,MAAM,UAAU,mBAAmB,QAAQ;CAE3C,MAAM,SAAS,WAAW,QAAQ;CAClC,MAAM,QAAQ,UAAU,QAAQ;CAChC,MAAM,aAAa,eAAe,QAAQ;CAC1C,MAAM,YAAY,cAAc,QAAQ;CACxC,MAAM,WAAW,aAAa,QAAQ;CACtC,MAAM,WAAW,aAAa,QAAQ;CACtC,MAAM,eAAe,iBAAiB,QAAQ;CAC9C,MAAM,YAAY,iBAAiB,QAAQ;CAE3C,MAAM,eAAe,iBAAiB,SAAS,SAAS,QAAQ;AAGhE,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAZgB,YAAY,aAAa;EAa1C"}
@@ -1 +1,5 @@
1
- export declare function scanRoutes(appRoot: string): string[];
1
+ //#region src/halal-core/scanner/scanRoutes.d.ts
2
+ declare function scanRoutes(appRoot: string): string[];
3
+ //#endregion
4
+ export { scanRoutes };
5
+ //# sourceMappingURL=scanRoutes.d.ts.map
@@ -1,43 +1,37 @@
1
1
  import { existsSync, readdirSync, statSync } from "node:fs";
2
2
  import path from "node:path";
3
- export function scanRoutes(appRoot) {
4
- const routes = [];
5
- const pagesDir = path.join(appRoot, "pages");
6
- if (!existsSync(pagesDir)) {
7
- return routes;
8
- }
9
- function traverse(dir) {
10
- let files = [];
11
- try {
12
- files = readdirSync(dir);
13
- }
14
- catch {
15
- return;
16
- }
17
- for (const file of files) {
18
- const fullPath = path.join(dir, file);
19
- let stats;
20
- try {
21
- stats = statSync(fullPath);
22
- }
23
- catch {
24
- continue;
25
- }
26
- if (stats.isDirectory()) {
27
- traverse(fullPath);
28
- }
29
- else if (stats.isFile()) {
30
- const relative = path.relative(pagesDir, fullPath).replace(/\\/g, "/");
31
- // Convert page file path to route name
32
- const routeName = relative
33
- .replace(/\.(vue|ts|js|jsx|tsx)$/, "")
34
- .replace(/\/index$/, "")
35
- .replace(/^index$/, "/");
36
- routes.push(routeName);
37
- }
38
- }
39
- }
40
- traverse(pagesDir);
41
- return routes;
3
+
4
+ //#region src/halal-core/scanner/scanRoutes.ts
5
+ function scanRoutes(appRoot) {
6
+ const routes = [];
7
+ const pagesDir = path.join(appRoot, "pages");
8
+ if (!existsSync(pagesDir)) return routes;
9
+ function traverse(dir) {
10
+ let files = [];
11
+ try {
12
+ files = readdirSync(dir);
13
+ } catch {
14
+ return;
15
+ }
16
+ for (const file of files) {
17
+ const fullPath = path.join(dir, file);
18
+ let stats;
19
+ try {
20
+ stats = statSync(fullPath);
21
+ } catch {
22
+ continue;
23
+ }
24
+ if (stats.isDirectory()) traverse(fullPath);
25
+ else if (stats.isFile()) {
26
+ const routeName = path.relative(pagesDir, fullPath).replace(/\\/g, "/").replace(/\.(vue|ts|js|jsx|tsx)$/, "").replace(/\/index$/, "").replace(/^index$/, "/");
27
+ routes.push(routeName);
28
+ }
29
+ }
30
+ }
31
+ traverse(pagesDir);
32
+ return routes;
42
33
  }
34
+
35
+ //#endregion
36
+ export { scanRoutes };
43
37
  //# sourceMappingURL=scanRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanRoutes.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE7C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,SAAS,QAAQ,CAAC,GAAW;QAC3B,IAAI,KAAK,GAAa,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO;QACT,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACtC,IAAI,KAAK,CAAC;YACV,IAAI,CAAC;gBACH,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC;YAAC,MAAM,CAAC;gBACP,SAAS;YACX,CAAC;YAED,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACrB,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;gBAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;gBACvE,uCAAuC;gBACvC,MAAM,SAAS,GAAG,QAAQ;qBACvB,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC;qBACrC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;qBACvB,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;gBAC3B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACnB,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"scanRoutes.js","names":[],"sources":["../../../src/halal-core/scanner/scanRoutes.ts"],"sourcesContent":["import { existsSync, readdirSync, statSync } from \"node:fs\";\nimport path from \"node:path\";\n\nexport function scanRoutes(appRoot: string): string[] {\n const routes: string[] = [];\n const pagesDir = path.join(appRoot, \"pages\");\n\n if (!existsSync(pagesDir)) {\n return routes;\n }\n\n function traverse(dir: string) {\n let files: string[] = [];\n try {\n files = readdirSync(dir);\n } catch {\n return;\n }\n\n for (const file of files) {\n const fullPath = path.join(dir, file);\n let stats;\n try {\n stats = statSync(fullPath);\n } catch {\n continue;\n }\n\n if (stats.isDirectory()) {\n traverse(fullPath);\n } else if (stats.isFile()) {\n const relative = path.relative(pagesDir, fullPath).replace(/\\\\/g, \"/\");\n // Convert page file path to route name\n const routeName = relative\n .replace(/\\.(vue|ts|js|jsx|tsx)$/, \"\")\n .replace(/\\/index$/, \"\")\n .replace(/^index$/, \"/\");\n routes.push(routeName);\n }\n }\n }\n\n traverse(pagesDir);\n return routes;\n}\n"],"mappings":";;;;AAGA,SAAgB,WAAW,SAA2B;CACpD,MAAM,SAAmB,EAAE;CAC3B,MAAM,WAAW,KAAK,KAAK,SAAS,QAAQ;AAE5C,KAAI,CAAC,WAAW,SAAS,CACvB,QAAO;CAGT,SAAS,SAAS,KAAa;EAC7B,IAAI,QAAkB,EAAE;AACxB,MAAI;AACF,WAAQ,YAAY,IAAI;UAClB;AACN;;AAGF,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,WAAW,KAAK,KAAK,KAAK,KAAK;GACrC,IAAI;AACJ,OAAI;AACF,YAAQ,SAAS,SAAS;WACpB;AACN;;AAGF,OAAI,MAAM,aAAa,CACrB,UAAS,SAAS;YACT,MAAM,QAAQ,EAAE;IAGzB,MAAM,YAFW,KAAK,SAAS,UAAU,SAAS,CAAC,QAAQ,OAAO,IAAI,CAGnE,QAAQ,0BAA0B,GAAG,CACrC,QAAQ,YAAY,GAAG,CACvB,QAAQ,WAAW,IAAI;AAC1B,WAAO,KAAK,UAAU;;;;AAK5B,UAAS,SAAS;AAClB,QAAO"}
@@ -1 +1,5 @@
1
- export declare function scanTranslations(appRoot: string): string[];
1
+ //#region src/halal-core/scanner/scanTranslations.d.ts
2
+ declare function scanTranslations(appRoot: string): string[];
3
+ //#endregion
4
+ export { scanTranslations };
5
+ //# sourceMappingURL=scanTranslations.d.ts.map
@@ -1,32 +1,25 @@
1
- import { existsSync, readdirSync, readFileSync } from "node:fs";
1
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
2
2
  import path from "node:path";
3
- export function scanTranslations(appRoot) {
4
- const words = [];
5
- const i18nDir = path.join(appRoot, "i18n");
6
- if (existsSync(i18nDir)) {
7
- try {
8
- const files = readdirSync(i18nDir).filter(f => f.endsWith(".json"));
9
- for (const file of files) {
10
- const content = readFileSync(path.join(i18nDir, file), "utf8");
11
- // Simple search for raw translation strings
12
- const json = JSON.parse(content);
13
- const extractStrings = (obj) => {
14
- if (typeof obj === "string") {
15
- words.push(obj);
16
- }
17
- else if (typeof obj === "object" && obj !== null) {
18
- for (const key of Object.keys(obj)) {
19
- extractStrings(obj[key]);
20
- }
21
- }
22
- };
23
- extractStrings(json);
24
- }
25
- }
26
- catch {
27
- // Ignore
28
- }
29
- }
30
- return words;
3
+
4
+ //#region src/halal-core/scanner/scanTranslations.ts
5
+ function scanTranslations(appRoot) {
6
+ const words = [];
7
+ const i18nDir = path.join(appRoot, "i18n");
8
+ if (existsSync(i18nDir)) try {
9
+ const files = readdirSync(i18nDir).filter((f) => f.endsWith(".json"));
10
+ for (const file of files) {
11
+ const content = readFileSync(path.join(i18nDir, file), "utf8");
12
+ const json = JSON.parse(content);
13
+ const extractStrings = (obj) => {
14
+ if (typeof obj === "string") words.push(obj);
15
+ else if (typeof obj === "object" && obj !== null) for (const key of Object.keys(obj)) extractStrings(obj[key]);
16
+ };
17
+ extractStrings(json);
18
+ }
19
+ } catch {}
20
+ return words;
31
21
  }
22
+
23
+ //#endregion
24
+ export { scanTranslations };
32
25
  //# sourceMappingURL=scanTranslations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanTranslations.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanTranslations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAE3C,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;YACpE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;gBAC/D,4CAA4C;gBAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,cAAc,GAAG,CAAC,GAAQ,EAAE,EAAE;oBAClC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;wBAC5B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAClB,CAAC;yBAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;wBACnD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;4BACnC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;wBAC3B,CAAC;oBACH,CAAC;gBACH,CAAC,CAAC;gBACF,cAAc,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"scanTranslations.js","names":[],"sources":["../../../src/halal-core/scanner/scanTranslations.ts"],"sourcesContent":["import { existsSync, readdirSync, readFileSync } from \"node:fs\";\nimport path from \"node:path\";\n\nexport function scanTranslations(appRoot: string): string[] {\n const words: string[] = [];\n const i18nDir = path.join(appRoot, \"i18n\");\n\n if (existsSync(i18nDir)) {\n try {\n const files = readdirSync(i18nDir).filter(f => f.endsWith(\".json\"));\n for (const file of files) {\n const content = readFileSync(path.join(i18nDir, file), \"utf8\");\n // Simple search for raw translation strings\n const json = JSON.parse(content);\n const extractStrings = (obj: any) => {\n if (typeof obj === \"string\") {\n words.push(obj);\n } else if (typeof obj === \"object\" && obj !== null) {\n for (const key of Object.keys(obj)) {\n extractStrings(obj[key]);\n }\n }\n };\n extractStrings(json);\n }\n } catch {\n // Ignore\n }\n }\n\n return words;\n}\n"],"mappings":";;;;AAGA,SAAgB,iBAAiB,SAA2B;CAC1D,MAAM,QAAkB,EAAE;CAC1B,MAAM,UAAU,KAAK,KAAK,SAAS,OAAO;AAE1C,KAAI,WAAW,QAAQ,CACrB,KAAI;EACF,MAAM,QAAQ,YAAY,QAAQ,CAAC,QAAO,MAAK,EAAE,SAAS,QAAQ,CAAC;AACnE,OAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,UAAU,aAAa,KAAK,KAAK,SAAS,KAAK,EAAE,OAAO;GAE9D,MAAM,OAAO,KAAK,MAAM,QAAQ;GAChC,MAAM,kBAAkB,QAAa;AACnC,QAAI,OAAO,QAAQ,SACjB,OAAM,KAAK,IAAI;aACN,OAAO,QAAQ,YAAY,QAAQ,KAC5C,MAAK,MAAM,OAAO,OAAO,KAAK,IAAI,CAChC,gBAAe,IAAI,KAAK;;AAI9B,kBAAe,KAAK;;SAEhB;AAKV,QAAO"}