resuxjs 0.3.11 → 0.4.0-beta.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 (361) hide show
  1. package/README.md +23 -1
  2. package/dist/bin.d.ts +1 -2
  3. package/dist/bin.js +4 -0
  4. package/dist/bin.js.map +1 -1
  5. package/dist/build/index.d.ts +28 -0
  6. package/dist/build/index.js +51 -0
  7. package/dist/build/index.js.map +1 -0
  8. package/dist/cli.d.ts +15 -5
  9. package/dist/cli.js +2648 -3671
  10. package/dist/cli.js.map +1 -1
  11. package/dist/compiler/adapter.d.ts +14 -11
  12. package/dist/compiler/adapter.js +68 -93
  13. package/dist/compiler/adapter.js.map +1 -1
  14. package/dist/compiler/dev-warnings.d.ts +8 -5
  15. package/dist/compiler/dev-warnings.js +248 -321
  16. package/dist/compiler/dev-warnings.js.map +1 -1
  17. package/dist/compiler/directives.d.ts +3 -0
  18. package/dist/compiler/directives.js +124 -150
  19. package/dist/compiler/directives.js.map +1 -1
  20. package/dist/compiler/implementation.d.ts +96 -93
  21. package/dist/compiler/implementation.js +2967 -3430
  22. package/dist/compiler/index.d.ts +14 -11
  23. package/dist/compiler/index.js +68 -93
  24. package/dist/compiler/index.js.map +1 -1
  25. package/dist/core/config.d.ts +12 -5
  26. package/dist/core/config.js +42 -25
  27. package/dist/core/config.js.map +1 -1
  28. package/dist/core/hooks.d.ts +127 -126
  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 +5 -5
  33. package/dist/core/module-container.d.ts +76 -74
  34. package/dist/core/module-container.js +181 -186
  35. package/dist/core/module-container.js.map +1 -1
  36. package/dist/core/resux.d.ts +15 -12
  37. package/dist/core/resux.js +17 -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 +4 -0
  41. package/dist/create-bin.js.map +1 -1
  42. package/dist/create.d.ts +3 -0
  43. package/dist/create.js +499 -638
  44. package/dist/create.js.map +1 -1
  45. package/dist/deploy/cloudflare.d.ts +4 -1
  46. package/dist/deploy/cloudflare.js +30 -34
  47. package/dist/deploy/cloudflare.js.map +1 -1
  48. package/dist/deploy/common.d.ts +6 -4
  49. package/dist/deploy/common.js +118 -188
  50. package/dist/deploy/common.js.map +1 -1
  51. package/dist/deploy/framework-runtime.d.ts +3 -0
  52. package/dist/deploy/framework-runtime.js +43 -48
  53. package/dist/deploy/framework-runtime.js.map +1 -1
  54. package/dist/deploy/index.d.ts +4 -1
  55. package/dist/deploy/index.js +58 -80
  56. package/dist/deploy/index.js.map +1 -1
  57. package/dist/deploy/netlify.d.ts +4 -1
  58. package/dist/deploy/netlify.js +40 -41
  59. package/dist/deploy/netlify.js.map +1 -1
  60. package/dist/deploy/node.d.ts +4 -1
  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 +3 -0
  64. package/dist/deploy/production-report.js +14 -14
  65. package/dist/deploy/production-report.js.map +1 -1
  66. package/dist/deploy/runtime-dependencies.d.ts +3 -0
  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 +4 -1
  70. package/dist/deploy/static.js +16 -14
  71. package/dist/deploy/static.js.map +1 -1
  72. package/dist/deploy/types.d.ts +25 -22
  73. package/dist/deploy/types.js +0 -1
  74. package/dist/deploy/vercel.d.ts +4 -1
  75. package/dist/deploy/vercel.js +137 -188
  76. package/dist/deploy/vercel.js.map +1 -1
  77. package/dist/fonts/index.d.ts +15 -11
  78. package/dist/fonts/index.js +114 -134
  79. package/dist/fonts/index.js.map +1 -1
  80. package/dist/globals.d.ts +79 -78
  81. package/dist/globals.js +0 -1
  82. package/dist/halal-core/ai/classifyProject.d.ts +4 -1
  83. package/dist/halal-core/ai/classifyProject.js +81 -95
  84. package/dist/halal-core/ai/classifyProject.js.map +1 -1
  85. package/dist/halal-core/ai/classifyRuntimeContent.d.ts +5 -2
  86. package/dist/halal-core/ai/classifyRuntimeContent.js +77 -95
  87. package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
  88. package/dist/halal-core/ai/createProjectSummary.d.ts +38 -35
  89. package/dist/halal-core/ai/createProjectSummary.js +38 -39
  90. package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
  91. package/dist/halal-core/ai/halalClassifierPrompt.d.ts +3 -0
  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 +3 -0
  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 +4 -1
  98. package/dist/halal-core/ai/validateAiResponse.js +58 -85
  99. package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
  100. package/dist/halal-core/cli/check.d.ts +3 -0
  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 +3 -0
  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 +3 -0
  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 +3 -0
  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 +3 -0
  113. package/dist/halal-core/cli/verifyReview.js +18 -15
  114. package/dist/halal-core/cli/verifyReview.js.map +1 -1
  115. package/dist/halal-core/config.d.ts +30 -27
  116. package/dist/halal-core/config.js +76 -118
  117. package/dist/halal-core/config.js.map +1 -1
  118. package/dist/halal-core/crypto/integrity.d.ts +6 -3
  119. package/dist/halal-core/crypto/integrity.js +64 -87
  120. package/dist/halal-core/crypto/integrity.js.map +1 -1
  121. package/dist/halal-core/enforce.d.ts +3 -0
  122. package/dist/halal-core/enforce.js +92 -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 +18 -19
  126. package/dist/halal-core/lifecycle.d.ts +3 -0
  127. package/dist/halal-core/lifecycle.js +15 -13
  128. package/dist/halal-core/lifecycle.js.map +1 -1
  129. package/dist/halal-core/policy.d.ts +4 -1
  130. package/dist/halal-core/policy.js +6 -2
  131. package/dist/halal-core/policy.js.map +1 -1
  132. package/dist/halal-core/report/formatBrowserOverlay.d.ts +4 -1
  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 +4 -1
  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 +7 -4
  139. package/dist/halal-core/report/generateHalalReport.js +26 -26
  140. package/dist/halal-core/report/generateHalalReport.js.map +1 -1
  141. package/dist/halal-core/report/signReport.d.ts +4 -1
  142. package/dist/halal-core/report/signReport.js +16 -12
  143. package/dist/halal-core/report/signReport.js.map +1 -1
  144. package/dist/halal-core/report/verifyReport.d.ts +9 -6
  145. package/dist/halal-core/report/verifyReport.js +51 -41
  146. package/dist/halal-core/report/verifyReport.js.map +1 -1
  147. package/dist/halal-core/review/createReviewRequest.d.ts +4 -1
  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 +3 -0
  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 +11 -8
  154. package/dist/halal-core/review/signedReviewFile.js +24 -22
  155. package/dist/halal-core/review/signedReviewFile.js.map +1 -1
  156. package/dist/halal-core/review/verifyReviewApproval.d.ts +9 -6
  157. package/dist/halal-core/review/verifyReviewApproval.js +68 -62
  158. package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
  159. package/dist/halal-core/rules/adultContentRules.d.ts +3 -0
  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 +3 -0
  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 +3 -0
  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 +7 -4
  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 +3 -0
  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 +21 -18
  175. package/dist/halal-core/rules/defaultBlockedRules.js +158 -199
  176. package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
  177. package/dist/halal-core/rules/dependencyRules.d.ts +8 -5
  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 +6 -3
  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 +3 -0
  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 +3 -0
  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 +3 -0
  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 +3 -0
  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 +3 -0
  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 +11 -8
  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 +3 -0
  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 +3 -0
  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 +3 -0
  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 +3 -0
  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 +17 -14
  214. package/dist/halal-core/runtime/guard.js +162 -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 +4 -5
  218. package/dist/halal-core/runtime/reviewedMemory.d.ts +4 -1
  219. package/dist/halal-core/runtime/reviewedMemory.js +74 -110
  220. package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
  221. package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +10 -7
  222. package/dist/halal-core/runtime/serializeRuntimeContent.js +132 -156
  223. package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
  224. package/dist/halal-core/runtime/types.d.ts +44 -41
  225. package/dist/halal-core/runtime/types.js +0 -1
  226. package/dist/halal-core/scanner/scanApiRoutes.d.ts +3 -0
  227. package/dist/halal-core/scanner/scanApiRoutes.js +32 -36
  228. package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
  229. package/dist/halal-core/scanner/scanComponents.d.ts +3 -0
  230. package/dist/halal-core/scanner/scanComponents.js +12 -13
  231. package/dist/halal-core/scanner/scanComponents.js.map +1 -1
  232. package/dist/halal-core/scanner/scanContent.d.ts +5 -2
  233. package/dist/halal-core/scanner/scanContent.js +193 -263
  234. package/dist/halal-core/scanner/scanContent.js.map +1 -1
  235. package/dist/halal-core/scanner/scanDependencies.d.ts +3 -0
  236. package/dist/halal-core/scanner/scanDependencies.js +16 -15
  237. package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
  238. package/dist/halal-core/scanner/scanDomains.d.ts +5 -2
  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 +3 -0
  242. package/dist/halal-core/scanner/scanEnvNames.js +23 -26
  243. package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
  244. package/dist/halal-core/scanner/scanMetadata.d.ts +6 -3
  245. package/dist/halal-core/scanner/scanMetadata.js +20 -29
  246. package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
  247. package/dist/halal-core/scanner/scanPages.d.ts +3 -0
  248. package/dist/halal-core/scanner/scanPages.js +12 -15
  249. package/dist/halal-core/scanner/scanPages.js.map +1 -1
  250. package/dist/halal-core/scanner/scanProject.d.ts +15 -10
  251. package/dist/halal-core/scanner/scanProject.js +43 -49
  252. package/dist/halal-core/scanner/scanProject.js.map +1 -1
  253. package/dist/halal-core/scanner/scanRoutes.d.ts +3 -0
  254. package/dist/halal-core/scanner/scanRoutes.js +32 -39
  255. package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
  256. package/dist/halal-core/scanner/scanTranslations.d.ts +3 -0
  257. package/dist/halal-core/scanner/scanTranslations.js +21 -29
  258. package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
  259. package/dist/halal-core/status.d.ts +14 -11
  260. package/dist/halal-core/status.js +0 -1
  261. package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +3 -0
  262. package/dist/halal-core/tamper/verifyCoreIntegrity.js +26 -24
  263. package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
  264. package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +3 -0
  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 +6 -3
  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 +18 -2
  272. package/dist/i18n/index.d.ts +34 -31
  273. package/dist/i18n/index.js +219 -288
  274. package/dist/i18n/index.js.map +1 -1
  275. package/dist/i18n/shared.d.ts +18 -15
  276. package/dist/i18n/shared.js +204 -266
  277. package/dist/i18n/shared.js.map +1 -1
  278. package/dist/icons/index.d.ts +143 -139
  279. package/dist/icons/index.js +322 -273
  280. package/dist/icons/index.js.map +1 -1
  281. package/dist/index.d.ts +8 -1
  282. package/dist/index.js +7 -2
  283. package/dist/kit/index.d.ts +9 -6
  284. package/dist/kit/index.js +45 -43
  285. package/dist/kit/index.js.map +1 -1
  286. package/dist/nitro-server/index.d.ts +7 -4
  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 +6 -3
  290. package/dist/node.js +88 -116
  291. package/dist/node.js.map +1 -1
  292. package/dist/reactivity/computed.d.ts +6 -3
  293. package/dist/reactivity/computed.js +46 -53
  294. package/dist/reactivity/computed.js.map +1 -1
  295. package/dist/reactivity/effect.d.ts +8 -5
  296. package/dist/reactivity/effect.js +105 -146
  297. package/dist/reactivity/effect.js.map +1 -1
  298. package/dist/reactivity/index.d.ts +8 -8
  299. package/dist/reactivity/index.js +7 -8
  300. package/dist/reactivity/reactive.d.ts +3 -0
  301. package/dist/reactivity/reactive.js +93 -133
  302. package/dist/reactivity/reactive.js.map +1 -1
  303. package/dist/reactivity/readonly.d.ts +2 -1
  304. package/dist/reactivity/readonly.js +2 -2
  305. package/dist/reactivity/ref.d.ts +15 -15
  306. package/dist/reactivity/ref.js +73 -81
  307. package/dist/reactivity/ref.js.map +1 -1
  308. package/dist/reactivity/scheduler.d.ts +3 -1
  309. package/dist/reactivity/scheduler.js +67 -69
  310. package/dist/reactivity/scheduler.js.map +1 -1
  311. package/dist/reactivity/types.d.ts +17 -14
  312. package/dist/reactivity/types.js +0 -1
  313. package/dist/reactivity/utils.d.ts +7 -4
  314. package/dist/reactivity/utils.js +25 -24
  315. package/dist/reactivity/utils.js.map +1 -1
  316. package/dist/reactivity/watch.d.ts +4 -2
  317. package/dist/reactivity/watch.js +75 -103
  318. package/dist/reactivity/watch.js.map +1 -1
  319. package/dist/runtime/core.d.ts +31 -0
  320. package/dist/runtime/core.js +156 -0
  321. package/dist/runtime/core.js.map +1 -0
  322. package/dist/runtime/index.d.ts +487 -461
  323. package/dist/runtime/index.js +4129 -5254
  324. package/dist/runtime/index.js.map +1 -1
  325. package/dist/runtime/reactivity.d.ts +7 -0
  326. package/dist/runtime/reactivity.js +6 -0
  327. package/dist/runtime/resume.d.ts +79 -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 +20 -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 +24 -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 +32 -0
  337. package/dist/security/media-fetch.js +301 -0
  338. package/dist/security/media-fetch.js.map +1 -0
  339. package/dist/security/path-boundary.d.ts +7 -0
  340. package/dist/security/path-boundary.js +70 -0
  341. package/dist/security/path-boundary.js.map +1 -0
  342. package/dist/ui/index.d.ts +1580 -1576
  343. package/dist/ui/index.js +975 -674
  344. package/dist/ui/index.js.map +1 -1
  345. package/dist/vite-builder/index.d.ts +6 -3
  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 +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,IAAY;CAChC,MAAM,WAAW;CAEjB,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI;EACJ,QAAQ,QAAQ,SAAS,KAAK,KAAK,IAAI,OAAO,MAC5C,IAAI,MAAM,IACR,QAAQ,IAAI,MAAM,EAAE,CAAC,YAAY,CAAC;CAGxC;CAEA,OAAO,MAAM,KAAK,OAAO;AAC3B"}
