create-huenei-template 0.2.18 → 0.3.1

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 (384) hide show
  1. package/dist/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +3 -2
  2. package/dist/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +13 -1
  3. package/dist/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +1 -1
  4. package/dist/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
  5. package/dist/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +2 -1
  6. package/dist/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +3 -1
  7. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +23 -10
  8. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +3 -4
  9. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
  10. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
  11. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
  12. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
  13. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
  14. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
  15. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
  16. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
  17. package/dist/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +1 -1
  18. package/dist/templates/frontend/hub-pre-sales/AGENTS.md +13 -3
  19. package/dist/templates/frontend/hub-pre-sales/README.md +2 -1
  20. package/dist/templates/frontend/hub-pre-sales/package.json +84 -82
  21. package/dist/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
  22. package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
  23. package/dist/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
  24. package/dist/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
  25. package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
  26. package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
  27. package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
  28. package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
  29. package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
  30. package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
  31. package/dist/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
  32. package/dist/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
  33. package/dist/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
  34. package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
  35. package/dist/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
  36. package/dist/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
  37. package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
  38. package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
  39. package/dist/templates/frontend/pre-sales/src/index.css +282 -282
  40. package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
  41. package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
  42. package/dist/templates/frontend/react-vite/.npmrc.example +28 -0
  43. package/dist/templates/frontend/react-vite/README.md +17 -0
  44. package/dist/templates/frontend/react-vite/eslint.config.js +41 -31
  45. package/dist/templates/frontend/react-vite/package.json +2 -0
  46. package/dist/templates/frontend/react-vite/src/index.css +3 -15
  47. package/dist/templates/frontend/react-vite/src/main.tsx +36 -33
  48. package/dist/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
  49. package/dist/templates/frontend/react-vite/src/routes/index.tsx +185 -187
  50. package/dist/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
  51. package/dist/templates/frontend/react-vite/vite.config.ts +7 -2
  52. package/dist/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
  53. package/dist/templates/mobile/expo-base/package.json +3 -2
  54. package/dist/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
  55. package/dist/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
  56. package/dist/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
  57. package/dist/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
  58. package/package.json +1 -1
  59. package/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +3 -2
  60. package/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +13 -1
  61. package/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +1 -1
  62. package/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
  63. package/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +2 -1
  64. package/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +3 -1
  65. package/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +23 -10
  66. package/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +3 -4
  67. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
  68. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
  69. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
  70. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
  71. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
  72. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
  73. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
  74. package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
  75. package/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +1 -1
  76. package/templates/frontend/hub-pre-sales/AGENTS.md +13 -3
  77. package/templates/frontend/hub-pre-sales/README.md +2 -1
  78. package/templates/frontend/hub-pre-sales/package.json +84 -82
  79. package/templates/frontend/hub-pre-sales/pnpm-lock.yaml +6597 -6575
  80. package/templates/frontend/hub-pre-sales/skills-lock.json +53 -0
  81. package/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
  82. package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
  83. package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
  84. package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
  85. package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
  86. package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
  87. package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
  88. package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
  89. package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
  90. package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -6448
  91. package/templates/frontend/pre-sales/skills-lock.json +10 -10
  92. package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
  93. package/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
  94. package/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
  95. package/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
  96. package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
  97. package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
  98. package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
  99. package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
  100. package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
  101. package/templates/frontend/pre-sales/src/index.css +282 -282
  102. package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
  103. package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
  104. package/templates/frontend/react-vite/.npmrc.example +28 -0
  105. package/templates/frontend/react-vite/README.md +17 -0
  106. package/templates/frontend/react-vite/eslint.config.js +41 -31
  107. package/templates/frontend/react-vite/package.json +2 -0
  108. package/templates/frontend/react-vite/pnpm-lock.yaml +535 -13
  109. package/templates/frontend/react-vite/src/index.css +3 -15
  110. package/templates/frontend/react-vite/src/main.tsx +36 -33
  111. package/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
  112. package/templates/frontend/react-vite/src/routes/index.tsx +185 -187
  113. package/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
  114. package/templates/frontend/react-vite/vite.config.ts +7 -2
  115. package/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
  116. package/templates/mobile/expo-base/package.json +3 -2
  117. package/templates/mobile/expo-base/pnpm-lock.yaml +10240 -11354
  118. package/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
  119. package/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
  120. package/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
  121. package/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
  122. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/nestjs-code-reviewer.md +0 -54
  123. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/prisma-guardian.md +0 -67
  124. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/test-runner.md +0 -57
  125. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-endpoint.md +0 -209
  126. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-model.md +0 -201
  127. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/autoTestOnStop.ts +0 -127
  128. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/blockDangerous.ts +0 -98
  129. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/ensureTestsExist.ts +0 -405
  130. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/formatOnEdit.ts +0 -70
  131. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/protectSecrets.ts +0 -101
  132. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/sessionInit.ts +0 -104
  133. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/validatePrisma.ts +0 -121
  134. package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks.json +0 -46
  135. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -54
  136. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/prisma-guardian.md +0 -67
  137. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/test-runner.md +0 -57
  138. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-endpoint.md +0 -209
  139. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-model.md +0 -201
  140. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
  141. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/blockDangerous.ts +0 -98
  142. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/ensureTestsExist.ts +0 -405
  143. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/formatOnEdit.ts +0 -70
  144. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/protectSecrets.ts +0 -101
  145. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/sessionInit.ts +0 -104
  146. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/validatePrisma.ts +0 -121
  147. package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks.json +0 -46
  148. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/nestjs-code-reviewer.md +0 -23
  149. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/sequelize-guardian.md +0 -37
  150. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/test-runner.md +0 -33
  151. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-endpoint.md +0 -76
  152. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-model.md +0 -85
  153. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/autoTestOnStop.ts +0 -127
  154. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/blockDangerous.ts +0 -98
  155. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/ensureTestsExist.ts +0 -397
  156. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/formatOnEdit.ts +0 -66
  157. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/protectSecrets.ts +0 -101
  158. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/sessionInit.ts +0 -104
  159. package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks.json +0 -41
  160. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -23
  161. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/sequelize-guardian.md +0 -37
  162. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/test-runner.md +0 -33
  163. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-endpoint.md +0 -76
  164. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-model.md +0 -85
  165. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
  166. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/blockDangerous.ts +0 -98
  167. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/ensureTestsExist.ts +0 -397
  168. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/formatOnEdit.ts +0 -66
  169. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/protectSecrets.ts +0 -101
  170. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/sessionInit.ts +0 -104
  171. package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks.json +0 -41
  172. package/templates/backend/nestjs-api-postgres/.cursor/agents/nestjs-code-reviewer.md +0 -54
  173. package/templates/backend/nestjs-api-postgres/.cursor/agents/prisma-guardian.md +0 -62
  174. package/templates/backend/nestjs-api-postgres/.cursor/agents/security-auditor.md +0 -71
  175. package/templates/backend/nestjs-api-postgres/.cursor/agents/test-runner.md +0 -58
  176. package/templates/backend/nestjs-api-postgres/.cursor/commands/add-pagination.md +0 -235
  177. package/templates/backend/nestjs-api-postgres/.cursor/commands/add-seed.md +0 -160
  178. package/templates/backend/nestjs-api-postgres/.cursor/commands/add-tests.md +0 -322
  179. package/templates/backend/nestjs-api-postgres/.cursor/commands/new-endpoint.md +0 -209
  180. package/templates/backend/nestjs-api-postgres/.cursor/commands/new-guard.md +0 -195
  181. package/templates/backend/nestjs-api-postgres/.cursor/commands/new-interceptor.md +0 -188
  182. package/templates/backend/nestjs-api-postgres/.cursor/commands/new-middleware.md +0 -176
  183. package/templates/backend/nestjs-api-postgres/.cursor/commands/new-model.md +0 -201
  184. package/templates/backend/nestjs-api-postgres/.cursor/hooks/auto-retry.ts +0 -62
  185. package/templates/backend/nestjs-api-postgres/.cursor/hooks/block-dangerous.ts +0 -202
  186. package/templates/backend/nestjs-api-postgres/.cursor/hooks/format-and-validate.ts +0 -124
  187. package/templates/backend/nestjs-api-postgres/.cursor/hooks/protect-secrets.ts +0 -105
  188. package/templates/backend/nestjs-api-postgres/.cursor/hooks/session-context.ts +0 -130
  189. package/templates/backend/nestjs-api-postgres/.cursor/hooks.json +0 -36
  190. package/templates/backend/nestjs-api-postgres/.cursor/mcp.json +0 -21
  191. package/templates/backend/nestjs-api-sqlite/.cursor/agents/code-reviewer.md +0 -153
  192. package/templates/backend/nestjs-api-sqlite/.cursor/agents/nestjs-architect.md +0 -138
  193. package/templates/backend/nestjs-api-sqlite/.cursor/agents/prisma-analyst.md +0 -164
  194. package/templates/backend/nestjs-api-sqlite/.cursor/agents/security-auditor.md +0 -150
  195. package/templates/backend/nestjs-api-sqlite/.cursor/agents/test-engineer.md +0 -290
  196. package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-pagination.md +0 -235
  197. package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-seed.md +0 -172
  198. package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-tests.md +0 -322
  199. package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-endpoint.md +0 -209
  200. package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-guard.md +0 -195
  201. package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-interceptor.md +0 -188
  202. package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-middleware.md +0 -176
  203. package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-model.md +0 -201
  204. package/templates/backend/nestjs-api-sqlite/.cursor/hooks/auto-format.ts +0 -80
  205. package/templates/backend/nestjs-api-sqlite/.cursor/hooks/block-dangerous-commands.ts +0 -144
  206. package/templates/backend/nestjs-api-sqlite/.cursor/hooks/prisma-schema-watcher.ts +0 -64
  207. package/templates/backend/nestjs-api-sqlite/.cursor/hooks/protect-sensitive-files.ts +0 -122
  208. package/templates/backend/nestjs-api-sqlite/.cursor/hooks/session-context.ts +0 -105
  209. package/templates/backend/nestjs-api-sqlite/.cursor/hooks.json +0 -18
  210. package/templates/backend/nestjs-api-sqlite/.cursor/mcp.json +0 -17
  211. package/templates/backend/nestjs-api-sqlserver/.cursor/agents/nestjs-code-reviewer.md +0 -54
  212. package/templates/backend/nestjs-api-sqlserver/.cursor/agents/prisma-guardian.md +0 -67
  213. package/templates/backend/nestjs-api-sqlserver/.cursor/agents/test-runner.md +0 -57
  214. package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-endpoint.md +0 -209
  215. package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-model.md +0 -201
  216. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/autoTestOnStop.ts +0 -127
  217. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/blockDangerous.ts +0 -98
  218. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/ensureTestsExist.ts +0 -405
  219. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/formatOnEdit.ts +0 -70
  220. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/protectSecrets.ts +0 -101
  221. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/sessionInit.ts +0 -104
  222. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/validatePrisma.ts +0 -121
  223. package/templates/backend/nestjs-api-sqlserver/.cursor/hooks.json +0 -46
  224. package/templates/frontend/angular-base/.cursor/agents/accessibility-reviewer.md +0 -67
  225. package/templates/frontend/angular-base/.cursor/agents/angular-code-reviewer.md +0 -60
  226. package/templates/frontend/angular-base/.cursor/agents/qa-test-expert.md +0 -70
  227. package/templates/frontend/angular-base/.cursor/agents/security-auditor.md +0 -58
  228. package/templates/frontend/angular-base/.cursor/commands/add-e2e-test.md +0 -236
  229. package/templates/frontend/angular-base/.cursor/commands/new-component.md +0 -211
  230. package/templates/frontend/angular-base/.cursor/commands/new-form.md +0 -284
  231. package/templates/frontend/angular-base/.cursor/commands/new-interceptor.md +0 -257
  232. package/templates/frontend/angular-base/.cursor/commands/new-page.md +0 -215
  233. package/templates/frontend/angular-base/.cursor/commands/new-service.md +0 -203
  234. package/templates/frontend/angular-base/.cursor/hooks/auto-format.ts +0 -70
  235. package/templates/frontend/angular-base/.cursor/hooks/auto-test-on-stop.ts +0 -113
  236. package/templates/frontend/angular-base/.cursor/hooks/block-dangerous-commands.ts +0 -160
  237. package/templates/frontend/angular-base/.cursor/hooks/ensure-tests-exist.ts +0 -363
  238. package/templates/frontend/angular-base/.cursor/hooks/protect-sensitive-files.ts +0 -118
  239. package/templates/frontend/angular-base/.cursor/hooks/session-context.ts +0 -110
  240. package/templates/frontend/angular-base/.cursor/hooks.json +0 -41
  241. package/templates/frontend/angular-base/.cursor/mcp.json +0 -21
  242. package/templates/frontend/angular-nx/.cursor/agents/angular-code-reviewer.md +0 -64
  243. package/templates/frontend/angular-nx/.cursor/agents/ci-watcher.md +0 -480
  244. package/templates/frontend/angular-nx/.cursor/agents/nx-architecture-guardian.md +0 -69
  245. package/templates/frontend/angular-nx/.cursor/agents/qa-test-expert.md +0 -75
  246. package/templates/frontend/angular-nx/.cursor/agents/security-auditor.md +0 -61
  247. package/templates/frontend/angular-nx/.cursor/commands/ci-monitor.md +0 -428
  248. package/templates/frontend/angular-nx/.cursor/hooks/auto-format.ts +0 -70
  249. package/templates/frontend/angular-nx/.cursor/hooks/auto-test-on-stop.ts +0 -115
  250. package/templates/frontend/angular-nx/.cursor/hooks/block-dangerous-commands.ts +0 -188
  251. package/templates/frontend/angular-nx/.cursor/hooks/ensure-tests-exist.ts +0 -399
  252. package/templates/frontend/angular-nx/.cursor/hooks/protect-sensitive-files.ts +0 -128
  253. package/templates/frontend/angular-nx/.cursor/hooks/session-context.ts +0 -121
  254. package/templates/frontend/angular-nx/.cursor/hooks.json +0 -41
  255. package/templates/frontend/angular-nx/.cursor/mcp.json +0 -12
  256. package/templates/frontend/hub-pre-sales/.cursor/agents/frontend-senior.agent.md +0 -49
  257. package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -98
  258. package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +0 -36
  259. package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-refactor.agent.md +0 -54
  260. package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-validator.agent.md +0 -69
  261. package/templates/frontend/hub-pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
  262. package/templates/frontend/hub-pre-sales/.cursor/agents/security-expert.agent.md +0 -39
  263. package/templates/frontend/hub-pre-sales/.cursor/agents/ux-ui-expert.agent.md +0 -45
  264. package/templates/frontend/hub-pre-sales/.cursor/commands/add-calendar.md +0 -151
  265. package/templates/frontend/hub-pre-sales/.cursor/commands/add-chart.md +0 -148
  266. package/templates/frontend/hub-pre-sales/.cursor/commands/add-dashboard.md +0 -135
  267. package/templates/frontend/hub-pre-sales/.cursor/commands/add-form.md +0 -128
  268. package/templates/frontend/hub-pre-sales/.cursor/commands/add-login.md +0 -160
  269. package/templates/frontend/hub-pre-sales/.cursor/commands/add-map.md +0 -172
  270. package/templates/frontend/hub-pre-sales/.cursor/commands/add-route.md +0 -211
  271. package/templates/frontend/hub-pre-sales/.cursor/commands/add-screen.md +0 -118
  272. package/templates/frontend/hub-pre-sales/.cursor/commands/add-table.md +0 -156
  273. package/templates/frontend/hub-pre-sales/.cursor/commands/add-tests.md +0 -269
  274. package/templates/frontend/hub-pre-sales/.cursor/commands/mock-backend.md +0 -139
  275. package/templates/frontend/hub-pre-sales/.cursor/commands/new-component.md +0 -192
  276. package/templates/frontend/hub-pre-sales/.cursor/commands/new-form.md +0 -268
  277. package/templates/frontend/hub-pre-sales/.cursor/commands/new-page.md +0 -203
  278. package/templates/frontend/hub-pre-sales/.cursor/commands/new-query.md +0 -287
  279. package/templates/frontend/hub-pre-sales/.cursor/commands/new-table.md +0 -299
  280. package/templates/frontend/hub-pre-sales/.cursor/commands/prepare-preview.md +0 -48
  281. package/templates/frontend/hub-pre-sales/.cursor/commands/refactor-ui.md +0 -94
  282. package/templates/frontend/hub-pre-sales/.cursor/commands/ver-demo.md +0 -58
  283. package/templates/frontend/hub-pre-sales/.cursor/hooks/checkFileLength.ts +0 -69
  284. package/templates/frontend/hub-pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -103
  285. package/templates/frontend/hub-pre-sales/.cursor/hooks.json +0 -23
  286. package/templates/frontend/hub-pre-sales/.cursor/mcp.json +0 -17
  287. package/templates/frontend/pre-sales/.cursor/agents/frontend-senior.agent.md +0 -49
  288. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -92
  289. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +0 -36
  290. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +0 -87
  291. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-refactor.agent.md +0 -54
  292. package/templates/frontend/pre-sales/.cursor/agents/pre-sales-validator.agent.md +0 -69
  293. package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
  294. package/templates/frontend/pre-sales/.cursor/agents/security-expert.agent.md +0 -39
  295. package/templates/frontend/pre-sales/.cursor/agents/ux-ui-expert.agent.md +0 -45
  296. package/templates/frontend/pre-sales/.cursor/commands/add-calendar.md +0 -151
  297. package/templates/frontend/pre-sales/.cursor/commands/add-chart.md +0 -148
  298. package/templates/frontend/pre-sales/.cursor/commands/add-dashboard.md +0 -135
  299. package/templates/frontend/pre-sales/.cursor/commands/add-form.md +0 -128
  300. package/templates/frontend/pre-sales/.cursor/commands/add-login.md +0 -160
  301. package/templates/frontend/pre-sales/.cursor/commands/add-map.md +0 -172
  302. package/templates/frontend/pre-sales/.cursor/commands/add-route.md +0 -211
  303. package/templates/frontend/pre-sales/.cursor/commands/add-screen.md +0 -118
  304. package/templates/frontend/pre-sales/.cursor/commands/add-table.md +0 -156
  305. package/templates/frontend/pre-sales/.cursor/commands/add-tests.md +0 -269
  306. package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +0 -73
  307. package/templates/frontend/pre-sales/.cursor/commands/mock-backend.md +0 -139
  308. package/templates/frontend/pre-sales/.cursor/commands/new-component.md +0 -192
  309. package/templates/frontend/pre-sales/.cursor/commands/new-form.md +0 -268
  310. package/templates/frontend/pre-sales/.cursor/commands/new-page.md +0 -203
  311. package/templates/frontend/pre-sales/.cursor/commands/new-query.md +0 -287
  312. package/templates/frontend/pre-sales/.cursor/commands/new-table.md +0 -299
  313. package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +0 -135
  314. package/templates/frontend/pre-sales/.cursor/commands/refactor-ui.md +0 -94
  315. package/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +0 -58
  316. package/templates/frontend/pre-sales/.cursor/hooks/checkFileLength.ts +0 -69
  317. package/templates/frontend/pre-sales/.cursor/hooks/ensureTestsExist.ts +0 -220
  318. package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -97
  319. package/templates/frontend/pre-sales/.cursor/hooks.json +0 -23
  320. package/templates/frontend/pre-sales/.cursor/mcp.json +0 -13
  321. package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +0 -22
  322. package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +0 -24
  323. package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +0 -32
  324. package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +0 -25
  325. package/templates/frontend/react-ssr/.cursor/commands/new-component.md +0 -97
  326. package/templates/frontend/react-ssr/.cursor/commands/new-page.md +0 -95
  327. package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +0 -66
  328. package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +0 -89
  329. package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +0 -64
  330. package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +0 -94
  331. package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +0 -120
  332. package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +0 -209
  333. package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +0 -101
  334. package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +0 -93
  335. package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +0 -10
  336. package/templates/frontend/react-ssr/.cursor/hooks.json +0 -41
  337. package/templates/frontend/react-vite/.cursor/agents/frontend-senior.agent.md +0 -49
  338. package/templates/frontend/react-vite/.cursor/agents/qa-test-expert.agent.md +0 -126
  339. package/templates/frontend/react-vite/.cursor/agents/security-expert.agent.md +0 -39
  340. package/templates/frontend/react-vite/.cursor/agents/ux-ui-expert.agent.md +0 -45
  341. package/templates/frontend/react-vite/.cursor/commands/add-route.md +0 -211
  342. package/templates/frontend/react-vite/.cursor/commands/add-tests.md +0 -269
  343. package/templates/frontend/react-vite/.cursor/commands/new-component.md +0 -232
  344. package/templates/frontend/react-vite/.cursor/commands/new-form.md +0 -268
  345. package/templates/frontend/react-vite/.cursor/commands/new-page.md +0 -203
  346. package/templates/frontend/react-vite/.cursor/commands/new-query.md +0 -287
  347. package/templates/frontend/react-vite/.cursor/commands/new-table.md +0 -299
  348. package/templates/frontend/react-vite/.cursor/hooks/autoTestOnStop.ts +0 -117
  349. package/templates/frontend/react-vite/.cursor/hooks/blockDangerous.ts +0 -75
  350. package/templates/frontend/react-vite/.cursor/hooks/ensureTestsExist.ts +0 -306
  351. package/templates/frontend/react-vite/.cursor/hooks/formatOnEdit.ts +0 -49
  352. package/templates/frontend/react-vite/.cursor/hooks/protectSecrets.ts +0 -88
  353. package/templates/frontend/react-vite/.cursor/hooks/sessionInit.ts +0 -77
  354. package/templates/frontend/react-vite/.cursor/hooks.json +0 -41
  355. package/templates/frontend/react-vite/.cursor/mcp.json +0 -17
  356. package/templates/frontend/react-vite-help/.cursor/RECONSTRUCTION-PROMPT.md +0 -738
  357. package/templates/frontend/react-vite-help/.cursor/agents/frontend-senior.agent.md +0 -49
  358. package/templates/frontend/react-vite-help/.cursor/agents/qa-test-expert.agent.md +0 -49
  359. package/templates/frontend/react-vite-help/.cursor/agents/security-expert.agent.md +0 -39
  360. package/templates/frontend/react-vite-help/.cursor/agents/ux-ui-expert.agent.md +0 -45
  361. package/templates/frontend/react-vite-help/.cursor/commands/add-route.md +0 -211
  362. package/templates/frontend/react-vite-help/.cursor/commands/add-tests.md +0 -269
  363. package/templates/frontend/react-vite-help/.cursor/commands/new-component.md +0 -232
  364. package/templates/frontend/react-vite-help/.cursor/commands/new-form.md +0 -268
  365. package/templates/frontend/react-vite-help/.cursor/commands/new-page.md +0 -203
  366. package/templates/frontend/react-vite-help/.cursor/commands/new-query.md +0 -287
  367. package/templates/frontend/react-vite-help/.cursor/commands/new-table.md +0 -299
  368. package/templates/frontend/react-vite-help/.cursor/hooks/ensureTestsExist.ts +0 -220
  369. package/templates/frontend/react-vite-help/.cursor/hooks.json +0 -10
  370. package/templates/frontend/react-vite-help/.cursor/mcp.json +0 -17
  371. package/templates/mobile/expo-base/.cursor/agents/api-integration.md +0 -139
  372. package/templates/mobile/expo-base/.cursor/agents/feature-architect.md +0 -131
  373. package/templates/mobile/expo-base/.cursor/agents/i18n-manager.md +0 -147
  374. package/templates/mobile/expo-base/.cursor/agents/quality-reviewer.md +0 -137
  375. package/templates/mobile/expo-base/.cursor/agents/testing-specialist.md +0 -123
  376. package/templates/mobile/expo-base/.cursor/agents/theme-engineer.md +0 -106
  377. package/templates/mobile/expo-base/.cursor/commands/add-translation.md +0 -184
  378. package/templates/mobile/expo-base/.cursor/commands/new-api-service.md +0 -280
  379. package/templates/mobile/expo-base/.cursor/commands/new-component.md +0 -298
  380. package/templates/mobile/expo-base/.cursor/commands/new-hook.md +0 -291
  381. package/templates/mobile/expo-base/.cursor/commands/new-modal.md +0 -345
  382. package/templates/mobile/expo-base/.cursor/commands/new-screen.md +0 -267
  383. package/templates/mobile/expo-base/.cursor/commands/new-tab.md +0 -238
  384. package/templates/mobile/expo-base/.cursor/mcp.json +0 -21
