blacksmith-cli 0.1.3 → 0.1.5

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 (27) hide show
  1. package/dist/index.js +22 -9
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/src/templates/backend/utils/__init__.py.hbs +0 -0
  5. package/src/templates/backend/utils/models.py.hbs +11 -0
  6. package/src/templates/frontend/src/pages/home/home.tsx.hbs +93 -11
  7. package/src/templates/resource/api-hooks/index.ts.hbs +2 -0
  8. package/src/templates/resource/{frontend/hooks → api-hooks}/use-{{kebabs}}-query.ts.hbs +10 -2
  9. package/src/templates/resource/{frontend/hooks → api-hooks}/use-{{kebab}}-mutations.ts.hbs +1 -1
  10. package/src/templates/resource/backend/models.py.hbs +2 -3
  11. package/src/templates/resource/frontend/components/{{kebab}}-card.tsx.hbs +1 -1
  12. package/src/templates/resource/frontend/components/{{kebab}}-list.tsx.hbs +1 -1
  13. package/src/templates/resource/frontend/index.ts.hbs +1 -2
  14. package/src/templates/resource/frontend/pages/{{kebabs}}-page.tsx.hbs +1 -1
  15. package/src/templates/resource/frontend/pages/{{kebab}}-detail-page.tsx.hbs +3 -11
  16. package/src/templates/resource/pages/components/{{kebab}}-card.tsx.hbs +1 -1
  17. package/src/templates/resource/pages/components/{{kebab}}-list.tsx.hbs +1 -1
  18. package/src/templates/resource/pages/hooks/index.ts.hbs +9 -0
  19. package/src/templates/resource/pages/index.ts.hbs +1 -2
  20. package/src/templates/resource/pages/{{kebabs}}-page.tsx.hbs +1 -1
  21. package/src/templates/resource/pages/{{kebab}}-detail-page.tsx.hbs +3 -11
  22. package/src/templates/frontend/src/pages/home/components/features-grid.tsx.hbs +0 -88
  23. package/src/templates/frontend/src/pages/home/components/getting-started.tsx.hbs +0 -88
  24. package/src/templates/frontend/src/pages/home/components/hero-section.tsx.hbs +0 -47
  25. package/src/templates/frontend/src/pages/home/components/resources-section.tsx.hbs +0 -34
  26. package/src/templates/resource/pages/hooks/use-{{kebabs}}-query.ts.hbs +0 -35
  27. package/src/templates/resource/pages/hooks/use-{{kebab}}-mutations.ts.hbs +0 -39
@@ -1,39 +0,0 @@
1
- /**
2
- * {{Name}} Mutation Hooks
3
- *
4
- * Create, update, and delete with cache invalidation and error parsing.
5
- * Generated by Blacksmith. You own this file — customize as needed.
6
- */
7
-
8
- import { useApiMutation } from '@/shared/hooks/use-api-mutation'
9
- import {
10
- {{snakes}}CreateMutation,
11
- {{snakes}}UpdateMutation,
12
- {{snakes}}DestroyMutation,
13
- {{snakes}}ListQueryKey,
14
- {{snakes}}RetrieveQueryKey,
15
- } from '@/api/generated/@tanstack/react-query.gen'
16
-
17
- export function useCreate{{Name}}() {
18
- return useApiMutation({
19
- ...{{snakes}}CreateMutation(),
20
- invalidateKeys: [{{snakes}}ListQueryKey()],
21
- })
22
- }
23
-
24
- export function useUpdate{{Name}}(id: number) {
25
- return useApiMutation({
26
- ...{{snakes}}UpdateMutation(),
27
- invalidateKeys: [
28
- {{snakes}}ListQueryKey(),
29
- {{snakes}}RetrieveQueryKey({ path: { id } }),
30
- ],
31
- })
32
- }
33
-
34
- export function useDelete{{Name}}() {
35
- return useApiMutation({
36
- ...{{snakes}}DestroyMutation(),
37
- invalidateKeys: [{{snakes}}ListQueryKey()],
38
- })
39
- }