@@ -1 +1,4 @@
1
+ //#region src/halal-core/scanner/scanEnvNames.d.ts
1
2
  export declare function scanEnvNames(appRoot: string): string[];
3
+ //#endregion
4
+ //# sourceMappingURL=scanEnvNames.d.ts.map
@@ -1,30 +1,27 @@
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
+ //#region src/halal-core/scanner/scanEnvNames.ts
4
+ function scanEnvNames(appRoot) {
5
+ const envNames = /* @__PURE__ */ new Set();
6
+ try {
7
+ const files = readdirSync(appRoot).filter((f) => f.startsWith(".env"));
8
+ for (const file of files) {
9
+ const fullPath = path.join(appRoot, file);
10
+ if (existsSync(fullPath)) {
11
+ const lines = readFileSync(fullPath, "utf8").split(/\r?\n/);
12
+ for (const line of lines) {
13
+ const trimmed = line.trim();
14
+ if (trimmed && !trimmed.startsWith("#")) {
15
+ const name = trimmed.split("=")[0]?.trim();
16
+ if (name) envNames.add(name);
17
+ }
18
+ }
19
+ }
20
+ }
21
+ } catch {}
22
+ return Array.from(envNames);
29
23
  }
24
+ //#endregion
25
+ export { scanEnvNames };
26
+
30
27
  //# 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,IAAY;CAEjC,IAAI;EACF,MAAM,QAAQ,YAAY,OAAO,CAAC,CAAC,QAAO,MAAK,EAAE,WAAW,MAAM,CAAC;EACnE,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,WAAW,KAAK,KAAK,SAAS,IAAI;GACxC,IAAI,WAAW,QAAQ,GAAG;IAExB,MAAM,QADU,aAAa,UAAU,MACnB,CAAC,CAAC,MAAM,OAAO;IACnC,KAAK,MAAM,QAAQ,OAAO;KACxB,MAAM,UAAU,KAAK,KAAK;KAC1B,IAAI,WAAW,CAAC,QAAQ,WAAW,GAAG,GAAG;MAEvC,MAAM,OADQ,QAAQ,MAAM,GACX,CAAC,CAAC,EAAE,EAAE,KAAK;MAC5B,IAAI,MACF,SAAS,IAAI,IAAI;KAErB;IACF;GACF;EACF;CACF,QAAQ,CAER;CAEA,OAAO,MAAM,KAAK,QAAQ;AAC5B"}
