@soulbatical/tetra-dev-toolkit 1.20.13 → 1.20.14

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.
@@ -35,9 +35,10 @@ export async function check(projectPath) {
35
35
  if (existsSync(instrumentPath)) {
36
36
  result.details.backend.hasInstrumentFile = true
37
37
 
38
- // Check if it's imported first in index.ts/index.js
38
+ // Check if it's imported first in index.ts/index.js/server.ts
39
+ for (const entryName of ['index', 'server']) {
39
40
  for (const indexExt of ['ts', 'js']) {
40
- const indexPath = join(projectPath, 'backend', 'src', `index.${indexExt}`)
41
+ const indexPath = join(projectPath, 'backend', 'src', `${entryName}.${indexExt}`)
41
42
  if (existsSync(indexPath)) {
42
43
  try {
43
44
  const content = readFileSync(indexPath, 'utf-8')
@@ -49,10 +50,31 @@ export async function check(projectPath) {
49
50
  } catch { /* ignore */ }
50
51
  }
51
52
  }
53
+ }
52
54
  break
53
55
  }
54
56
  }
55
57
 
58
+ // Check for Tetra createApp pattern — Sentry is auto-configured via SENTRY_DSN env var
59
+ if (!result.details.backend.hasInstrumentFile) {
60
+ for (const entryFile of ['index', 'server', 'app']) {
61
+ for (const ext of ['ts', 'js']) {
62
+ const filePath = join(projectPath, 'backend', 'src', `${entryFile}.${ext}`)
63
+ if (existsSync(filePath)) {
64
+ try {
65
+ const content = readFileSync(filePath, 'utf-8')
66
+ if (content.includes('createApp')) {
67
+ result.details.backend.usesCreateApp = true
68
+ result.details.backend.hasInstrumentFile = true
69
+ result.details.backend.importedFirst = true
70
+ }
71
+ } catch { /* ignore */ }
72
+ }
73
+ }
74
+ if (result.details.backend.usesCreateApp) break
75
+ }
76
+ }
77
+
56
78
  if (result.details.backend.hasSentryDep && result.details.backend.hasInstrumentFile) {
57
79
  result.score += 1
58
80
  } else if (result.details.backend.hasSentryDep) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulbatical/tetra-dev-toolkit",
3
- "version": "1.20.13",
3
+ "version": "1.20.14",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },