@cubocicloide/stack-react-django 3.0.4

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 (289) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +66 -0
  3. package/dist/commands/lint/checks/BE/001.d.ts +6 -0
  4. package/dist/commands/lint/checks/BE/001.js +94 -0
  5. package/dist/commands/lint/checks/BE/001.js.map +1 -0
  6. package/dist/commands/lint/checks/BE/002.d.ts +6 -0
  7. package/dist/commands/lint/checks/BE/002.js +136 -0
  8. package/dist/commands/lint/checks/BE/002.js.map +1 -0
  9. package/dist/commands/lint/checks/BE/003.d.ts +6 -0
  10. package/dist/commands/lint/checks/BE/003.js +89 -0
  11. package/dist/commands/lint/checks/BE/003.js.map +1 -0
  12. package/dist/commands/lint/checks/BE/004.d.ts +6 -0
  13. package/dist/commands/lint/checks/BE/004.js +68 -0
  14. package/dist/commands/lint/checks/BE/004.js.map +1 -0
  15. package/dist/commands/lint/checks/BE/005.d.ts +6 -0
  16. package/dist/commands/lint/checks/BE/005.js +55 -0
  17. package/dist/commands/lint/checks/BE/005.js.map +1 -0
  18. package/dist/commands/lint/checks/BE/006.d.ts +6 -0
  19. package/dist/commands/lint/checks/BE/006.js +95 -0
  20. package/dist/commands/lint/checks/BE/006.js.map +1 -0
  21. package/dist/commands/lint/checks/BE/007.d.ts +6 -0
  22. package/dist/commands/lint/checks/BE/007.js +53 -0
  23. package/dist/commands/lint/checks/BE/007.js.map +1 -0
  24. package/dist/commands/lint/checks/BE/008.d.ts +6 -0
  25. package/dist/commands/lint/checks/BE/008.js +70 -0
  26. package/dist/commands/lint/checks/BE/008.js.map +1 -0
  27. package/dist/commands/lint/checks/BE/009.d.ts +6 -0
  28. package/dist/commands/lint/checks/BE/009.js +112 -0
  29. package/dist/commands/lint/checks/BE/009.js.map +1 -0
  30. package/dist/commands/lint/checks/BE/010.d.ts +6 -0
  31. package/dist/commands/lint/checks/BE/010.js +76 -0
  32. package/dist/commands/lint/checks/BE/010.js.map +1 -0
  33. package/dist/commands/lint/checks/BE/011.d.ts +6 -0
  34. package/dist/commands/lint/checks/BE/011.js +76 -0
  35. package/dist/commands/lint/checks/BE/011.js.map +1 -0
  36. package/dist/commands/lint/checks/BE/012.d.ts +6 -0
  37. package/dist/commands/lint/checks/BE/012.js +61 -0
  38. package/dist/commands/lint/checks/BE/012.js.map +1 -0
  39. package/dist/commands/lint/checks/BE/013.d.ts +6 -0
  40. package/dist/commands/lint/checks/BE/013.js +98 -0
  41. package/dist/commands/lint/checks/BE/013.js.map +1 -0
  42. package/dist/commands/lint/checks/BE/014.d.ts +6 -0
  43. package/dist/commands/lint/checks/BE/014.js +64 -0
  44. package/dist/commands/lint/checks/BE/014.js.map +1 -0
  45. package/dist/commands/lint/checks/E2E/001.d.ts +6 -0
  46. package/dist/commands/lint/checks/E2E/001.js +35 -0
  47. package/dist/commands/lint/checks/E2E/001.js.map +1 -0
  48. package/dist/commands/lint/checks/E2E/002.d.ts +6 -0
  49. package/dist/commands/lint/checks/E2E/002.js +37 -0
  50. package/dist/commands/lint/checks/E2E/002.js.map +1 -0
  51. package/dist/commands/lint/checks/E2E/003.d.ts +6 -0
  52. package/dist/commands/lint/checks/E2E/003.js +42 -0
  53. package/dist/commands/lint/checks/E2E/003.js.map +1 -0
  54. package/dist/commands/lint/checks/E2E/004.d.ts +6 -0
  55. package/dist/commands/lint/checks/E2E/004.js +37 -0
  56. package/dist/commands/lint/checks/E2E/004.js.map +1 -0
  57. package/dist/commands/lint/checks/E2E/005.d.ts +6 -0
  58. package/dist/commands/lint/checks/E2E/005.js +47 -0
  59. package/dist/commands/lint/checks/E2E/005.js.map +1 -0
  60. package/dist/commands/lint/checks/E2E/006.d.ts +6 -0
  61. package/dist/commands/lint/checks/E2E/006.js +28 -0
  62. package/dist/commands/lint/checks/E2E/006.js.map +1 -0
  63. package/dist/commands/lint/checks/E2E/007.d.ts +6 -0
  64. package/dist/commands/lint/checks/E2E/007.js +47 -0
  65. package/dist/commands/lint/checks/E2E/007.js.map +1 -0
  66. package/dist/commands/lint/checks/FE/001.d.ts +6 -0
  67. package/dist/commands/lint/checks/FE/001.js +56 -0
  68. package/dist/commands/lint/checks/FE/001.js.map +1 -0
  69. package/dist/commands/lint/checks/FE/002.d.ts +6 -0
  70. package/dist/commands/lint/checks/FE/002.js +80 -0
  71. package/dist/commands/lint/checks/FE/002.js.map +1 -0
  72. package/dist/commands/lint/checks/FE/003.d.ts +6 -0
  73. package/dist/commands/lint/checks/FE/003.js +65 -0
  74. package/dist/commands/lint/checks/FE/003.js.map +1 -0
  75. package/dist/commands/lint/checks/FE/004.d.ts +6 -0
  76. package/dist/commands/lint/checks/FE/004.js +72 -0
  77. package/dist/commands/lint/checks/FE/004.js.map +1 -0
  78. package/dist/commands/lint/checks/FE/005.d.ts +6 -0
  79. package/dist/commands/lint/checks/FE/005.js +103 -0
  80. package/dist/commands/lint/checks/FE/005.js.map +1 -0
  81. package/dist/commands/lint/checks/FE/006.d.ts +6 -0
  82. package/dist/commands/lint/checks/FE/006.js +102 -0
  83. package/dist/commands/lint/checks/FE/006.js.map +1 -0
  84. package/dist/commands/lint/checks/FE/007.d.ts +6 -0
  85. package/dist/commands/lint/checks/FE/007.js +60 -0
  86. package/dist/commands/lint/checks/FE/007.js.map +1 -0
  87. package/dist/commands/lint/checks/FE/008.d.ts +6 -0
  88. package/dist/commands/lint/checks/FE/008.js +115 -0
  89. package/dist/commands/lint/checks/FE/008.js.map +1 -0
  90. package/dist/commands/lint/checks/FE/009.d.ts +6 -0
  91. package/dist/commands/lint/checks/FE/009.js +83 -0
  92. package/dist/commands/lint/checks/FE/009.js.map +1 -0
  93. package/dist/commands/lint/checks/FE/010.d.ts +6 -0
  94. package/dist/commands/lint/checks/FE/010.js +105 -0
  95. package/dist/commands/lint/checks/FE/010.js.map +1 -0
  96. package/dist/commands/lint/checks/FE/011.d.ts +6 -0
  97. package/dist/commands/lint/checks/FE/011.js +43 -0
  98. package/dist/commands/lint/checks/FE/011.js.map +1 -0
  99. package/dist/commands/lint/checks/FE/012.d.ts +6 -0
  100. package/dist/commands/lint/checks/FE/012.js +150 -0
  101. package/dist/commands/lint/checks/FE/012.js.map +1 -0
  102. package/dist/index.d.ts +5 -0
  103. package/dist/index.js +3436 -0
  104. package/dist/index.js.map +1 -0
  105. package/dude.stack.json +13 -0
  106. package/package.json +43 -0
  107. package/templates/aws-ecs/backend/Dockerfile.prod +34 -0
  108. package/templates/aws-ecs/docs/docs/deploy.md.hbs +54 -0
  109. package/templates/aws-ecs/frontend/Dockerfile.prod +28 -0
  110. package/templates/aws-ecs/frontend/nginx.conf +21 -0
  111. package/templates/aws-ecs/iac/README.md.hbs +75 -0
  112. package/templates/aws-ecs/iac/_gitignore +14 -0
  113. package/templates/aws-ecs/iac/runner/Dockerfile +35 -0
  114. package/templates/aws-ecs/iac/terraform/bootstrap/main.tf.hbs +102 -0
  115. package/templates/aws-ecs/iac/terraform/bootstrap/outputs.tf +19 -0
  116. package/templates/aws-ecs/iac/terraform/bootstrap/variables.tf.hbs +17 -0
  117. package/templates/aws-ecs/iac/terraform/environments/dev/backend.hcl.hbs +12 -0
  118. package/templates/aws-ecs/iac/terraform/environments/dev/terraform.tfvars.hbs +43 -0
  119. package/templates/aws-ecs/iac/terraform/main.tf.hbs +949 -0
  120. package/templates/aws-ecs/iac/terraform/outputs.tf.hbs +71 -0
  121. package/templates/aws-ecs/iac/terraform/providers.tf +19 -0
  122. package/templates/aws-ecs/iac/terraform/variables.tf.hbs +113 -0
  123. package/templates/aws-ecs/iac/terraform/versions.tf +19 -0
  124. package/templates/base/.claude/agents/issue-fixer.md +190 -0
  125. package/templates/base/.claude/agents/security-fixer.md +250 -0
  126. package/templates/base/.claude/rules/BE/001.md +19 -0
  127. package/templates/base/.claude/rules/BE/002.md +21 -0
  128. package/templates/base/.claude/rules/BE/003.md +19 -0
  129. package/templates/base/.claude/rules/BE/004.md +16 -0
  130. package/templates/base/.claude/rules/BE/005.md +23 -0
  131. package/templates/base/.claude/rules/BE/006.md +13 -0
  132. package/templates/base/.claude/rules/BE/007.md +24 -0
  133. package/templates/base/.claude/rules/BE/008.md +19 -0
  134. package/templates/base/.claude/rules/BE/009.md +18 -0
  135. package/templates/base/.claude/rules/BE/010.md +15 -0
  136. package/templates/base/.claude/rules/BE/011.md +17 -0
  137. package/templates/base/.claude/rules/BE/012.md +18 -0
  138. package/templates/base/.claude/rules/BE/013.md +22 -0
  139. package/templates/base/.claude/rules/BE/014.md +15 -0
  140. package/templates/base/.claude/rules/E2E/001.md +13 -0
  141. package/templates/base/.claude/rules/E2E/002.md +14 -0
  142. package/templates/base/.claude/rules/E2E/003.md +10 -0
  143. package/templates/base/.claude/rules/E2E/004.md +23 -0
  144. package/templates/base/.claude/rules/E2E/005.md +15 -0
  145. package/templates/base/.claude/rules/E2E/006.md +13 -0
  146. package/templates/base/.claude/rules/E2E/007.md +18 -0
  147. package/templates/base/.claude/rules/FE/001.md +22 -0
  148. package/templates/base/.claude/rules/FE/002.md +39 -0
  149. package/templates/base/.claude/rules/FE/003.md +19 -0
  150. package/templates/base/.claude/rules/FE/004.md +21 -0
  151. package/templates/base/.claude/rules/FE/005.md +33 -0
  152. package/templates/base/.claude/rules/FE/006.md +24 -0
  153. package/templates/base/.claude/rules/FE/007.md +19 -0
  154. package/templates/base/.claude/rules/FE/008.md +26 -0
  155. package/templates/base/.claude/rules/FE/009.md +30 -0
  156. package/templates/base/.claude/rules/FE/010.md +25 -0
  157. package/templates/base/.claude/rules/FE/011.md +22 -0
  158. package/templates/base/.claude/rules/FE/012.md +32 -0
  159. package/templates/base/.claude/settings.json +53 -0
  160. package/templates/base/.claude/skills/clean-branches/SKILL.md +100 -0
  161. package/templates/base/.claude/skills/create/SKILL.md +47 -0
  162. package/templates/base/.claude/skills/create-jira-issue/SKILL.md +174 -0
  163. package/templates/base/.claude/skills/create-page/SKILL.md +195 -0
  164. package/templates/base/.claude/skills/create-route/SKILL.md +156 -0
  165. package/templates/base/.claude/skills/draft-email/SKILL.md +104 -0
  166. package/templates/base/.claude/skills/fix-issues/SKILL.md +238 -0
  167. package/templates/base/.claude/skills/security-scan/SKILL.md +297 -0
  168. package/templates/base/.claude/skills/verify-security-fixes/SKILL.md +180 -0
  169. package/templates/base/.dude/commands/README.md +85 -0
  170. package/templates/base/.dude/commands/hello.ts +34 -0
  171. package/templates/base/.dude/lint/checks/PRJ/001.ts +26 -0
  172. package/templates/base/.dude/lint/checks/README.md +69 -0
  173. package/templates/base/.vscode/tasks.json +44 -0
  174. package/templates/base/.worktreeinclude +2 -0
  175. package/templates/base/CLAUDE.md.hbs +391 -0
  176. package/templates/base/README.md.hbs +188 -0
  177. package/templates/base/_env.example.hbs +39 -0
  178. package/templates/base/_env.hbs +35 -0
  179. package/templates/base/_gitignore +31 -0
  180. package/templates/base/_npmrc +2 -0
  181. package/templates/base/backend/Dockerfile +16 -0
  182. package/templates/base/backend/README.md.hbs +90 -0
  183. package/templates/base/backend/_dockerignore +12 -0
  184. package/templates/base/backend/apps/__init__.py +0 -0
  185. package/templates/base/backend/apps/core/__init__.py +0 -0
  186. package/templates/base/backend/apps/core/apps.py +6 -0
  187. package/templates/base/backend/apps/core/serializers.py +7 -0
  188. package/templates/base/backend/apps/core/tests/__init__.py +0 -0
  189. package/templates/base/backend/apps/core/tests/test_views.py +16 -0
  190. package/templates/base/backend/apps/core/urls.py +9 -0
  191. package/templates/base/backend/apps/core/views.py +24 -0
  192. package/templates/base/backend/apps/users/__init__.py +0 -0
  193. package/templates/base/backend/apps/users/admin.py +6 -0
  194. package/templates/base/backend/apps/users/apps.py +6 -0
  195. package/templates/base/backend/apps/users/migrations/0001_initial.py +41 -0
  196. package/templates/base/backend/apps/users/migrations/__init__.py +0 -0
  197. package/templates/base/backend/apps/users/models.py +15 -0
  198. package/templates/base/backend/apps/users/serializers.py +16 -0
  199. package/templates/base/backend/apps/users/services.py +25 -0
  200. package/templates/base/backend/apps/users/tests/__init__.py +0 -0
  201. package/templates/base/backend/apps/users/tests/test_models.py +30 -0
  202. package/templates/base/backend/apps/users/tests/test_views.py +55 -0
  203. package/templates/base/backend/apps/users/urls.py +10 -0
  204. package/templates/base/backend/apps/users/views.py +20 -0
  205. package/templates/base/backend/config/__init__.py.hbs +5 -0
  206. package/templates/base/backend/config/asgi.py +9 -0
  207. package/templates/base/backend/config/settings/__init__.py +0 -0
  208. package/templates/base/backend/config/settings/base.py.hbs +197 -0
  209. package/templates/base/backend/config/settings/local.py +31 -0
  210. package/templates/base/backend/config/settings/production.py.hbs +37 -0
  211. package/templates/base/backend/config/urls.py.hbs +22 -0
  212. package/templates/base/backend/config/wsgi.py +9 -0
  213. package/templates/base/backend/manage.py +23 -0
  214. package/templates/base/backend/pyproject.toml.hbs +48 -0
  215. package/templates/base/backend/start.sh +5 -0
  216. package/templates/base/docker-compose.yml.hbs +196 -0
  217. package/templates/base/docs/docs/api.md +21 -0
  218. package/templates/base/docs/docs/dude.md.hbs +305 -0
  219. package/templates/base/docs/docs/index.md.hbs +92 -0
  220. package/templates/base/docs/docs/mkdocs.md +231 -0
  221. package/templates/base/docs/mkdocs.yml.hbs +52 -0
  222. package/templates/base/e2e/.prettierrc.json +1 -0
  223. package/templates/base/e2e/_prettierignore +3 -0
  224. package/templates/base/e2e/cucumber.js +21 -0
  225. package/templates/base/e2e/eslint.config.mjs +14 -0
  226. package/templates/base/e2e/features/example.feature +13 -0
  227. package/templates/base/e2e/package.json.hbs +30 -0
  228. package/templates/base/e2e/pages/ExamplePage.ts +16 -0
  229. package/templates/base/e2e/playwright.config.ts +27 -0
  230. package/templates/base/e2e/steps/common.steps.ts +32 -0
  231. package/templates/base/e2e/steps/example.steps.ts +4 -0
  232. package/templates/base/e2e/support/hooks.ts +72 -0
  233. package/templates/base/e2e/support/world.ts +24 -0
  234. package/templates/base/e2e/tsconfig.json +22 -0
  235. package/templates/base/frontend/.prettierrc.json +6 -0
  236. package/templates/base/frontend/Dockerfile +10 -0
  237. package/templates/base/frontend/_dockerignore +4 -0
  238. package/templates/base/frontend/eslint.config.js +32 -0
  239. package/templates/base/frontend/index.html.hbs +13 -0
  240. package/templates/base/frontend/package.json.hbs +38 -0
  241. package/templates/base/frontend/public/favicon.svg +5 -0
  242. package/templates/base/frontend/src/$components/Layout/$assets/logo.svg +5 -0
  243. package/templates/base/frontend/src/$components/Layout/constants.tsx +8 -0
  244. package/templates/base/frontend/src/$components/Layout/index.tsx +80 -0
  245. package/templates/base/frontend/src/$components/Layout/types.tsx +9 -0
  246. package/templates/base/frontend/src/$components/index.tsx +1 -0
  247. package/templates/base/frontend/src/$hooks/index.tsx +2 -0
  248. package/templates/base/frontend/src/$hooks/useCounterStore/index.tsx +28 -0
  249. package/templates/base/frontend/src/$hooks/useCounterStore/types.tsx +7 -0
  250. package/templates/base/frontend/src/$hooks/usePageTitle/index.tsx +21 -0
  251. package/templates/base/frontend/src/$types/vite-env.d.ts +10 -0
  252. package/templates/base/frontend/src/App.tsx +36 -0
  253. package/templates/base/frontend/src/main.tsx +10 -0
  254. package/templates/base/frontend/src/openapi/utils/openapi.yaml.hbs +129 -0
  255. package/templates/base/frontend/src/pages/constants.tsx +31 -0
  256. package/templates/base/frontend/src/pages/index.tsx +192 -0
  257. package/templates/base/frontend/src/pages/types.tsx +6 -0
  258. package/templates/base/frontend/src/pages/users/[id]/index.tsx +53 -0
  259. package/templates/base/frontend/src/pages/users/index.tsx +57 -0
  260. package/templates/base/frontend/src/pages/users/types.tsx +4 -0
  261. package/templates/base/frontend/src/styles.module.css +7 -0
  262. package/templates/base/frontend/src/utils/constants.tsx +11 -0
  263. package/templates/base/frontend/src/utils/formatters/index.tsx +49 -0
  264. package/templates/base/frontend/src/utils/functions.tsx +70 -0
  265. package/templates/base/frontend/src/utils/index.tsx +3 -0
  266. package/templates/base/frontend/tsconfig.json +24 -0
  267. package/templates/base/frontend/vite.config.ts +20 -0
  268. package/templates/base/package.json.hbs +11 -0
  269. package/templates/base/security/baseline.json +4 -0
  270. package/templates/celery/backend/apps/core/tasks.py +14 -0
  271. package/templates/celery/backend/apps/core/tests/test_tasks.py +6 -0
  272. package/templates/celery/backend/config/celery.py.hbs +26 -0
  273. package/templates/celerybeat/backend/apps/core/tasks_scheduled.py +18 -0
  274. package/templates/celerybeat/backend/apps/core/tests/test_tasks_scheduled.py +6 -0
  275. package/templates/postgres/.dude/commands/reset.ts +83 -0
  276. package/templates/s3/backend/apps/files/__init__.py +0 -0
  277. package/templates/s3/backend/apps/files/admin.py +9 -0
  278. package/templates/s3/backend/apps/files/apps.py +6 -0
  279. package/templates/s3/backend/apps/files/migrations/0001_initial.py +29 -0
  280. package/templates/s3/backend/apps/files/migrations/__init__.py +0 -0
  281. package/templates/s3/backend/apps/files/models.py +21 -0
  282. package/templates/s3/backend/apps/files/serializers.py +27 -0
  283. package/templates/s3/backend/apps/files/services.py +19 -0
  284. package/templates/s3/backend/apps/files/tests/__init__.py +0 -0
  285. package/templates/s3/backend/apps/files/tests/test_models.py +10 -0
  286. package/templates/s3/backend/apps/files/tests/test_views.py +32 -0
  287. package/templates/s3/backend/apps/files/urls.py +10 -0
  288. package/templates/s3/backend/apps/files/views.py +29 -0
  289. package/templates/s3/frontend/src/openapi/utils/openapi.yaml.hbs +253 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/commands/lint/checks/FE/011.ts","../../../../../src/commands/lint/frontend-structure.ts"],"sourcesContent":["import { existsSync, readdirSync } from 'node:fs'\nimport type { RawDiagnostic } from '@cubocicloide/dude'\nimport { diag, findDirsNamed, frontendSrc } from '../../frontend-structure'\n\n/** FE011 — discourage $misc: it is exempt from structure checks, but flag every use of it */\nexport default function check(root: string): RawDiagnostic[] {\n const srcDir = frontendSrc(root)\n if (!existsSync(srcDir)) return []\n\n return findDirsNamed(srcDir, '$misc').map((miscDir) => {\n const count = readdirSync(miscDir).length\n return diag(\n root,\n miscDir,\n 'warning',\n `Avoid $misc (${count} ${count === 1 ? 'entry' : 'entries'}) — it is a temporary escape hatch. Relocate its content: components → $components/, hooks → $hooks/, shared types → types.tsx, pure functions → functions.tsx, constants → constants.tsx, static files → $assets/`,\n )\n })\n}\n","/**\n * Shared vocabulary for the FE lint checks (frontend `$`-structure).\n *\n * The frontend tree is organised in \"scopes\" (components, hooks, pages, utils\n * domains). Every scope owns the same file set (SCOPE_FILES) plus privileged\n * `$`-prefixed subdirectories ($components, $hooks, $assets, $misc). The `$`\n * prefix sorts these folders on top and makes them impossible to confuse with\n * a route segment or a domain name.\n *\n * Not a check module: it lives outside `checks/` so the runner never tries to\n * load it; tsup inlines it into each check entry.\n */\nimport { readdirSync, existsSync } from 'node:fs'\nimport path from 'pathe'\nimport type { RawDiagnostic, Severity } from '@cubocicloide/dude'\n\n/** Files every scope (component, hook, page, utils domain) may contain. */\nexport const SCOPE_FILES = new Set([\n 'index.tsx',\n 'styles.module.css',\n 'types.tsx',\n 'constants.tsx',\n 'functions.tsx',\n])\n\n/** Human-readable version of SCOPE_FILES for messages. */\nexport const SCOPE_FILES_LABEL = 'index.tsx, styles.module.css, types.tsx, constants.tsx, functions.tsx'\n\n/** The full set of privileged directory names. */\nexport const PRIVILEGED_DIRS = new Set(['$components', '$hooks', '$assets', '$misc', '$types'])\n\nexport const PASCAL_CASE = /^[A-Z][a-zA-Z0-9]*$/\nexport const KEBAB_CASE = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/\nexport const HOOK_NAME = /^use[A-Z][a-zA-Z0-9]*$/\n/** Dynamic route segment: [id], [userId], … */\nexport const DYNAMIC_SEGMENT = /^\\[[a-z][a-zA-Z0-9]*\\]$/\n\nexport function frontendSrc(root: string): string {\n return path.join(root, 'frontend', 'src')\n}\n\nexport function diag(\n root: string,\n absPath: string,\n severity: Severity,\n message: string,\n): RawDiagnostic {\n return { file: path.relative(root, absPath), line: 1, col: 1, severity, message }\n}\n\n/**\n * Recursively collect directories named `name` under `dir`.\n * Never descends into `$misc` (exempt from checks) or `node_modules`,\n * but a `$misc` directory itself is still reported when it matches `name`.\n */\nexport function findDirsNamed(dir: string, name: string): string[] {\n const found: string[] = []\n if (!existsSync(dir)) return found\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n if (!entry.isDirectory() || entry.name === 'node_modules') continue\n const full = path.join(dir, entry.name)\n if (entry.name === name) found.push(full)\n if (entry.name === '$misc') continue\n found.push(...findDirsNamed(full, name))\n }\n return found\n}\n\n/**\n * Collect page nodes under `pagesDir` as route paths relative to pages/\n * ('' = pages root). A page node is a directory whose index.tsx defines a\n * route. `$`-prefixed directories are structural, never route segments.\n */\nexport function collectPageNodes(pagesDir: string): string[] {\n const nodes: string[] = []\n if (!existsSync(pagesDir)) return nodes\n\n function walk(dir: string, route: string): void {\n if (existsSync(path.join(dir, 'index.tsx'))) nodes.push(route)\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n if (!entry.isDirectory() || entry.name.startsWith('$')) continue\n walk(path.join(dir, entry.name), route === '' ? entry.name : `${route}/${entry.name}`)\n }\n }\n\n walk(pagesDir, '')\n return nodes\n}\n"],"mappings":";AAAA,SAAS,cAAAA,aAAY,eAAAC,oBAAmB;;;ACYxC,SAAS,aAAa,kBAAkB;AACxC,OAAO,UAAU;AAwBV,SAAS,YAAY,MAAsB;AAChD,SAAO,KAAK,KAAK,MAAM,YAAY,KAAK;AAC1C;AAEO,SAAS,KACd,MACA,SACA,UACA,SACe;AACf,SAAO,EAAE,MAAM,KAAK,SAAS,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,QAAQ;AAClF;AAOO,SAAS,cAAc,KAAa,MAAwB;AACjE,QAAM,QAAkB,CAAC;AACzB,MAAI,CAAC,WAAW,GAAG,EAAG,QAAO;AAC7B,aAAW,SAAS,YAAY,KAAK,EAAE,eAAe,KAAK,CAAC,GAAG;AAC7D,QAAI,CAAC,MAAM,YAAY,KAAK,MAAM,SAAS,eAAgB;AAC3D,UAAM,OAAO,KAAK,KAAK,KAAK,MAAM,IAAI;AACtC,QAAI,MAAM,SAAS,KAAM,OAAM,KAAK,IAAI;AACxC,QAAI,MAAM,SAAS,QAAS;AAC5B,UAAM,KAAK,GAAG,cAAc,MAAM,IAAI,CAAC;AAAA,EACzC;AACA,SAAO;AACT;;;AD7De,SAAR,MAAuB,MAA+B;AAC3D,QAAM,SAAS,YAAY,IAAI;AAC/B,MAAI,CAACC,YAAW,MAAM,EAAG,QAAO,CAAC;AAEjC,SAAO,cAAc,QAAQ,OAAO,EAAE,IAAI,CAAC,YAAY;AACrD,UAAM,QAAQC,aAAY,OAAO,EAAE;AACnC,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB,KAAK,IAAI,UAAU,IAAI,UAAU,SAAS;AAAA,IAC5D;AAAA,EACF,CAAC;AACH;","names":["existsSync","readdirSync","existsSync","readdirSync"]}
@@ -0,0 +1,6 @@
1
+ import { RawDiagnostic } from '@cubocicloide/dude';
2
+
3
+ /** FE012 — index.tsx should only hold its own component/hook/page: types, helpers and extra components belong elsewhere */
4
+ declare function check(root: string): RawDiagnostic[];
5
+
6
+ export { check as default };
@@ -0,0 +1,150 @@
1
+ // src/commands/lint/checks/FE/012.ts
2
+ import { readdirSync as readdirSync2, existsSync as existsSync2, readFileSync } from "fs";
3
+ import path2 from "pathe";
4
+
5
+ // src/commands/lint/frontend-structure.ts
6
+ import { readdirSync, existsSync } from "fs";
7
+ import path from "pathe";
8
+ var PASCAL_CASE = /^[A-Z][a-zA-Z0-9]*$/;
9
+ var HOOK_NAME = /^use[A-Z][a-zA-Z0-9]*$/;
10
+ function frontendSrc(root) {
11
+ return path.join(root, "frontend", "src");
12
+ }
13
+ function diag(root, absPath, severity, message) {
14
+ return { file: path.relative(root, absPath), line: 1, col: 1, severity, message };
15
+ }
16
+ function findDirsNamed(dir, name) {
17
+ const found = [];
18
+ if (!existsSync(dir)) return found;
19
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
20
+ if (!entry.isDirectory() || entry.name === "node_modules") continue;
21
+ const full = path.join(dir, entry.name);
22
+ if (entry.name === name) found.push(full);
23
+ if (entry.name === "$misc") continue;
24
+ found.push(...findDirsNamed(full, name));
25
+ }
26
+ return found;
27
+ }
28
+ function collectPageNodes(pagesDir) {
29
+ const nodes = [];
30
+ if (!existsSync(pagesDir)) return nodes;
31
+ function walk(dir, route) {
32
+ if (existsSync(path.join(dir, "index.tsx"))) nodes.push(route);
33
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
34
+ if (!entry.isDirectory() || entry.name.startsWith("$")) continue;
35
+ walk(path.join(dir, entry.name), route === "" ? entry.name : `${route}/${entry.name}`);
36
+ }
37
+ }
38
+ walk(pagesDir, "");
39
+ return nodes;
40
+ }
41
+
42
+ // src/commands/lint/checks/FE/012.ts
43
+ var TYPE_RE = /^(?:export\s+)?(?:declare\s+)?(?:interface|type)\s+([A-Za-z_$][\w$]*)/gm;
44
+ var FUNCTION_RE = /^(?:export\s+)?(?:default\s+)?(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/gm;
45
+ var ARROW_RE = /^(?:export\s+)?const\s+([A-Za-z_$][\w$]*)[^=\n]*=\s*(?:async\s+)?(?:\([^)]*\)|[A-Za-z_$][\w$]*)\s*=>/gm;
46
+ var DEFAULT_EXPORT_RE = /^export\s+default\s+(?:async\s+)?(?:function\s+)?([A-Za-z_$][\w$]*)/m;
47
+ function matchNames(content, re) {
48
+ return [...content.matchAll(re)].map((m) => m[1]);
49
+ }
50
+ function check(root) {
51
+ const srcDir = frontendSrc(root);
52
+ if (!existsSync2(srcDir)) return [];
53
+ const results = [];
54
+ function inspect(indexFile, scope) {
55
+ if (!existsSync2(indexFile)) return;
56
+ const content = readFileSync(indexFile, "utf8");
57
+ const types = matchNames(content, TYPE_RE);
58
+ if (types.length > 0) {
59
+ results.push(
60
+ diag(
61
+ root,
62
+ indexFile,
63
+ "warning",
64
+ `index.tsx declares type(s) ${types.join(", ")} \u2014 move them to types.tsx in the same directory`
65
+ )
66
+ );
67
+ }
68
+ const declared = [...matchNames(content, FUNCTION_RE), ...matchNames(content, ARROW_RE)];
69
+ const components = declared.filter((n) => PASCAL_CASE.test(n));
70
+ const hooks = declared.filter((n) => HOOK_NAME.test(n));
71
+ const helpers = declared.filter((n) => !PASCAL_CASE.test(n) && !HOOK_NAME.test(n));
72
+ const mainName = content.match(DEFAULT_EXPORT_RE)?.[1];
73
+ const main = scope === "hook" ? hooks : components;
74
+ const extras = main.filter((n) => n !== (mainName ?? main[0]));
75
+ if (scope === "hook") {
76
+ if (extras.length > 0) {
77
+ results.push(
78
+ diag(
79
+ root,
80
+ indexFile,
81
+ "warning",
82
+ `index.tsx declares extra hook(s) ${extras.join(", ")} \u2014 give each hook its own directory under a $hooks/`
83
+ )
84
+ );
85
+ }
86
+ if (components.length > 0) {
87
+ results.push(
88
+ diag(
89
+ root,
90
+ indexFile,
91
+ "warning",
92
+ `index.tsx declares component(s) ${components.join(", ")} \u2014 a hook should not define components; move them to a $components/ scope`
93
+ )
94
+ );
95
+ }
96
+ } else {
97
+ if (extras.length > 0) {
98
+ results.push(
99
+ diag(
100
+ root,
101
+ indexFile,
102
+ "warning",
103
+ `index.tsx declares extra component(s) ${extras.join(", ")} \u2014 move each into its own directory under $components/`
104
+ )
105
+ );
106
+ }
107
+ if (hooks.length > 0) {
108
+ results.push(
109
+ diag(
110
+ root,
111
+ indexFile,
112
+ "warning",
113
+ `index.tsx declares hook(s) ${hooks.join(", ")} \u2014 move each into its own directory under $hooks/`
114
+ )
115
+ );
116
+ }
117
+ }
118
+ if (helpers.length > 0) {
119
+ results.push(
120
+ diag(
121
+ root,
122
+ indexFile,
123
+ "warning",
124
+ `index.tsx declares helper function(s) ${helpers.join(", ")} \u2014 move them to functions.tsx in the same directory`
125
+ )
126
+ );
127
+ }
128
+ }
129
+ for (const componentsDir of findDirsNamed(srcDir, "$components")) {
130
+ for (const entry of readdirSync2(componentsDir, { withFileTypes: true })) {
131
+ if (!entry.isDirectory() || !PASCAL_CASE.test(entry.name)) continue;
132
+ inspect(path2.join(componentsDir, entry.name, "index.tsx"), "component");
133
+ }
134
+ }
135
+ for (const hooksDir of findDirsNamed(srcDir, "$hooks")) {
136
+ for (const entry of readdirSync2(hooksDir, { withFileTypes: true })) {
137
+ if (!entry.isDirectory() || !HOOK_NAME.test(entry.name)) continue;
138
+ inspect(path2.join(hooksDir, entry.name, "index.tsx"), "hook");
139
+ }
140
+ }
141
+ const pagesDir = path2.join(srcDir, "pages");
142
+ for (const route of collectPageNodes(pagesDir)) {
143
+ inspect(path2.join(pagesDir, route, "index.tsx"), "page");
144
+ }
145
+ return results;
146
+ }
147
+ export {
148
+ check as default
149
+ };
150
+ //# sourceMappingURL=012.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/commands/lint/checks/FE/012.ts","../../../../../src/commands/lint/frontend-structure.ts"],"sourcesContent":["import { readdirSync, existsSync, readFileSync } from 'node:fs'\nimport path from 'pathe'\nimport type { RawDiagnostic } from '@cubocicloide/dude'\nimport {\n HOOK_NAME,\n PASCAL_CASE,\n collectPageNodes,\n diag,\n findDirsNamed,\n frontendSrc,\n} from '../../frontend-structure'\n\ntype Scope = 'component' | 'hook' | 'page'\n\nconst TYPE_RE = /^(?:export\\s+)?(?:declare\\s+)?(?:interface|type)\\s+([A-Za-z_$][\\w$]*)/gm\nconst FUNCTION_RE = /^(?:export\\s+)?(?:default\\s+)?(?:async\\s+)?function\\s+([A-Za-z_$][\\w$]*)/gm\nconst ARROW_RE = /^(?:export\\s+)?const\\s+([A-Za-z_$][\\w$]*)[^=\\n]*=\\s*(?:async\\s+)?(?:\\([^)]*\\)|[A-Za-z_$][\\w$]*)\\s*=>/gm\nconst DEFAULT_EXPORT_RE = /^export\\s+default\\s+(?:async\\s+)?(?:function\\s+)?([A-Za-z_$][\\w$]*)/m\n\nfunction matchNames(content: string, re: RegExp): string[] {\n return [...content.matchAll(re)].map((m) => m[1]!)\n}\n\n/** FE012 — index.tsx should only hold its own component/hook/page: types, helpers and extra components belong elsewhere */\nexport default function check(root: string): RawDiagnostic[] {\n const srcDir = frontendSrc(root)\n if (!existsSync(srcDir)) return []\n\n const results: RawDiagnostic[] = []\n\n function inspect(indexFile: string, scope: Scope): void {\n if (!existsSync(indexFile)) return\n const content = readFileSync(indexFile, 'utf8')\n\n const types = matchNames(content, TYPE_RE)\n if (types.length > 0) {\n results.push(\n diag(\n root,\n indexFile,\n 'warning',\n `index.tsx declares type(s) ${types.join(', ')} — move them to types.tsx in the same directory`,\n ),\n )\n }\n\n const declared = [...matchNames(content, FUNCTION_RE), ...matchNames(content, ARROW_RE)]\n const components = declared.filter((n) => PASCAL_CASE.test(n))\n const hooks = declared.filter((n) => HOOK_NAME.test(n))\n const helpers = declared.filter((n) => !PASCAL_CASE.test(n) && !HOOK_NAME.test(n))\n\n const mainName = content.match(DEFAULT_EXPORT_RE)?.[1]\n const main = scope === 'hook' ? hooks : components\n const extras = main.filter((n) => n !== (mainName ?? main[0]))\n\n if (scope === 'hook') {\n if (extras.length > 0) {\n results.push(\n diag(\n root,\n indexFile,\n 'warning',\n `index.tsx declares extra hook(s) ${extras.join(', ')} — give each hook its own directory under a $hooks/`,\n ),\n )\n }\n if (components.length > 0) {\n results.push(\n diag(\n root,\n indexFile,\n 'warning',\n `index.tsx declares component(s) ${components.join(', ')} — a hook should not define components; move them to a $components/ scope`,\n ),\n )\n }\n } else {\n if (extras.length > 0) {\n results.push(\n diag(\n root,\n indexFile,\n 'warning',\n `index.tsx declares extra component(s) ${extras.join(', ')} — move each into its own directory under $components/`,\n ),\n )\n }\n if (hooks.length > 0) {\n results.push(\n diag(\n root,\n indexFile,\n 'warning',\n `index.tsx declares hook(s) ${hooks.join(', ')} — move each into its own directory under $hooks/`,\n ),\n )\n }\n }\n\n if (helpers.length > 0) {\n results.push(\n diag(\n root,\n indexFile,\n 'warning',\n `index.tsx declares helper function(s) ${helpers.join(', ')} — move them to functions.tsx in the same directory`,\n ),\n )\n }\n }\n\n for (const componentsDir of findDirsNamed(srcDir, '$components')) {\n for (const entry of readdirSync(componentsDir, { withFileTypes: true })) {\n if (!entry.isDirectory() || !PASCAL_CASE.test(entry.name)) continue\n inspect(path.join(componentsDir, entry.name, 'index.tsx'), 'component')\n }\n }\n for (const hooksDir of findDirsNamed(srcDir, '$hooks')) {\n for (const entry of readdirSync(hooksDir, { withFileTypes: true })) {\n if (!entry.isDirectory() || !HOOK_NAME.test(entry.name)) continue\n inspect(path.join(hooksDir, entry.name, 'index.tsx'), 'hook')\n }\n }\n const pagesDir = path.join(srcDir, 'pages')\n for (const route of collectPageNodes(pagesDir)) {\n inspect(path.join(pagesDir, route, 'index.tsx'), 'page')\n }\n\n return results\n}\n","/**\n * Shared vocabulary for the FE lint checks (frontend `$`-structure).\n *\n * The frontend tree is organised in \"scopes\" (components, hooks, pages, utils\n * domains). Every scope owns the same file set (SCOPE_FILES) plus privileged\n * `$`-prefixed subdirectories ($components, $hooks, $assets, $misc). The `$`\n * prefix sorts these folders on top and makes them impossible to confuse with\n * a route segment or a domain name.\n *\n * Not a check module: it lives outside `checks/` so the runner never tries to\n * load it; tsup inlines it into each check entry.\n */\nimport { readdirSync, existsSync } from 'node:fs'\nimport path from 'pathe'\nimport type { RawDiagnostic, Severity } from '@cubocicloide/dude'\n\n/** Files every scope (component, hook, page, utils domain) may contain. */\nexport const SCOPE_FILES = new Set([\n 'index.tsx',\n 'styles.module.css',\n 'types.tsx',\n 'constants.tsx',\n 'functions.tsx',\n])\n\n/** Human-readable version of SCOPE_FILES for messages. */\nexport const SCOPE_FILES_LABEL = 'index.tsx, styles.module.css, types.tsx, constants.tsx, functions.tsx'\n\n/** The full set of privileged directory names. */\nexport const PRIVILEGED_DIRS = new Set(['$components', '$hooks', '$assets', '$misc', '$types'])\n\nexport const PASCAL_CASE = /^[A-Z][a-zA-Z0-9]*$/\nexport const KEBAB_CASE = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/\nexport const HOOK_NAME = /^use[A-Z][a-zA-Z0-9]*$/\n/** Dynamic route segment: [id], [userId], … */\nexport const DYNAMIC_SEGMENT = /^\\[[a-z][a-zA-Z0-9]*\\]$/\n\nexport function frontendSrc(root: string): string {\n return path.join(root, 'frontend', 'src')\n}\n\nexport function diag(\n root: string,\n absPath: string,\n severity: Severity,\n message: string,\n): RawDiagnostic {\n return { file: path.relative(root, absPath), line: 1, col: 1, severity, message }\n}\n\n/**\n * Recursively collect directories named `name` under `dir`.\n * Never descends into `$misc` (exempt from checks) or `node_modules`,\n * but a `$misc` directory itself is still reported when it matches `name`.\n */\nexport function findDirsNamed(dir: string, name: string): string[] {\n const found: string[] = []\n if (!existsSync(dir)) return found\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n if (!entry.isDirectory() || entry.name === 'node_modules') continue\n const full = path.join(dir, entry.name)\n if (entry.name === name) found.push(full)\n if (entry.name === '$misc') continue\n found.push(...findDirsNamed(full, name))\n }\n return found\n}\n\n/**\n * Collect page nodes under `pagesDir` as route paths relative to pages/\n * ('' = pages root). A page node is a directory whose index.tsx defines a\n * route. `$`-prefixed directories are structural, never route segments.\n */\nexport function collectPageNodes(pagesDir: string): string[] {\n const nodes: string[] = []\n if (!existsSync(pagesDir)) return nodes\n\n function walk(dir: string, route: string): void {\n if (existsSync(path.join(dir, 'index.tsx'))) nodes.push(route)\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n if (!entry.isDirectory() || entry.name.startsWith('$')) continue\n walk(path.join(dir, entry.name), route === '' ? entry.name : `${route}/${entry.name}`)\n }\n }\n\n walk(pagesDir, '')\n return nodes\n}\n"],"mappings":";AAAA,SAAS,eAAAA,cAAa,cAAAC,aAAY,oBAAoB;AACtD,OAAOC,WAAU;;;ACWjB,SAAS,aAAa,kBAAkB;AACxC,OAAO,UAAU;AAkBV,IAAM,cAAc;AAEpB,IAAM,YAAY;AAIlB,SAAS,YAAY,MAAsB;AAChD,SAAO,KAAK,KAAK,MAAM,YAAY,KAAK;AAC1C;AAEO,SAAS,KACd,MACA,SACA,UACA,SACe;AACf,SAAO,EAAE,MA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AA,EACzD;AAEA,SAAO;AACT;","names":["readdirSync","existsSync","path","existsSync","readdirSync","path"]}
@@ -0,0 +1,5 @@
1
+ import * as _cubocicloide_dude from '@cubocicloide/dude';
2
+
3
+ declare const _default: _cubocicloide_dude.StackDefinition;
4
+
5
+ export { _default as default };