@@ -1,6 +1,9 @@
1
+ //#region src/halal-core/scanner/scanMetadata.d.ts
1
2
  export interface ScanMetadataResult {
2
- title?: string;
3
- description?: string;
4
- meta?: Record<string, string>;
3
+ title?: string;
4
+ description?: string;
5
+ meta?: Record<string, string>;
5
6
  }
6
7
  export declare function scanMetadata(appRoot: string): ScanMetadataResult;
8
+ //#endregion
9
+ //# sourceMappingURL=scanMetadata.d.ts.map
@@ -1,33 +1,24 @@
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
+ //#region src/halal-core/scanner/scanMetadata.ts
4
+ function scanMetadata(appRoot) {
5
+ const result = { meta: {} };
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) if (existsSync(file)) try {
13
+ const content = readFileSync(file, "utf8");
14
+ const titleMatch = content.match(/title:\s*["']([^"']+)["']/);
15
+ if (titleMatch && titleMatch[1]) result.title = titleMatch[1];
16
+ const descMatch = content.match(/description:\s*["']([^"']+)["']/);
17
+ if (descMatch && descMatch[1]) result.description = descMatch[1];
18
+ } catch {}
19
+ return result;
32
20
  }
21
+ //#endregion
22
+ export { scanMetadata };
23
+
33
24
  //# 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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Metadata.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,CAAC,EAAE;CAG9C,MAAM,gBAAgB;EACpB,KAAK,KAAK,SAAS,eAAe;EAClC,KAAK,KAAK,SAAS,eAAe;EAClC,KAAK,KAAK,SAAS,iBAAiB;EACpC,KAAK,KAAK,SAAS,iBAAiB;CACtC;CAEA,KAAK,MAAM,QAAQ,eACjB,IAAI,WAAW,IAAI,GACjB,IAAI;EACF,MAAM,UAAU,aAAa,MAAM,MAAM;EAEzC,MAAM,aAAa,QAAQ,MAAM,2BAA2B;EAC5D,IAAI,cAAc,WAAW,IAC3B,OAAO,QAAQ,WAAW;EAE5B,MAAM,YAAY,QAAQ,MAAM,iCAAiC;EACjE,IAAI,aAAa,UAAU,IACzB,OAAO,cAAc,UAAU;CAEnC,QAAQ,CAER;CAIJ,OAAO;AACT"}
@@ -1 +1,4 @@
1
+ //#region src/halal-core/scanner/scanPages.d.ts
1
2
  export declare function scanPages(appRoot: string): string[];
3
+ //#endregion
4
+ //# sourceMappingURL=scanPages.d.ts.map
@@ -1,19 +1,16 @@
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
+ //#region src/halal-core/scanner/scanPages.ts
4
+ function scanPages(appRoot) {
5
+ const pages = [];
6
+ const dirs = [path.join(appRoot, "pages"), path.join(appRoot, "layouts")];
7
+ for (const dir of dirs) if (existsSync(dir)) try {
8
+ const files = readdirSync(dir);
9
+ pages.push(...files.map((f) => f.toLowerCase()));
10
+ } catch {}
11
+ return pages;
18
12
  }
13
+ //#endregion
14
+ export { scanPages };
15
+
19
16
  //# 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,CAAC;CACzB,MAAM,OAAO,CAAC,KAAK,KAAK,SAAS,OAAO,GAAG,KAAK,KAAK,SAAS,SAAS,CAAC;CAExE,KAAK,MAAM,OAAO,MAChB,IAAI,WAAW,GAAG,GAChB,IAAI;EACF,MAAM,QAAQ,YAAY,GAAG;EAC7B,MAAM,KAAK,GAAG,MAAM,KAAI,MAAK,EAAE,YAAY,CAAC,CAAC;CAC/C,QAAQ,CAER;CAIJ,OAAO;AACT"}
