@kleber.mottajr/juninho 1.1.0 → 1.2.0

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 (49) hide show
  1. package/README.md +112 -13
  2. package/dist/cli.js +40 -23
  3. package/dist/cli.js.map +1 -1
  4. package/dist/config.d.ts +5 -0
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/config.js +7 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/installer.d.ts +2 -0
  9. package/dist/installer.d.ts.map +1 -1
  10. package/dist/installer.js +178 -54
  11. package/dist/installer.js.map +1 -1
  12. package/dist/lint-detection.d.ts +26 -0
  13. package/dist/lint-detection.d.ts.map +1 -0
  14. package/dist/lint-detection.js +200 -0
  15. package/dist/lint-detection.js.map +1 -0
  16. package/dist/models.js +4 -4
  17. package/dist/models.js.map +1 -1
  18. package/dist/project-types.d.ts +47 -0
  19. package/dist/project-types.d.ts.map +1 -0
  20. package/dist/project-types.js +251 -0
  21. package/dist/project-types.js.map +1 -0
  22. package/dist/templates/agents.d.ts +2 -1
  23. package/dist/templates/agents.d.ts.map +1 -1
  24. package/dist/templates/agents.js +7 -5
  25. package/dist/templates/agents.js.map +1 -1
  26. package/dist/templates/commands.d.ts.map +1 -1
  27. package/dist/templates/commands.js +225 -150
  28. package/dist/templates/commands.js.map +1 -1
  29. package/dist/templates/docs.d.ts +2 -1
  30. package/dist/templates/docs.d.ts.map +1 -1
  31. package/dist/templates/docs.js +61 -14
  32. package/dist/templates/docs.js.map +1 -1
  33. package/dist/templates/plugins.d.ts +2 -1
  34. package/dist/templates/plugins.d.ts.map +1 -1
  35. package/dist/templates/plugins.js +167 -102
  36. package/dist/templates/plugins.js.map +1 -1
  37. package/dist/templates/skills.d.ts +2 -1
  38. package/dist/templates/skills.d.ts.map +1 -1
  39. package/dist/templates/skills.js +708 -195
  40. package/dist/templates/skills.js.map +1 -1
  41. package/dist/templates/support-scripts.d.ts +2 -1
  42. package/dist/templates/support-scripts.d.ts.map +1 -1
  43. package/dist/templates/support-scripts.js +468 -21
  44. package/dist/templates/support-scripts.js.map +1 -1
  45. package/dist/templates/tools.d.ts +2 -1
  46. package/dist/templates/tools.d.ts.map +1 -1
  47. package/dist/templates/tools.js +315 -74
  48. package/dist/templates/tools.js.map +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/templates/skills.ts"],"names":[],"mappings":";;;;;AAGA,kCAYC;AAfD,2BAAkC;AAClC,gDAAuB;AAEvB,SAAgB,WAAW,CAAC,UAAkB;IAC5C,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAA;IAE9D,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,YAAY,CAAC,CAAA;IAC/E,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,CAAC,EAAE,aAAa,CAAC,CAAA;IACjF,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAA;IAC3F,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,0BAA0B,EAAE,UAAU,CAAC,EAAE,sBAAsB,CAAC,CAAA;IACnG,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,EAAE,UAAU,CAAC,EAAE,gBAAgB,CAAC,CAAA;IACvF,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,EAAE,UAAU,CAAC,EAAE,iBAAiB,CAAC,CAAA;IACzF,IAAA,kBAAa,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAsB,EAAE,UAAU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AAA"}
@@ -1,2 +1,3 @@
1
- export declare function writeSupportScripts(projectDir: string): void;
1
+ import type { ProjectType } from "../project-types.js";
2
+ export declare function writeSupportScripts(projectDir: string, projectType?: ProjectType, isKotlin?: boolean, lintTool?: string): void;
2
3
  //# sourceMappingURL=support-scripts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"support-scripts.d.ts","sourceRoot":"","sources":["../../src/templates/support-scripts.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAO5D"}