@@ -1,287 +0,0 @@
1
- # new-query
2
-
3
- Actuá como **arquitecto frontend senior especializado en React 19, TanStack Query y TypeScript**.
4
-
5
- Este comando debe crear **hooks de TanStack Query completos (query + mutation)** para interactuar con una API REST, siguiendo las convenciones del proyecto.
6
-
7
- ---
8
-
9
- ## Flujo interactivo (obligatorio)
10
-
11
- 1. Preguntar:
12
- - Nombre del recurso/entidad (**singular, kebab-case**, ej: `user`, `product`, `category`)
13
- 2. Preguntar:
14
- - URL base de la API (ej: `/api/users`, `https://api.example.com/products`)
15
- 3. Preguntar:
16
- - ¿Qué hooks generar?
17
- - **useQuery** (obtener lista / obtener por ID)
18
- - **useMutation create** (crear nuevo)
19
- - **useMutation update** (actualizar)
20
- - **useMutation delete** (eliminar)
21
- - Permitir selección múltiple — Recomendado: Todos
22
- 4. Preguntar:
23
- - ¿Incluir optimistic updates en mutations? (Sí / No)
24
- 5. Preguntar:
25
- - ¿Incluir paginación en el query de lista? (Sí / No)
26
- 6. Validar:
27
- - Que el nombre sea válido
28
- - Que no exista ya `src/hooks/use-{name}.ts`
29
-
30
- Si alguna validación falla, **detener la ejecución y explicar el error**.
31
-
32
- ---
33
-
34
- ## Estructura a generar
35
-
36
- ```
37
- src/
38
- ├── hooks/
39
- │ └── use-{name}.ts (hooks de TanStack Query)
40
- ├── services/
41
- │ └── {name}.service.ts (funciones de API)
42
- ├── types/
43
- │ └── {name}.types.ts (interfaces TypeScript)
44
- ```
45
-
46
- ---
47
-
48
- ## Reglas generales
49
-
50
- - Código **100% TypeScript** con strict mode
51
- - No usar `any`
52
- - Query keys consistentes y tipadas
53
- - Separar funciones de API de los hooks
54
- - Invalidación automática de queries en mutations
55
- - Manejo de errores con tipos
56
- - Stale time y cache time configurados
57
-
58
- ---
59
-
60
- ## Tipos (`{name}.types.ts`)
61
-
62
- ```typescript
63
- export interface {Name} {
64
- id: number;
65
- // campos del modelo
66
- createdAt: string;
67
- updatedAt: string;
68
- }
69
-
70
- export interface Create{Name}Dto {
71
- // campos requeridos (sin id, timestamps)
72
- }
73
-
74
- export interface Update{Name}Dto extends Partial<Create{Name}Dto> {}
75
-
76
- export interface PaginatedResponse<T> {
77
- data: T[];
78
- meta: {
79
- page: number;
80
- limit: number;
81
- total: number;
82
- totalPages: number;
83
- hasNextPage: boolean;
84
- hasPreviousPage: boolean;
85
- };
86
- }
87
- ```
88
-
89
- ---
90
-
91
- ## Servicio API (`{name}.service.ts`)
92
-
93
- ```typescript
94
- import type { {Name}, Create{Name}Dto, Update{Name}Dto, PaginatedResponse } from '@/types/{name}.types';
95
-
96
- const BASE_URL = '/api/{name}s';
97
-
98
- export const {name}Service = {
99
- async getAll(page = 1, limit = 10): Promise<PaginatedResponse<{Name}>> {
100
- const params = new URLSearchParams({ page: String(page), limit: String(limit) });
101
- const response = await fetch(`${BASE_URL}?${params}`);
102
- if (!response.ok) throw new Error('Error al obtener {name}s');
103
- return response.json();
104
- },
105
-
106
- async getById(id: number): Promise<{Name}> {
107
- const response = await fetch(`${BASE_URL}/${id}`);
108
- if (!response.ok) throw new Error('{Name} no encontrado');
109
- return response.json();
110
- },
111
-
112
- async create(dto: Create{Name}Dto): Promise<{Name}> {
113
- const response = await fetch(BASE_URL, {
114
- method: 'POST',
115
- headers: { 'Content-Type': 'application/json' },
116
- body: JSON.stringify(dto),
117
- });
118
- if (!response.ok) throw new Error('Error al crear {name}');
119
- return response.json();
120
- },
121
-
122
- async update(id: number, dto: Update{Name}Dto): Promise<{Name}> {
123
- const response = await fetch(`${BASE_URL}/${id}`, {
124
- method: 'PATCH',
125
- headers: { 'Content-Type': 'application/json' },
126
- body: JSON.stringify(dto),
127
- });
128
- if (!response.ok) throw new Error('Error al actualizar {name}');
129
- return response.json();
130
- },
131
-
132
- async remove(id: number): Promise<void> {
133
- const response = await fetch(`${BASE_URL}/${id}`, { method: 'DELETE' });
134
- if (!response.ok) throw new Error('Error al eliminar {name}');
135
- },
136
- };
137
- ```
138
-
139
- ---
140
-
141
- ## Hooks de Query (`use-{name}.ts`)
142
-
143
- ```typescript
144
- import { useQuery, useMutation, useQueryClient, queryOptions } from '@tanstack/react-query';
145
- import { {name}Service } from '@/services/{name}.service';
146
- import type { {Name}, Create{Name}Dto, Update{Name}Dto } from '@/types/{name}.types';
147
-
148
- // Query keys
149
- export const {name}Keys = {
150
- all: ['{name}s'] as const,
151
- lists: () => [...{name}Keys.all, 'list'] as const,
152
- list: (page: number, limit: number) => [...{name}Keys.lists(), { page, limit }] as const,
153
- details: () => [...{name}Keys.all, 'detail'] as const,
154
- detail: (id: number) => [...{name}Keys.details(), id] as const,
155
- };
156
-
157
- /** Query options para obtener lista (reutilizable en loaders) */
158
- export const {name}ListQueryOptions = (page = 1, limit = 10) =>
159
- queryOptions({
160
- queryKey: {name}Keys.list(page, limit),
161
- queryFn: () => {name}Service.getAll(page, limit),
162
- staleTime: 5 * 60 * 1000, // 5 minutos
163
- });
164
-
165
- /** Query options para obtener por ID */
166
- export const {name}DetailQueryOptions = (id: number) =>
167
- queryOptions({
168
- queryKey: {name}Keys.detail(id),
169
- queryFn: () => {name}Service.getById(id),
170
- staleTime: 5 * 60 * 1000,
171
- enabled: id > 0,
172
- });
173
-
174
- /** Hook para obtener lista de {name}s */
175
- export function use{Name}List(page = 1, limit = 10) {
176
- return useQuery({name}ListQueryOptions(page, limit));
177
- }
178
-
179
- /** Hook para obtener un {name} por ID */
180
- export function use{Name}Detail(id: number) {
181
- return useQuery({name}DetailQueryOptions(id));
182
- }
183
-
184
- /** Hook para crear un {name} */
185
- export function useCreate{Name}() {
186
- const queryClient = useQueryClient();
187
-
188
- return useMutation({
189
- mutationFn: (dto: Create{Name}Dto) => {name}Service.create(dto),
190
- onSuccess: () => {
191
- queryClient.invalidateQueries({ queryKey: {name}Keys.lists() });
192
- },
193
- });
194
- }
195
-
196
- /** Hook para actualizar un {name} */
197
- export function useUpdate{Name}() {
198
- const queryClient = useQueryClient();
199
-
200
- return useMutation({
201
- mutationFn: ({ id, dto }: { id: number; dto: Update{Name}Dto }) =>
202
- {name}Service.update(id, dto),
203
- onSuccess: (data, { id }) => {
204
- queryClient.invalidateQueries({ queryKey: {name}Keys.detail(id) });
205
- queryClient.invalidateQueries({ queryKey: {name}Keys.lists() });
206
- },
207
- });
208
- }
209
-
210
- /** Hook para eliminar un {name} */
211
- export function useDelete{Name}() {
212
- const queryClient = useQueryClient();
213
-
214
- return useMutation({
215
- mutationFn: (id: number) => {name}Service.remove(id),
216
- onSuccess: () => {
217
- queryClient.invalidateQueries({ queryKey: {name}Keys.lists() });
218
- },
219
- });
220
- }
221
- ```
222
-
223
- ---
224
-
225
- ## Con Optimistic Updates
226
-
227
- Si se seleccionó optimistic updates:
228
-
229
- ```typescript
230
- export function useDelete{Name}() {
231
- const queryClient = useQueryClient();
232
-
233
- return useMutation({
234
- mutationFn: (id: number) => {name}Service.remove(id),
235
- onMutate: async (id) => {
236
- await queryClient.cancelQueries({ queryKey: {name}Keys.lists() });
237
- const previousData = queryClient.getQueryData({name}Keys.lists());
238
-
239
- queryClient.setQueriesData({ queryKey: {name}Keys.lists() }, (old: any) => ({
240
- ...old,
241
- data: old?.data?.filter((item: {Name}) => item.id !== id) ?? [],
242
- }));
243
-
244
- return { previousData };
245
- },
246
- onError: (_err, _id, context) => {
247
- if (context?.previousData) {
248
- queryClient.setQueriesData({ queryKey: {name}Keys.lists() }, context.previousData);
249
- }
250
- },
251
- onSettled: () => {
252
- queryClient.invalidateQueries({ queryKey: {name}Keys.lists() });
253
- },
254
- });
255
- }
256
- ```
257
-
258
- ---
259
-
260
- ## Mensajes finales obligatorios
261
-
262
- Al finalizar, mostrar:
263
-
264
- * Lista de archivos creados
265
- * Ejemplo de uso en un componente:
266
-
267
- ```tsx
268
- const { data, isLoading, error } = use{Name}List();
269
- const createMutation = useCreate{Name}();
270
- const deleteMutation = useDelete{Name}();
271
- ```
272
-
273
- * Recordar ajustar los tipos y la URL de API
274
- * Recordar que las query options se pueden usar en TanStack Router loaders
275
-
276
- ---
277
-
278
- ## Criterios de calidad
279
-
280
- * Query keys factory pattern
281
- * Separación de API service y hooks
282
- * Invalidación automática en mutations
283
- * Query options reutilizables (para loaders)
284
- * Tipado estricto sin `any`
285
- * Cumple ESLint y Prettier del proyecto
286
-
287
- Este command debe **estandarizar el data fetching con TanStack Query y mantener consistencia en toda la aplicación**.
@@ -1,299 +0,0 @@
1
- # new-table
2
-
3
- Actuá como **arquitecto frontend senior especializado en React 19, TanStack Table, TanStack Query y Tailwind CSS**.
4
-
5
- Este comando debe crear **una tabla de datos completa con TanStack Table** incluyendo sorting, filtering y paginación, siguiendo las convenciones del proyecto.
6
-
7
- ---
8
-
9
- ## Flujo interactivo (obligatorio)
10
-
11
- 1. Preguntar:
12
- - Nombre del recurso/entidad para la tabla (**singular, kebab-case**, ej: `user`, `product`, `order`)
13
- 2. Preguntar:
14
- - Columnas de la tabla, una por una:
15
- - Nombre del campo (camelCase, debe coincidir con la propiedad del modelo)
16
- - Etiqueta visible (ej: "Nombre", "Email", "Fecha de Creación")
17
- - Tipo de dato (`string`, `number`, `date`, `boolean`, `custom`)
18
- - ¿Es sorteable? (Sí / No)
19
- - ¿Es filtrable? (Sí / No)
20
- 3. Preguntar:
21
- - ¿Incluir columna de acciones? (Sí / No)
22
- - Si sí, ¿qué acciones? (Ver, Editar, Eliminar)
23
- 4. Preguntar:
24
- - ¿Paginación del lado del servidor o del cliente?
25
- - **Server-side** (paginación en la API)
26
- - **Client-side** (datos completos en memoria)
27
- 5. Preguntar:
28
- - ¿Conectar con TanStack Query para obtener datos? (Sí / No)
29
- 6. Preguntar:
30
- - ¿Qué librería de UI usar?
31
- - **DaisyUI**
32
- - **Shadcn UI**
33
- - **HTML nativo con Tailwind**
34
- 7. Validar:
35
- - Que el nombre sea válido
36
- - Que al menos una columna sea definida
37
-
38
- Si alguna validación falla, **detener la ejecución y explicar el error**.
39
-
40
- ---
41
-
42
- ## Estructura a generar
43
-
44
- ```
45
- src/
46
- ├── components/
47
- │ └── tables/
48
- │ └── {Name}Table/
49
- │ ├── {Name}Table.tsx (componente principal)
50
- │ ├── {name}-columns.tsx (definición de columnas)
51
- │ └── index.ts
52
- ```
53
-
54
- ---
55
-
56
- ## Reglas generales
57
-
58
- - Código **100% TypeScript** con strict mode
59
- - Usar `@tanstack/react-table` con tipado estricto
60
- - Columnas definidas con `createColumnHelper` o `ColumnDef`
61
- - Tailwind CSS + DaisyUI/Shadcn para estilos
62
- - Separar definición de columnas del componente
63
- - No usar `any`
64
-
65
- ---
66
-
67
- ## Definición de columnas (`{name}-columns.tsx`)
68
-
69
- ```typescript
70
- import { createColumnHelper } from '@tanstack/react-table';
71
- import type { {Name} } from '@/types/{name}.types';
72
-
73
- const columnHelper = createColumnHelper<{Name}>();
74
-
75
- export const {name}Columns = [
76
- columnHelper.accessor('id', {
77
- header: 'ID',
78
- cell: (info) => info.getValue(),
79
- enableSorting: true,
80
- }),
81
- // Columnas dinámicas según campos seleccionados
82
- columnHelper.accessor('name', {
83
- header: 'Nombre',
84
- cell: (info) => info.getValue(),
85
- enableSorting: true,
86
- enableColumnFilter: true,
87
- }),
88
- columnHelper.accessor('createdAt', {
89
- header: 'Fecha de Creación',
90
- cell: (info) => new Date(info.getValue()).toLocaleDateString('es-AR'),
91
- enableSorting: true,
92
- }),
93
- // Columna de acciones (si se seleccionó)
94
- columnHelper.display({
95
- id: 'actions',
96
- header: 'Acciones',
97
- cell: ({ row }) => (
98
- <div className="flex gap-2">
99
- <button className="btn btn-ghost btn-xs" onClick={() => onView(row.original.id)}>
100
- Ver
101
- </button>
102
- <button className="btn btn-ghost btn-xs" onClick={() => onEdit(row.original.id)}>
103
- Editar
104
- </button>
105
- <button className="btn btn-ghost btn-xs text-error" onClick={() => onDelete(row.original.id)}>
106
- Eliminar
107
- </button>
108
- </div>
109
- ),
110
- }),
111
- ];
112
- ```
113
-
114
- ---
115
-
116
- ## Componente de tabla (`{Name}Table.tsx`)
117
-
118
- ### Con DaisyUI:
119
-
120
- ```typescript
121
- import { type FC, useState } from 'react';
122
- import {
123
- useReactTable,
124
- getCoreRowModel,
125
- getSortedRowModel,
126
- getFilteredRowModel,
127
- getPaginationRowModel,
128
- flexRender,
129
- type SortingState,
130
- type ColumnFiltersState,
131
- } from '@tanstack/react-table';
132
- import type { {Name} } from '@/types/{name}.types';
133
- import { {name}Columns } from './{name}-columns';
134
-
135
- interface {Name}TableProps {
136
- data: {Name}[];
137
- isLoading?: boolean;
138
- onView?: (id: number) => void;
139
- onEdit?: (id: number) => void;
140
- onDelete?: (id: number) => void;
141
- }
142
-
143
- export const {Name}Table: FC<{Name}TableProps> = ({
144
- data,
145
- isLoading = false,
146
- onView,
147
- onEdit,
148
- onDelete,
149
- }) => {
150
- const [sorting, setSorting] = useState<SortingState>([]);
151
- const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);
152
- const [globalFilter, setGlobalFilter] = useState('');
153
-
154
- const table = useReactTable({
155
- data,
156
- columns: {name}Columns,
157
- state: { sorting, columnFilters, globalFilter },
158
- onSortingChange: setSorting,
159
- onColumnFiltersChange: setColumnFilters,
160
- onGlobalFilterChange: setGlobalFilter,
161
- getCoreRowModel: getCoreRowModel(),
162
- getSortedRowModel: getSortedRowModel(),
163
- getFilteredRowModel: getFilteredRowModel(),
164
- getPaginationRowModel: getPaginationRowModel(),
165
- });
166
-
167
- if (isLoading) {
168
- return (
169
- <div className="flex justify-center p-8">
170
- <span className="loading loading-spinner loading-lg" />
171
- </div>
172
- );
173
- }
174
-
175
- return (
176
- <div className="space-y-4">
177
- {/* Búsqueda global */}
178
- <input
179
- type="text"
180
- placeholder="Buscar..."
181
- className="input input-bordered w-full max-w-xs"
182
- value={globalFilter}
183
- onChange={(e) => setGlobalFilter(e.target.value)}
184
- />
185
-
186
- {/* Tabla */}
187
- <div className="overflow-x-auto">
188
- <table className="table table-zebra w-full">
189
- <thead>
190
- {table.getHeaderGroups().map((headerGroup) => (
191
- <tr key={headerGroup.id}>
192
- {headerGroup.headers.map((header) => (
193
- <th
194
- key={header.id}
195
- className={header.column.getCanSort() ? 'cursor-pointer select-none' : ''}
196
- onClick={header.column.getToggleSortingHandler()}
197
- >
198
- <div className="flex items-center gap-1">
199
- {flexRender(header.column.columnDef.header, header.getContext())}
200
- {{ asc: ' ↑', desc: ' ↓' }[header.column.getIsSorted() as string] ?? ''}
201
- </div>
202
- </th>
203
- ))}
204
- </tr>
205
- ))}
206
- </thead>
207
- <tbody>
208
- {table.getRowModel().rows.map((row) => (
209
- <tr key={row.id}>
210
- {row.getVisibleCells().map((cell) => (
211
- <td key={cell.id}>
212
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
213
- </td>
214
- ))}
215
- </tr>
216
- ))}
217
- </tbody>
218
- </table>
219
- </div>
220
-
221
- {/* Paginación */}
222
- <div className="flex items-center justify-between">
223
- <span className="text-sm text-base-content/60">
224
- Mostrando {table.getState().pagination.pageIndex * table.getState().pagination.pageSize + 1} a{' '}
225
- {Math.min(
226
- (table.getState().pagination.pageIndex + 1) * table.getState().pagination.pageSize,
227
- table.getFilteredRowModel().rows.length,
228
- )}{' '}
229
- de {table.getFilteredRowModel().rows.length} registros
230
- </span>
231
- <div className="join">
232
- <button
233
- className="join-item btn btn-sm"
234
- onClick={() => table.previousPage()}
235
- disabled={!table.getCanPreviousPage()}
236
- >
237
- Anterior
238
- </button>
239
- <button className="join-item btn btn-sm">
240
- Página {table.getState().pagination.pageIndex + 1} de {table.getPageCount()}
241
- </button>
242
- <button
243
- className="join-item btn btn-sm"
244
- onClick={() => table.nextPage()}
245
- disabled={!table.getCanNextPage()}
246
- >
247
- Siguiente
248
- </button>
249
- </div>
250
- </div>
251
- </div>
252
- );
253
- };
254
- ```
255
-
256
- ---
257
-
258
- ## Barrel export (`index.ts`)
259
-
260
- ```typescript
261
- export { {Name}Table } from './{Name}Table';
262
- ```
263
-
264
- ---
265
-
266
- ## Mensajes finales obligatorios
267
-
268
- Al finalizar, mostrar:
269
-
270
- * Lista de archivos creados
271
- * Ejemplo de uso:
272
-
273
- ```tsx
274
- const { data, isLoading } = use{Name}List();
275
-
276
- <{Name}Table
277
- data={data ?? []}
278
- isLoading={isLoading}
279
- onView={(id) => navigate({ to: '/{name}s/$id', params: { id: String(id) } })}
280
- onEdit={(id) => navigate({ to: '/{name}s/$id/edit', params: { id: String(id) } })}
281
- onDelete={(id) => deleteMutation.mutate(id)}
282
- />
283
- ```
284
-
285
- * Recordar crear los tipos en `src/types/` si no existen
286
- * Recordar crear el hook de query con `/new-query` si no existe
287
-
288
- ---
289
-
290
- ## Criterios de calidad
291
-
292
- * TanStack Table con tipado estricto
293
- * Columnas separadas del componente
294
- * Sorting, filtering y paginación funcionales
295
- * Tailwind CSS + DaisyUI/Shadcn
296
- * Loading states
297
- * Cumple ESLint y Prettier del proyecto
298
-
299
- Este command debe **crear tablas de datos profesionales con sorting, filtering y paginación listas para usar**.
@@ -1,117 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
-
4
- interface StopPayload {
5
- status: "completed" | "aborted" | "error";
6
- loop_count: number;
7
- workspace_roots: string[];
8
- [key: string]: unknown;
9
- }
10
-
11
- interface PendingTest {
12
- source: string;
13
- test: string;
14
- type: string;
15
- name: string;
16
- }
17
-
18
- interface PendingTestsFile {
19
- timestamp: string;
20
- pending: PendingTest[];
21
- }
22
-
23
- function readStdin(): Promise<string> {
24
- return new Promise((resolve) => {
25
- let data = "";
26
- process.stdin.setEncoding("utf8");
27
- process.stdin.on("data", (chunk: string) => {
28
- data += chunk;
29
- });
30
- process.stdin.on("end", () => resolve(data));
31
- process.stdin.on("error", () => resolve(""));
32
- });
33
- }
34
-
35
- function respond(output: Record<string, unknown>): void {
36
- process.stdout.write(JSON.stringify(output) + "\n");
37
- }
38
-
39
- async function main(): Promise<void> {
40
- try {
41
- const raw = await readStdin();
42
- if (!raw?.trim()) {
43
- respond({});
44
- return;
45
- }
46
-
47
- const payload = JSON.parse(raw.replace(/^\uFEFF/, "").trim()) as StopPayload;
48
- const { status, loop_count, workspace_roots } = payload;
49
-
50
- if (status !== "completed" || loop_count > 0) {
51
- respond({});
52
- return;
53
- }
54
-
55
- const root = workspace_roots?.[0]
56
- ? path.resolve(workspace_roots[0])
57
- : (process.env.CURSOR_PROJECT_DIR ?? process.cwd());
58
-
59
- const pendingPath = path.join(root, ".cursor", "hooks", ".pending-tests.json");
60
-
61
- if (!fs.existsSync(pendingPath)) {
62
- respond({});
63
- return;
64
- }
65
-
66
- let data: PendingTestsFile;
67
- try {
68
- data = JSON.parse(fs.readFileSync(pendingPath, "utf8")) as PendingTestsFile;
69
- } catch {
70
- fs.unlinkSync(pendingPath);
71
- respond({});
72
- return;
73
- }
74
-
75
- if (!data.pending || data.pending.length === 0) {
76
- fs.unlinkSync(pendingPath);
77
- respond({});
78
- return;
79
- }
80
-
81
- const fileList = data.pending
82
- .map((p) => `- ${p.source} → ${p.test} (${p.type}: ${p.name})`)
83
- .join("\n");
84
-
85
- fs.unlinkSync(pendingPath);
86
-
87
- const followup = [
88
- "Se crearon scaffolds de tests para los siguientes archivos:",
89
- "",
90
- fileList,
91
- "",
92
- "Por favor, usá el subagente `qa-test-expert.agent` (con readonly: false) para escribir tests completos y exhaustivos para cada archivo listado.",
93
- "",
94
- "Instrucciones para el subagente QA:",
95
- "1. Leer el archivo fuente y entender su API/props/comportamiento",
96
- "2. Consultar los skills `.cursor/skills/vitest`, `.cursor/skills/testing-library` y `.cursor/skills/testing-patterns`",
97
- "3. Reemplazar el scaffold básico con tests reales que cubran: happy path, edge cases, errores, accesibilidad",
98
- "4. Usar `screen.getByRole` y `userEvent` (no fireEvent)",
99
- "5. Usar nombres descriptivos en español para describe/it",
100
- "6. Para componentes con TanStack Query, wrappear con QueryClientProvider",
101
- "7. Para componentes con TanStack Router Link, mockear el router",
102
- "8. Objetivo: 90% de coverage por archivo",
103
- "9. Ejecutar `pnpm vitest run --reporter=verbose` al final para verificar que los tests pasen",
104
- ].join("\n");
105
-
106
- respond({ followup_message: followup });
107
-
108
- console.error(
109
- `[autoTestOnStop] Triggering QA agent for ${data.pending.length} pending test(s)`
110
- );
111
- } catch (err) {
112
- console.error("[autoTestOnStop] Error:", err instanceof Error ? err.message : String(err));
113
- respond({});
114
- }
115
- }
116
-
117
- main();