@@ -1,13 +1,18 @@
1
+ import { ScanMetadataResult } from "./scanMetadata.js";
2
+ import { ScanResult } from "./scanContent.js";
3
+ //#region src/halal-core/scanner/scanProject.d.ts
1
4
  export declare function getGitignoredPaths(appRoot: string): Set<string>;
2
5
  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[];
6
+ routes: string[];
7
+ pages: string[];
8
+ components: string[];
9
+ apiRoutes: string[];
10
+ metadata: ScanMetadataResult;
11
+ envNames: string[];
12
+ dependencies: Record<string, string>;
13
+ i18nWords: string[];
14
+ contentTexts: ScanResult[];
15
+ endpoints: string[];
13
16
  };
17
+ //#endregion
18
+ //# 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,49 @@ 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
+ //#region src/halal-core/scanner/scanProject.ts
14
+ function getGitignoredPaths(appRoot) {
15
+ const ignored = /* @__PURE__ */ new Set();
16
+ const gitignorePath = path.join(appRoot, ".gitignore");
17
+ if (existsSync(gitignorePath)) try {
18
+ const lines = readFileSync(gitignorePath, "utf8").split(/\r?\n/);
19
+ for (const line of lines) {
20
+ const trimmed = line.trim();
21
+ if (trimmed && !trimmed.startsWith("#")) {
22
+ const cleaned = trimmed.replace(/\/$/, "");
23
+ if (cleaned) ignored.add(cleaned);
24
+ }
25
+ }
26
+ } catch {}
27
+ return ignored;
36
28
  }
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
- };
29
+ function scanProject(appRoot) {
30
+ const ignored = getGitignoredPaths(appRoot);
31
+ const routes = scanRoutes(appRoot);
32
+ const pages = scanPages(appRoot);
33
+ const components = scanComponents(appRoot);
34
+ const apiRoutes = scanApiRoutes(appRoot);
35
+ const metadata = scanMetadata(appRoot);
36
+ const envNames = scanEnvNames(appRoot);
37
+ const dependencies = scanDependencies(appRoot);
38
+ const i18nWords = scanTranslations(appRoot);
39
+ const contentTexts = scanContentFiles(appRoot, appRoot, ignored);
40
+ return {
41
+ routes,
42
+ pages,
43
+ components,
44
+ apiRoutes,
45
+ metadata,
46
+ envNames,
47
+ dependencies,
48
+ i18nWords,
49
+ contentTexts,
50
+ endpoints: scanDomains(contentTexts)
51
+ };
61
52
  }
53
+ //#endregion
54
+ export { getGitignoredPaths, scanProject };
55
+
62
56
  //# sourceMappingURL=scanProject.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanProject.js","sourceRoot":"","sources":["../../../src/halal-core/scanner/scanProject.ts"],"names":[],"mappings":"AAAA,OA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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,IAAY;CAChC,MAAM,gBAAgB,KAAK,KAAK,SAAS,YAAY;CAErD,IAAI,WAAW,aAAa,GAC1B,IAAI;EAEF,MAAM,QADU,aAAa,eAAe,MACxB,CAAC,CAAC,MAAM,OAAO;EACnC,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,UAAU,KAAK,KAAK;GAC1B,IAAI,WAAW,CAAC,QAAQ,WAAW,GAAG,GAAG;IAEvC,MAAM,UAAU,QAAQ,QAAQ,OAAO,EAAE;IACzC,IAAI,SACF,QAAQ,IAAI,OAAO;GAEvB;EACF;CACF,QAAQ,CAER;CAGF,OAAO;AACT;AAEA,SAAgB,YAAY,SAAiB;CAC3C,MAAM,UAAU,mBAAmB,OAAO;CAE1C,MAAM,SAAS,WAAW,OAAO;CACjC,MAAM,QAAQ,UAAU,OAAO;CAC/B,MAAM,aAAa,eAAe,OAAO;CACzC,MAAM,YAAY,cAAc,OAAO;CACvC,MAAM,WAAW,aAAa,OAAO;CACrC,MAAM,WAAW,aAAa,OAAO;CACrC,MAAM,eAAe,iBAAiB,OAAO;CAC7C,MAAM,YAAY,iBAAiB,OAAO;CAE1C,MAAM,eAAe,iBAAiB,SAAS,SAAS,OAAO;CAG/D,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAZgB,YAAY,YAYpB;CACV;AACF"}