1
+ {"version":3,"file":"support-scripts.d.ts","sourceRoot":"","sources":["../../src/templates/support-scripts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,WAA2B,EACxC,QAAQ,GAAE,OAAe,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI,CAON"}
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.writeSupportScripts = writeSupportScripts;
7
7
  const fs_1 = require("fs");
8
8
  const path_1 = __importDefault(require("path"));
9
- function writeSupportScripts(projectDir) {
9
+ function writeSupportScripts(projectDir, projectType = "node-nextjs", isKotlin = false, lintTool) {
10
10
  const scriptsDir = path_1.default.join(projectDir, ".opencode", "scripts");
11
11
  writeExecutable(path_1.default.join(scriptsDir, "pre-commit.sh"), PRE_COMMIT);
12
- writeExecutable(path_1.default.join(scriptsDir, "lint-structure.sh"), LINT_STRUCTURE);
13
- writeExecutable(path_1.default.join(scriptsDir, "test-related.sh"), TEST_RELATED);
14
- writeExecutable(path_1.default.join(scriptsDir, "check-all.sh"), CHECK_ALL);
12
+ writeExecutable(path_1.default.join(scriptsDir, "lint-structure.sh"), lintStructure(projectType, isKotlin, lintTool));
13
+ writeExecutable(path_1.default.join(scriptsDir, "test-related.sh"), testRelated(projectType, isKotlin));
14
+ writeExecutable(path_1.default.join(scriptsDir, "check-all.sh"), checkAll(projectType, isKotlin, lintTool));
15
15
  }
16
16
  function writeExecutable(filePath, content) {
17
17
  (0, fs_1.writeFileSync)(filePath, content);
@@ -44,19 +44,16 @@ echo "[juninho:pre-commit] Running related tests..."
44
44
 
45
45
  echo "[juninho:pre-commit] Local checks passed"
46
46
  `;
47
- const LINT_STRUCTURE = `#!/bin/sh
47
+ /* ─── Lint Structure ─── */
48
+ function lintStructure(projectType, isKotlin, lintTool) {
49
+ const header = `#!/bin/sh
48
50
  set -e
49
51
 
50
52
  ROOT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
51
53
  cd "$ROOT_DIR"
52
54
 
53
55
  staged_files_as_args() {
54
- printf '%s\n' "$JUNINHO_STAGED_FILES" | sed '/^$/d' | tr '\n' ' '
55
- }
56
-
57
- has_package_script() {
58
- [ -f package.json ] || return 1
59
- node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); process.exit(pkg.scripts && pkg.scripts[process.argv[1]] ? 0 : 1)" "$1" >/dev/null 2>&1
56
+ printf '%s\\n' "$JUNINHO_STAGED_FILES" | sed '/^$/d' | tr '\\n' ' '
60
57
  }
61
58
 
62
59
  FILES="$(staged_files_as_args)"
@@ -65,6 +62,31 @@ if [ -z "$FILES" ]; then
65
62
  echo "[juninho:lint-structure] No staged files. Skipping."
66
63
  exit 0
67
64
  fi
65
+ `;
66
+ switch (projectType) {
67
+ case "node-nextjs":
68
+ case "node-generic":
69
+ return header + lintNodeBody(lintTool);
70
+ case "python":
71
+ return header + lintPythonBody(lintTool);
72
+ case "go":
73
+ return header + lintGoBody(lintTool);
74
+ case "java":
75
+ return isKotlin
76
+ ? header + lintKotlinBody(lintTool)
77
+ : header + lintJavaBody(lintTool);
78
+ case "generic":
79
+ return header + lintGenericBody();
80
+ }
81
+ }
82
+ function lintNodeBody(lintTool) {
83
+ const priority = lintTool
84
+ ? `# Priority linter: ${lintTool}\nif command -v npx >/dev/null 2>&1; then\n npx ${lintTool} $FILES\n exit 0\nfi\n\n`
85
+ : "";
86
+ return `${priority}has_package_script() {
87
+ [ -f package.json ] || return 1
88
+ node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); process.exit(pkg.scripts && pkg.scripts[process.argv[1]] ? 0 : 1)" "$1" >/dev/null 2>&1
89
+ }
68
90
 
69
91
  if has_package_script "lint:structure"; then
70
92
  npm run lint:structure -- $FILES
@@ -84,19 +106,131 @@ fi
84
106
  echo "[juninho:lint-structure] No structure lint configured."
85
107
  echo "[juninho:lint-structure] Customize .opencode/scripts/lint-structure.sh or run /j.init-deep."
86
108
  `;
87
- const TEST_RELATED = `#!/bin/sh
109
+ }
110
+ function lintPythonBody(lintTool) {
111
+ const priority = lintTool
112
+ ? `# Priority linter: ${lintTool}\nif command -v ${lintTool} >/dev/null 2>&1; then\n ${lintTool} check $FILES\n exit 0\nfi\n\n`
113
+ : "";
114
+ return `${priority}# Python lint chain: ruff → flake8 → pylint
115
+ if command -v ruff >/dev/null 2>&1; then
116
+ ruff check $FILES
117
+ exit 0
118
+ fi
119
+
120
+ if command -v flake8 >/dev/null 2>&1; then
121
+ flake8 $FILES
122
+ exit 0
123
+ fi
124
+
125
+ if command -v pylint >/dev/null 2>&1; then
126
+ pylint $FILES
127
+ exit 0
128
+ fi
129
+
130
+ echo "[juninho:lint-structure] No Python linter found. Install ruff, flake8, or pylint."
131
+ `;
132
+ }
133
+ function lintGoBody(lintTool) {
134
+ const priority = lintTool
135
+ ? `# Priority linter: ${lintTool}\nif command -v ${lintTool} >/dev/null 2>&1; then\n ${lintTool} run\n exit 0\nfi\n\n`
136
+ : "";
137
+ return `${priority}# Go lint chain: golangci-lint → go vet
138
+ if command -v golangci-lint >/dev/null 2>&1; then
139
+ golangci-lint run
140
+ exit 0
141
+ fi
142
+
143
+ go vet ./...
144
+ `;
145
+ }
146
+ function lintJavaBody(lintTool) {
147
+ const priority = lintTool
148
+ ? `# Priority linter: ${lintTool}\n`
149
+ : "";
150
+ return `${priority}# Java lint chain: gradle checkstyle → maven checkstyle
151
+ if [ -x "./gradlew" ]; then
152
+ ./gradlew checkstyleMain 2>/dev/null && exit 0
153
+ echo "[juninho:lint-structure] Gradle checkstyle not configured. Add checkstyle plugin to build.gradle."
154
+ exit 0
155
+ fi
156
+
157
+ if [ -x "./mvnw" ]; then
158
+ ./mvnw checkstyle:check 2>/dev/null && exit 0
159
+ echo "[juninho:lint-structure] Maven checkstyle not configured. Add checkstyle plugin to pom.xml."
160
+ exit 0
161
+ fi
162
+
163
+ echo "[juninho:lint-structure] No Java build tool found."
164
+ `;
165
+ }
166
+ function lintKotlinBody(lintTool) {
167
+ const priority = lintTool
168
+ ? `# Priority linter: ${lintTool}\n`
169
+ : "";
170
+ return `${priority}# Kotlin lint chain: ktlint → detekt → compileKotlin warnings
171
+ if [ -x "./gradlew" ]; then
172
+ # Try ktlint first (most common for Kotlin formatting/style)
173
+ if ./gradlew tasks --all 2>/dev/null | grep -q "ktlintCheck"; then
174
+ ./gradlew ktlintCheck
175
+ exit 0
176
+ fi
177
+
178
+ # Try detekt (static analysis)
179
+ if ./gradlew tasks --all 2>/dev/null | grep -q "detekt"; then
180
+ ./gradlew detekt
181
+ exit 0
182
+ fi
183
+
184
+ # Fallback: compile with warnings treated as errors
185
+ ./gradlew compileKotlin 2>&1
186
+ exit 0
187
+ fi
188
+
189
+ if [ -x "./mvnw" ]; then
190
+ # Maven ktlint plugin
191
+ ./mvnw antrun:run@ktlint-check 2>/dev/null && exit 0
192
+ # Fallback to compile
193
+ ./mvnw compile 2>&1
194
+ exit 0
195
+ fi
196
+
197
+ echo "[juninho:lint-structure] No Kotlin build tool found."
198
+ echo "[juninho:lint-structure] Add ktlint or detekt Gradle plugin for structural linting."
199
+ `;
200
+ }
201
+ function lintGenericBody() {
202
+ return `# Generic: try common linters across stacks
203
+ if [ -f package.json ]; then
204
+ if command -v npx >/dev/null 2>&1; then
205
+ npx eslint --max-warnings=0 $FILES 2>/dev/null && exit 0
206
+ fi
207
+ fi
208
+
209
+ if command -v ruff >/dev/null 2>&1; then
210
+ ruff check $FILES 2>/dev/null && exit 0
211
+ fi
212
+
213
+ if command -v golangci-lint >/dev/null 2>&1; then
214
+ golangci-lint run 2>/dev/null && exit 0
215
+ fi
216
+
217
+ if [ -x "./gradlew" ]; then
218
+ ./gradlew check 2>/dev/null && exit 0
219
+ fi
220
+
221
+ echo "[juninho:lint-structure] No linter detected. Customize .opencode/scripts/lint-structure.sh."
222
+ `;
223
+ }
224
+ /* ─── Test Related ─── */
225
+ function testRelated(projectType, isKotlin) {
226
+ const header = `#!/bin/sh
88
227
  set -e
89
228
 
90
229
  ROOT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
91
230
  cd "$ROOT_DIR"
92
231
 
93
232
  staged_files_as_args() {
94
- printf '%s\n' "$JUNINHO_STAGED_FILES" | sed '/^$/d' | tr '\n' ' '
95
- }
96
-
97
- has_package_script() {
98
- [ -f package.json ] || return 1
99
- node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); process.exit(pkg.scripts && pkg.scripts[process.argv[1]] ? 0 : 1)" "$1" >/dev/null 2>&1
233
+ printf '%s\\n' "$JUNINHO_STAGED_FILES" | sed '/^$/d' | tr '\\n' ' '
100
234
  }
101
235
 
102
236
  FILES="$(staged_files_as_args)"
@@ -105,6 +239,28 @@ if [ -z "$FILES" ]; then
105
239
  echo "[juninho:test-related] No staged files. Skipping."
106
240
  exit 0
107
241
  fi
242
+ `;
243
+ switch (projectType) {
244
+ case "node-nextjs":
245
+ case "node-generic":
246
+ return header + testNodeBody();
247
+ case "python":
248
+ return header + testPythonBody();
249
+ case "go":
250
+ return header + testGoBody();
251
+ case "java":
252
+ return isKotlin
253
+ ? header + testKotlinBody()
254
+ : header + testJavaBody();
255
+ case "generic":
256
+ return header + testGenericBody();
257
+ }
258
+ }
259
+ function testNodeBody() {
260
+ return `has_package_script() {
261
+ [ -f package.json ] || return 1
262
+ node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); process.exit(pkg.scripts && pkg.scripts[process.argv[1]] ? 0 : 1)" "$1" >/dev/null 2>&1
263
+ }
108
264
 
109
265
  if has_package_script "test:related"; then
110
266
  npm run test:related -- $FILES
@@ -124,13 +280,211 @@ fi
124
280
  echo "[juninho:test-related] No related-test command configured."
125
281
  echo "[juninho:test-related] Customize .opencode/scripts/test-related.sh or run /j.init-deep."
126
282
  `;
127
- const CHECK_ALL = `#!/bin/sh
283
+ }
284
+ function testPythonBody() {
285
+ // Use string concatenation to avoid template literal escaping issues with shell variables
286
+ const lines = [
287
+ '# Python: run pytest scoped to staged files',
288
+ 'PY_FILES=""',
289
+ 'for f in $FILES; do',
290
+ ' case "$f" in *.py) PY_FILES="$PY_FILES $f" ;; esac',
291
+ 'done',
292
+ '',
293
+ 'if [ -z "$PY_FILES" ]; then',
294
+ ' echo "[juninho:test-related] No Python files staged. Skipping tests."',
295
+ ' exit 0',
296
+ 'fi',
297
+ '',
298
+ '# Derive test file paths from source files',
299
+ 'TEST_TARGETS=""',
300
+ 'for f in $PY_FILES; do',
301
+ ' dir=$(dirname "$f")',
302
+ ' base=$(basename "$f" .py)',
303
+ ' for candidate in "${dir}/test_${base}.py" "${dir}/${base}_test.py" "tests/test_${base}.py" "tests/${dir}/test_${base}.py"; do',
304
+ ' if [ -f "$candidate" ]; then',
305
+ ' TEST_TARGETS="$TEST_TARGETS $candidate"',
306
+ ' fi',
307
+ ' done',
308
+ 'done',
309
+ '',
310
+ 'if [ -n "$TEST_TARGETS" ]; then',
311
+ ' pytest $TEST_TARGETS --no-header -q 2>/dev/null && exit 0',
312
+ ' python -m pytest $TEST_TARGETS --no-header -q 2>/dev/null && exit 0',
313
+ 'fi',
314
+ '',
315
+ 'echo "[juninho:test-related] No related tests found for staged Python files."',
316
+ ];
317
+ return lines.join('\n') + '\n';
318
+ }
319
+ function testGoBody() {
320
+ return `# Go: run tests for packages containing staged files
321
+ GO_FILES=""
322
+ for f in $FILES; do
323
+ case "$f" in *.go) GO_FILES="$GO_FILES $f" ;; esac
324
+ done
325
+
326
+ if [ -z "$GO_FILES" ]; then
327
+ echo "[juninho:test-related] No Go files staged. Skipping tests."
328
+ exit 0
329
+ fi
330
+
331
+ # Extract unique package directories
332
+ PACKAGES=""
333
+ for f in $GO_FILES; do
334
+ pkg="./$(dirname "$f")"
335
+ case " $PACKAGES " in
336
+ *" $pkg "*) ;;
337
+ *) PACKAGES="$PACKAGES $pkg" ;;
338
+ esac
339
+ done
340
+
341
+ go test -count=1 $PACKAGES
342
+ `;
343
+ }
344
+ function testJavaBody() {
345
+ const lines = [
346
+ '# Java: run tests scoped to staged files',
347
+ 'JAVA_FILES=""',
348
+ 'for f in $FILES; do',
349
+ ' case "$f" in *.java) JAVA_FILES="$JAVA_FILES $f" ;; esac',
350
+ 'done',
351
+ '',
352
+ 'if [ -z "$JAVA_FILES" ]; then',
353
+ ' echo "[juninho:test-related] No Java files staged. Skipping tests."',
354
+ ' exit 0',
355
+ 'fi',
356
+ '',
357
+ '# Extract test class names from staged source files',
358
+ 'TEST_FILTER=""',
359
+ 'for f in $JAVA_FILES; do',
360
+ ' base=$(basename "$f" .java)',
361
+ ' case "$base" in *Test|*Tests|*IT)',
362
+ ' TEST_FILTER="$TEST_FILTER --tests *${base}"',
363
+ ' continue',
364
+ ' ;;',
365
+ ' esac',
366
+ ' TEST_FILTER="$TEST_FILTER --tests *${base}Test"',
367
+ 'done',
368
+ '',
369
+ 'if [ -x "./gradlew" ]; then',
370
+ ' ./gradlew test $TEST_FILTER 2>/dev/null || ./gradlew test',
371
+ ' exit 0',
372
+ 'fi',
373
+ '',
374
+ 'if [ -x "./mvnw" ]; then',
375
+ ' MAVEN_FILTER=""',
376
+ ' for f in $JAVA_FILES; do',
377
+ ' base=$(basename "$f" .java)',
378
+ ' MAVEN_FILTER="${MAVEN_FILTER},${base}Test"',
379
+ ' done',
380
+ ' MAVEN_FILTER=$(echo "$MAVEN_FILTER" | sed \'s/^,//\')',
381
+ ' ./mvnw test -Dtest="$MAVEN_FILTER" 2>/dev/null || ./mvnw test',
382
+ ' exit 0',
383
+ 'fi',
384
+ '',
385
+ 'echo "[juninho:test-related] No Java build tool found."',
386
+ ];
387
+ return lines.join('\n') + '\n';
388
+ }
389
+ function testKotlinBody() {
390
+ const lines = [
391
+ '# Kotlin: run tests scoped to staged files',
392
+ 'KT_FILES=""',
393
+ 'JAVA_FILES=""',
394
+ 'for f in $FILES; do',
395
+ ' case "$f" in',
396
+ ' *.kt|*.kts) KT_FILES="$KT_FILES $f" ;;',
397
+ ' *.java) JAVA_FILES="$JAVA_FILES $f" ;;',
398
+ ' esac',
399
+ 'done',
400
+ '',
401
+ 'ALL_FILES="$KT_FILES $JAVA_FILES"',
402
+ 'if [ -z "$(echo "$ALL_FILES" | tr -d \' \')" ]; then',
403
+ ' echo "[juninho:test-related] No Kotlin/Java files staged. Skipping tests."',
404
+ ' exit 0',
405
+ 'fi',
406
+ '',
407
+ '# Extract test class names from staged source files',
408
+ 'TEST_FILTER=""',
409
+ 'for f in $KT_FILES $JAVA_FILES; do',
410
+ ' ext="${f##*.}"',
411
+ ' base=$(basename "$f" ".$ext")',
412
+ ' case "$base" in *Test|*Tests|*IT|*Spec)',
413
+ ' TEST_FILTER="$TEST_FILTER --tests *${base}"',
414
+ ' continue',
415
+ ' ;;',
416
+ ' esac',
417
+ ' TEST_FILTER="$TEST_FILTER --tests *${base}Test"',
418
+ 'done',
419
+ '',
420
+ 'if [ -x "./gradlew" ]; then',
421
+ ' if [ -n "$TEST_FILTER" ]; then',
422
+ ' ./gradlew test $TEST_FILTER 2>/dev/null || ./gradlew test',
423
+ ' else',
424
+ ' ./gradlew test',
425
+ ' fi',
426
+ ' exit 0',
427
+ 'fi',
428
+ '',
429
+ 'if [ -x "./mvnw" ]; then',
430
+ ' ./mvnw test',
431
+ ' exit 0',
432
+ 'fi',
433
+ '',
434
+ 'echo "[juninho:test-related] No Kotlin build tool found."',
435
+ ];
436
+ return lines.join('\n') + '\n';
437
+ }
438
+ function testGenericBody() {
439
+ return `# Generic: try common test runners
440
+ if [ -f package.json ]; then
441
+ if command -v npx >/dev/null 2>&1; then
442
+ npx jest --findRelatedTests --passWithNoTests $FILES 2>/dev/null && exit 0
443
+ npx vitest related $FILES --run 2>/dev/null && exit 0
444
+ fi
445
+ fi
446
+
447
+ if command -v pytest >/dev/null 2>&1; then
448
+ pytest --no-header -q 2>/dev/null && exit 0
449
+ fi
450
+
451
+ if command -v go >/dev/null 2>&1 && [ -f go.mod ]; then
452
+ go test ./... 2>/dev/null && exit 0
453
+ fi
454
+
455
+ if [ -x "./gradlew" ]; then
456
+ ./gradlew test 2>/dev/null && exit 0
457
+ fi
458
+
459
+ echo "[juninho:test-related] No test runner detected. Customize .opencode/scripts/test-related.sh."
460
+ `;
461
+ }
462
+ /* ─── Check All ─── */
463
+ function checkAll(projectType, isKotlin, lintTool) {
464
+ const header = `#!/bin/sh
128
465
  set -e
129
466
 
130
467
  ROOT_DIR="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
131
468
  cd "$ROOT_DIR"
132
-
133
- has_package_script() {
469
+ `;
470
+ switch (projectType) {
471
+ case "node-nextjs":
472
+ case "node-generic":
473
+ return header + checkAllNodeBody();
474
+ case "python":
475
+ return header + checkAllPythonBody(lintTool);
476
+ case "go":
477
+ return header + checkAllGoBody(lintTool);
478
+ case "java":
479
+ return isKotlin
480
+ ? header + checkAllKotlinBody(lintTool)
481
+ : header + checkAllJavaBody(lintTool);
482
+ case "generic":
483
+ return header + checkAllGenericBody();
484
+ }
485
+ }
486
+ function checkAllNodeBody() {
487
+ return `has_package_script() {
134
488
  [ -f package.json ] || return 1
135
489
  node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); process.exit(pkg.scripts && pkg.scripts[process.argv[1]] ? 0 : 1)" "$1" >/dev/null 2>&1
136
490
  }
@@ -156,17 +510,110 @@ if [ -f package.json ]; then
156
510
  exit 0
157
511
  fi
158
512
 
513
+ echo "[juninho:check-all] No full verification command configured."
514
+ echo "[juninho:check-all] Customize .opencode/scripts/check-all.sh or run /j.init-deep."
515
+ `;
516
+ }
517
+ function checkAllPythonBody(lintTool) {
518
+ const lint = lintTool ?? "ruff";
519
+ return `# Python: lint + test
520
+ echo "[juninho:check-all] Running lint..."
521
+ if command -v ${lint} >/dev/null 2>&1; then
522
+ ${lint} check .
523
+ elif command -v ruff >/dev/null 2>&1; then
524
+ ruff check .
525
+ elif command -v flake8 >/dev/null 2>&1; then
526
+ flake8 .
527
+ fi
528
+
529
+ echo "[juninho:check-all] Running tests..."
530
+ if command -v pytest >/dev/null 2>&1; then
531
+ pytest
532
+ elif command -v python >/dev/null 2>&1; then
533
+ python -m pytest
534
+ fi
535
+ `;
536
+ }
537
+ function checkAllGoBody(lintTool) {
538
+ const lint = lintTool ?? "golangci-lint";
539
+ return `# Go: vet + lint + test
540
+ echo "[juninho:check-all] Running go vet..."
541
+ go vet ./...
542
+
543
+ echo "[juninho:check-all] Running lint..."
544
+ if command -v ${lint} >/dev/null 2>&1; then
545
+ ${lint} run
546
+ fi
547
+
548
+ echo "[juninho:check-all] Running tests..."
549
+ go test ./...
550
+ `;
551
+ }
552
+ function checkAllJavaBody(lintTool) {
553
+ return `# Java: full build with tests
159
554
  if [ -x "./gradlew" ]; then
555
+ ${lintTool ? `echo "[juninho:check-all] Running lint..."\n ./gradlew checkstyleMain 2>/dev/null || true\n ` : ""}echo "[juninho:check-all] Running tests..."
160
556
  ./gradlew test
161
557
  exit 0
162
558
  fi
163
559
 
164
560
  if [ -x "./mvnw" ]; then
561
+ ${lintTool ? `echo "[juninho:check-all] Running lint..."\n ./mvnw checkstyle:check 2>/dev/null || true\n ` : ""}echo "[juninho:check-all] Running tests..."
165
562
  ./mvnw test
166
563
  exit 0
167
564
  fi
168
565
 
566
+ echo "[juninho:check-all] No Java build tool found."
567
+ `;
568
+ }
569
+ function checkAllKotlinBody(lintTool) {
570
+ return `# Kotlin: lint + compile + test
571
+ if [ -x "./gradlew" ]; then
572
+ echo "[juninho:check-all] Running Kotlin lint..."
573
+ # Try ktlint first, then detekt
574
+ ./gradlew ktlintCheck 2>/dev/null || ./gradlew detekt 2>/dev/null || true
575
+
576
+ echo "[juninho:check-all] Compiling..."
577
+ ./gradlew compileKotlin
578
+
579
+ echo "[juninho:check-all] Running tests..."
580
+ ./gradlew test
581
+ exit 0
582
+ fi
583
+
584
+ if [ -x "./mvnw" ]; then
585
+ echo "[juninho:check-all] Compiling and testing..."
586
+ ./mvnw test
587
+ exit 0
588
+ fi
589
+
590
+ echo "[juninho:check-all] No Kotlin build tool found."
591
+ `;
592
+ }
593
+ function checkAllGenericBody() {
594
+ return `# Generic: detect and run what's available
595
+ if [ -f package.json ]; then
596
+ npm test 2>/dev/null && exit 0
597
+ fi
598
+
599
+ if command -v pytest >/dev/null 2>&1; then
600
+ pytest 2>/dev/null && exit 0
601
+ fi
602
+
603
+ if [ -f go.mod ]; then
604
+ go test ./... 2>/dev/null && exit 0
605
+ fi
606
+
607
+ if [ -x "./gradlew" ]; then
608
+ ./gradlew test 2>/dev/null && exit 0
609
+ fi
610
+
611
+ if [ -x "./mvnw" ]; then
612
+ ./mvnw test 2>/dev/null && exit 0
613
+ fi
614
+
169
615
  echo "[juninho:check-all] No full verification command configured."
170
616
  echo "[juninho:check-all] Customize .opencode/scripts/check-all.sh or run /j.init-deep."
171
617
  `;
618
+ }
172
619
  //# sourceMappingURL=support-scripts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"support-scripts.js","sourceRoot":"","sources":["../../src/templates/support-scripts.ts"],"names":[],"mappings":";;;;;AAGA,kDAOC;AAVD,2BAA6C;AAC7C,gDAAuB;AAEvB,SAAgB,mBAAmB,CAAC,UAAkB;IACpD,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CA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O,IAAI;IAChB,IAAI;;;;;;;;;;;;;CAaP,CAAA;AACD,CAAC;AAED,SAAS,cAAc,CAAC,QAAiB;IACvC,MAAM,IAAI,GAAG,QAAQ,IAAI,eAAe,CAAA;IACxC,OAAO;;;;;gBAKO,IAAI;IAChB,IAAI;;;;;CAKP,CAAA;AACD,CAAC;AAED,SAAS,gBAAgB,CAAC,QAAiB;IACzC,OAAO;;IAEL,QAAQ,CAAC,CAAC,CAAC,gGAAgG,CAAC,CAAC,CAAC,EAAE;;;;;;IAMhH,QAAQ,CAAC,CAAC,CAAC,+FAA+F,CAAC,CAAC,CAAC,EAAE;;;;;;CAMlH,CAAA;AACD,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAiB;IAC3C,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAA;AACD,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBR,CAAA;AACD,CAAC"}
@@ -1,2 +1,3 @@
1
- export declare function writeTools(projectDir: string): void;
1
+ import type { ProjectType } from "../project-types.js";
2
+ export declare function writeTools(projectDir: string, projectType?: ProjectType, isKotlin?: boolean): void;
2
3
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/templates/tools.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAOnD"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/templates/tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGtD,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,WAA2B,EACxC,QAAQ,GAAE,OAAe,GACxB,IAAI,CAQN"}