create-projx 1.6.2 → 1.6.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.
@@ -27,95 +27,95 @@ if [ -n "$STAGED_ENV_FILES" ]; then
27
27
  fi
28
28
 
29
29
  STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR)
30
- <% if (components.includes('fastapi')) { %>
30
+ <% for (const inst of fastapiInstances) { %>
31
31
 
32
- <%= pathsUpper.fastapi %>_PY=$(echo "$STAGED_FILES" | grep '^<%= paths.fastapi %>/.*\.py$' || true)
33
- if [ -n "$<%= pathsUpper.fastapi %>_PY" ]; then
34
- echo "Running quality gates for <%= paths.fastapi %>..."
35
- cd <%= paths.fastapi %>
36
- echo "$<%= pathsUpper.fastapi %>_PY" | sed 's|^<%= paths.fastapi %>/||' | xargs uv run ruff format
37
- echo "$<%= pathsUpper.fastapi %>_PY" | sed 's|^<%= paths.fastapi %>/||' | xargs uv run ruff check --fix
32
+ <%= inst.upper %>_PY=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.py$' || true)
33
+ if [ -n "$<%= inst.upper %>_PY" ]; then
34
+ echo "Running quality gates for <%= inst.path %>..."
35
+ cd <%= inst.path %>
36
+ echo "$<%= inst.upper %>_PY" | sed 's|^<%= inst.path %>/||' | xargs uv run ruff format
37
+ echo "$<%= inst.upper %>_PY" | sed 's|^<%= inst.path %>/||' | xargs uv run ruff check --fix
38
38
  uv run mypy
39
39
  cd ..
40
- echo "$<%= pathsUpper.fastapi %>_PY" | xargs git add
40
+ echo "$<%= inst.upper %>_PY" | xargs git add
41
41
  fi
42
42
  <% } %>
43
- <% if (components.includes('fastify')) { %>
43
+ <% for (const inst of fastifyInstances) { %>
44
44
 
45
- <%= pathsUpper.fastify %>_TS=$(echo "$STAGED_FILES" | grep '^<%= paths.fastify %>/.*\.ts$' || true)
46
- <%= pathsUpper.fastify %>_ALL=$(echo "$STAGED_FILES" | grep '^<%= paths.fastify %>/' || true)
47
- if [ -n "$<%= pathsUpper.fastify %>_ALL" ]; then
48
- echo "Formatting <%= paths.fastify %>..."
49
- cd <%= paths.fastify %>
50
- echo "$<%= pathsUpper.fastify %>_ALL" | sed 's|^<%= paths.fastify %>/||' | xargs <%= pm.exec %> prettier --write --ignore-unknown
51
- if [ -n "$<%= pathsUpper.fastify %>_TS" ]; then
52
- echo "$<%= pathsUpper.fastify %>_TS" | sed 's|^<%= paths.fastify %>/||' | xargs <%= pm.exec %> eslint --fix
45
+ <%= inst.upper %>_TS=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.ts$' || true)
46
+ <%= inst.upper %>_ALL=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/' || true)
47
+ if [ -n "$<%= inst.upper %>_ALL" ]; then
48
+ echo "Formatting <%= inst.path %>..."
49
+ cd <%= inst.path %>
50
+ echo "$<%= inst.upper %>_ALL" | sed 's|^<%= inst.path %>/||' | xargs <%= pm.exec %> prettier --write --ignore-unknown
51
+ if [ -n "$<%= inst.upper %>_TS" ]; then
52
+ echo "$<%= inst.upper %>_TS" | sed 's|^<%= inst.path %>/||' | xargs <%= pm.exec %> eslint --fix
53
53
  <%= pm.exec %> tsc --noEmit
54
54
  fi
55
55
  cd ..
56
- echo "$<%= pathsUpper.fastify %>_ALL" | xargs git add
56
+ echo "$<%= inst.upper %>_ALL" | xargs git add
57
57
  fi
58
58
  <% } %>
59
- <% if (components.includes('frontend')) { %>
59
+ <% for (const inst of frontendInstances) { %>
60
60
 
61
- <%= pathsUpper.frontend %>_TS=$(echo "$STAGED_FILES" | grep '^<%= paths.frontend %>/.*\.tsx\?$' || true)
62
- <%= pathsUpper.frontend %>_ALL=$(echo "$STAGED_FILES" | grep '^<%= paths.frontend %>/' || true)
63
- if [ -n "$<%= pathsUpper.frontend %>_ALL" ]; then
64
- echo "Formatting <%= paths.frontend %>..."
65
- cd <%= paths.frontend %>
66
- echo "$<%= pathsUpper.frontend %>_ALL" | sed 's|^<%= paths.frontend %>/||' | xargs <%= pm.exec %> prettier --write --ignore-unknown
67
- if [ -n "$<%= pathsUpper.frontend %>_TS" ]; then
68
- echo "$<%= pathsUpper.frontend %>_TS" | sed 's|^<%= paths.frontend %>/||' | xargs <%= pm.exec %> eslint --fix
61
+ <%= inst.upper %>_TS=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.tsx\?$' || true)
62
+ <%= inst.upper %>_ALL=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/' || true)
63
+ if [ -n "$<%= inst.upper %>_ALL" ]; then
64
+ echo "Formatting <%= inst.path %>..."
65
+ cd <%= inst.path %>
66
+ echo "$<%= inst.upper %>_ALL" | sed 's|^<%= inst.path %>/||' | xargs <%= pm.exec %> prettier --write --ignore-unknown
67
+ if [ -n "$<%= inst.upper %>_TS" ]; then
68
+ echo "$<%= inst.upper %>_TS" | sed 's|^<%= inst.path %>/||' | xargs <%= pm.exec %> eslint --fix
69
69
  <%= pm.exec %> tsc --noEmit
70
70
  fi
71
71
  cd ..
72
- echo "$<%= pathsUpper.frontend %>_ALL" | xargs git add
72
+ echo "$<%= inst.upper %>_ALL" | xargs git add
73
73
  fi
74
74
  <% } %>
75
- <% if (components.includes('e2e')) { %>
75
+ <% for (const inst of e2eInstances) { %>
76
76
 
77
- <%= pathsUpper.e2e %>_TS=$(echo "$STAGED_FILES" | grep '^<%= paths.e2e %>/.*\.ts$' || true)
78
- <%= pathsUpper.e2e %>_ALL=$(echo "$STAGED_FILES" | grep '^<%= paths.e2e %>/' || true)
79
- if [ -n "$<%= pathsUpper.e2e %>_ALL" ]; then
80
- echo "Formatting <%= paths.e2e %>..."
81
- cd <%= paths.e2e %>
82
- echo "$<%= pathsUpper.e2e %>_ALL" | sed 's|^<%= paths.e2e %>/||' | xargs <%= pm.exec %> prettier --write --ignore-unknown
83
- if [ -n "$<%= pathsUpper.e2e %>_TS" ]; then
84
- echo "$<%= pathsUpper.e2e %>_TS" | sed 's|^<%= paths.e2e %>/||' | xargs <%= pm.exec %> eslint --fix
77
+ <%= inst.upper %>_TS=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.ts$' || true)
78
+ <%= inst.upper %>_ALL=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/' || true)
79
+ if [ -n "$<%= inst.upper %>_ALL" ]; then
80
+ echo "Formatting <%= inst.path %>..."
81
+ cd <%= inst.path %>
82
+ echo "$<%= inst.upper %>_ALL" | sed 's|^<%= inst.path %>/||' | xargs <%= pm.exec %> prettier --write --ignore-unknown
83
+ if [ -n "$<%= inst.upper %>_TS" ]; then
84
+ echo "$<%= inst.upper %>_TS" | sed 's|^<%= inst.path %>/||' | xargs <%= pm.exec %> eslint --fix
85
85
  <%= pm.exec %> tsc --noEmit
86
86
  fi
87
87
  cd ..
88
- echo "$<%= pathsUpper.e2e %>_ALL" | xargs git add
88
+ echo "$<%= inst.upper %>_ALL" | xargs git add
89
89
  fi
90
90
  <% } %>
91
- <% if (components.includes('mobile')) { %>
91
+ <% for (const inst of mobileInstances) { %>
92
92
 
93
- <%= pathsUpper.mobile %>_DART=$(echo "$STAGED_FILES" | grep '^<%= paths.mobile %>/.*\.dart$' || true)
94
- if [ -n "$<%= pathsUpper.mobile %>_DART" ]; then
93
+ <%= inst.upper %>_DART=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.dart$' || true)
94
+ if [ -n "$<%= inst.upper %>_DART" ]; then
95
95
  if command -v dart &> /dev/null; then
96
- echo "Formatting <%= paths.mobile %>..."
97
- cd <%= paths.mobile %>
98
- echo "$<%= pathsUpper.mobile %>_DART" | sed 's|^<%= paths.mobile %>/||' | xargs dart format
96
+ echo "Formatting <%= inst.path %>..."
97
+ cd <%= inst.path %>
98
+ echo "$<%= inst.upper %>_DART" | sed 's|^<%= inst.path %>/||' | xargs dart format
99
99
  if command -v flutter &> /dev/null; then
100
100
  dart analyze --fatal-infos
101
101
  fi
102
102
  cd ..
103
- echo "$<%= pathsUpper.mobile %>_DART" | xargs git add
103
+ echo "$<%= inst.upper %>_DART" | xargs git add
104
104
  else
105
105
  echo "Skipping mobile lint (dart not installed)"
106
106
  fi
107
107
  fi
108
108
  <% } %>
109
- <% if (components.includes('infra')) { %>
109
+ <% for (const inst of infraInstances) { %>
110
110
 
111
- <%= pathsUpper.infra %>_TF=$(echo "$STAGED_FILES" | grep '^<%= paths.infra %>/.*\.tf$' || true)
112
- if [ -n "$<%= pathsUpper.infra %>_TF" ]; then
111
+ <%= inst.upper %>_TF=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.tf$' || true)
112
+ if [ -n "$<%= inst.upper %>_TF" ]; then
113
113
  if command -v terraform &> /dev/null; then
114
- echo "Formatting <%= paths.infra %>..."
115
- cd <%= paths.infra %>/stack
116
- echo "$<%= pathsUpper.infra %>_TF" | sed 's|^<%= paths.infra %>/stack/||' | xargs terraform fmt
114
+ echo "Formatting <%= inst.path %>..."
115
+ cd <%= inst.path %>/stack
116
+ echo "$<%= inst.upper %>_TF" | sed 's|^<%= inst.path %>/stack/||' | xargs terraform fmt
117
117
  cd ../..
118
- echo "$<%= pathsUpper.infra %>_TF" | xargs git add
118
+ echo "$<%= inst.upper %>_TF" | xargs git add
119
119
  else
120
120
  echo "Skipping infra lint (terraform not installed)"
121
121
  fi
@@ -3,33 +3,33 @@ set -e
3
3
 
4
4
  git config core.hooksPath .githooks
5
5
  echo "Git hooks configured."
6
- <% if (components.includes('fastapi')) { %>
6
+ <% for (const inst of fastapiInstances) { %>
7
7
 
8
- cd <%= paths.fastapi %> && uv sync --all-extras && cd ..
9
- echo "<%= displayNames.fastapi %> dependencies installed."
8
+ cd <%= inst.path %> && uv sync --all-extras && cd ..
9
+ echo "<%= inst.display %> dependencies installed."
10
10
  <% } %>
11
- <% if (components.includes('fastify')) { %>
11
+ <% for (const inst of fastifyInstances) { %>
12
12
 
13
- cd <%= paths.fastify %> && <%= pm.ci %> && cd ..
14
- echo "<%= displayNames.fastify %> dependencies installed."
13
+ cd <%= inst.path %> && <%= pm.ci %> && cd ..
14
+ echo "<%= inst.display %> dependencies installed."
15
15
  <% } %>
16
- <% if (components.includes('frontend')) { %>
16
+ <% for (const inst of frontendInstances) { %>
17
17
 
18
- cd <%= paths.frontend %> && <%= pm.ci %> && cd ..
19
- echo "<%= displayNames.frontend %> dependencies installed."
18
+ cd <%= inst.path %> && <%= pm.ci %> && cd ..
19
+ echo "<%= inst.display %> dependencies installed."
20
20
  <% } %>
21
- <% if (components.includes('e2e')) { %>
21
+ <% for (const inst of e2eInstances) { %>
22
22
 
23
- cd <%= paths.e2e %> && <%= pm.ci %> && cd ..
24
- echo "<%= displayNames.e2e %> dependencies installed."
23
+ cd <%= inst.path %> && <%= pm.ci %> && cd ..
24
+ echo "<%= inst.display %> dependencies installed."
25
25
  <% } %>
26
- <% if (components.includes('mobile')) { %>
26
+ <% for (const inst of mobileInstances) { %>
27
27
 
28
28
  if command -v flutter &>/dev/null; then
29
- cd <%= paths.mobile %> && flutter pub get && cd ..
30
- echo "<%= displayNames.mobile %> dependencies installed."
29
+ cd <%= inst.path %> && flutter pub get && cd ..
30
+ echo "<%= inst.display %> dependencies installed."
31
31
  else
32
- echo "<%= displayNames.mobile %> skipped (SDK not installed)."
32
+ echo "<%= inst.display %> skipped (SDK not installed)."
33
33
  fi
34
34
  <% } %>
35
35