@@ -1 +1,4 @@
1
+ //#region src/halal-core/scanner/scanRoutes.d.ts
1
2
  export declare function scanRoutes(appRoot: string): string[];
3
+ //#endregion
4
+ //# sourceMappingURL=scanRoutes.d.ts.map
@@ -1,43 +1,36 @@
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
+ //#region src/halal-core/scanner/scanRoutes.ts
4
+ function scanRoutes(appRoot) {
5
+ const routes = [];
6
+ const pagesDir = path.join(appRoot, "pages");
7
+ if (!existsSync(pagesDir)) return routes;
8
+ function traverse(dir) {
9
+ let files = [];
10
+ try {
11
+ files = readdirSync(dir);
12
+ } catch {
13
+ return;
14
+ }
15
+ for (const file of files) {
16
+ const fullPath = path.join(dir, file);
17
+ let stats;
18
+ try {
19
+ stats = statSync(fullPath);
20
+ } catch {
21
+ continue;
22
+ }
23
+ if (stats.isDirectory()) traverse(fullPath);
24
+ else if (stats.isFile()) {
25
+ const routeName = path.relative(pagesDir, fullPath).replace(/\\/g, "/").replace(/\.(vue|ts|js|jsx|tsx)$/, "").replace(/\/index$/, "").replace(/^index$/, "/");
26
+ routes.push(routeName);
27
+ }
28
+ }
29
+ }
30
+ traverse(pagesDir);
31
+ return routes;
42
32
  }
33
+ //#endregion
34
+ export { scanRoutes };
35
+
43
36
  //# 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,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"],"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,CAAC;CAC1B,MAAM,WAAW,KAAK,KAAK,SAAS,OAAO;CAE3C,IAAI,CAAC,WAAW,QAAQ,GACtB,OAAO;CAGT,SAAS,SAAS,KAAa;EAC7B,IAAI,QAAkB,CAAC;EACvB,IAAI;GACF,QAAQ,YAAY,GAAG;EACzB,QAAQ;GACN;EACF;EAEA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,WAAW,KAAK,KAAK,KAAK,IAAI;GACpC,IAAI;GACJ,IAAI;IACF,QAAQ,SAAS,QAAQ;GAC3B,QAAQ;IACN;GACF;GAEA,IAAI,MAAM,YAAY,GACpB,SAAS,QAAQ;QACZ,IAAI,MAAM,OAAO,GAAG;IAGzB,MAAM,YAFW,KAAK,SAAS,UAAU,QAAQ,CAAC,CAAC,QAAQ,OAAO,GAEzC,CAAC,CACvB,QAAQ,0BAA0B,EAAE,CAAC,CACrC,QAAQ,YAAY,EAAE,CAAC,CACvB,QAAQ,WAAW,GAAG;IACzB,OAAO,KAAK,SAAS;GACvB;EACF;CACF;CAEA,SAAS,QAAQ;CACjB,OAAO;AACT"}
@@ -1 +1,4 @@
1
+ //#region src/halal-core/scanner/scanTranslations.d.ts
1
2
  export declare function scanTranslations(appRoot: string): string[];
3
+ //#endregion
4
+ //# sourceMappingURL=scanTranslations.d.ts.map
@@ -1,32 +1,24 @@
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
+ //#region src/halal-core/scanner/scanTranslations.ts
4
+ function scanTranslations(appRoot) {
5
+ const words = [];
6
+ const i18nDir = path.join(appRoot, "i18n");
7
+ if (existsSync(i18nDir)) 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
+ const json = JSON.parse(content);
12
+ const extractStrings = (obj) => {
13
+ if (typeof obj === "string") words.push(obj);
14
+ else if (typeof obj === "object" && obj !== null) for (const key of Object.keys(obj)) extractStrings(obj[key]);
15
+ };
16
+ extractStrings(json);
17
+ }
18
+ } catch {}
19
+ return words;
31
20
  }
21
+ //#endregion
22
+ export { scanTranslations };
23
+
32
24
  //# sourceMappingURL=scanTransl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,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,CAAC;CACzB,MAAM,UAAU,KAAK,KAAK,SAAS,MAAM;CAEzC,IAAI,WAAW,OAAO,GACpB,IAAI;EACF,MAAM,QAAQ,YAAY,OAAO,CAAC,CAAC,QAAO,MAAK,EAAE,SAAS,OAAO,CAAC;EAClE,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,UAAU,aAAa,KAAK,KAAK,SAAS,IAAI,GAAG,MAAM;GAE7D,MAAM,OAAO,KAAK,MAAM,OAAO;GAC/B,MAAM,kBAAkB,QAAa;IACnC,IAAI,OAAO,QAAQ,UACjB,MAAM,KAAK,GAAG;SACT,IAAI,OAAO,QAAQ,YAAY,QAAQ,MAC5C,KAAK,MAAM,OAAO,OAAO,KAAK,GAAG,GAC/B,eAAe,IAAI,IAAI;GAG7B;GACA,eAAe,IAAI;EACrB;CACF,QAAQ,CAER;CAGF,OAAO;AACT"}
@@ -1,14 +1,17 @@
1
+ //#region src/halal-core/status.d.ts
1
2
  export type HalalGuardStatus = "allowed" | "warning" | "review_required" | "blocked";
2
3
  export interface HalalCheckResult {
3
- status: HalalGuardStatus;
4
- riskLevel: "low" | "medium" | "high" | "critical";
5
- categories: string[];
6
- confidence: number;
7
- reasons: string[];
8
- matchedFiles: string[];
9
- matchedSnippets: string[];
10
- recommendedAction: string;
11
- explanation?: string;
12
- signature?: string;
13
- createdDate?: string;
4
+ status: HalalGuardStatus;
5
+ riskLevel: "low" | "medium" | "high" | "critical";
6
+ categories: string[];
7
+ confidence: number;
8
+ reasons: string[];
9
+ matchedFiles: string[];
10
+ matchedSnippets: string[];
11
+ recommendedAction: string;
12
+ explanation?: string;
13
+ signature?: string;
14
+ createdDate?: string;
14
15
  }
16
+ //#endregion
17
+ //# sourceMappingURL=status.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=status.js.map
@@ -1 +1,4 @@
1
+ //#region src/halal-core/tamper/verifyCoreIntegrity.d.ts
1
2
  export declare function verifyCoreIntegrity(appRoot: string): boolean;
3
+ //#endregion
4
+ //# sourceMappingURL=verifyCoreIntegrity.d.ts.map