t44 0.4.0-rc.21 → 0.4.0-rc.22
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { join } from 'path'
|
|
3
|
-
import { readFile, writeFile } from 'fs/promises'
|
|
2
|
+
import { join, dirname } from 'path'
|
|
3
|
+
import { readFile, writeFile, access } from 'fs/promises'
|
|
4
4
|
import glob from 'fast-glob'
|
|
5
5
|
import chalk from 'chalk'
|
|
6
6
|
|
|
@@ -135,6 +135,31 @@ export async function capsule({
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
// Clean up tsconfig.json extends paths that don't resolve in the published package
|
|
140
|
+
console.log('[t44] Cleaning up tsconfig.json extends paths ...\n')
|
|
141
|
+
for (const [repoName, repoSourceDir] of Object.entries(repos)) {
|
|
142
|
+
await cleanupTsconfigExtends(join(repoSourceDir as string, 'tsconfig.json'))
|
|
143
|
+
|
|
144
|
+
// Follow workspaces to find sub-workspace tsconfig.json files
|
|
145
|
+
const pkgPath = join(repoSourceDir as string, 'package.json')
|
|
146
|
+
try {
|
|
147
|
+
const pkgContent = await readFile(pkgPath, 'utf-8')
|
|
148
|
+
const pkg = JSON.parse(pkgContent)
|
|
149
|
+
const workspaces: string[] = pkg.workspaces || []
|
|
150
|
+
if (workspaces.length > 0) {
|
|
151
|
+
const tsconfigPatterns = workspaces.map(ws => join(ws, 'tsconfig.json'))
|
|
152
|
+
const tsconfigPaths = await glob(tsconfigPatterns, {
|
|
153
|
+
cwd: repoSourceDir as string,
|
|
154
|
+
absolute: true,
|
|
155
|
+
onlyFiles: true,
|
|
156
|
+
})
|
|
157
|
+
for (const tsconfigPath of tsconfigPaths) {
|
|
158
|
+
await cleanupTsconfigExtends(tsconfigPath)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
} catch { }
|
|
162
|
+
}
|
|
138
163
|
}
|
|
139
164
|
}
|
|
140
165
|
},
|
|
@@ -337,3 +362,29 @@ async function updateWorkspaceDependencies(
|
|
|
337
362
|
}
|
|
338
363
|
}
|
|
339
364
|
}
|
|
365
|
+
|
|
366
|
+
async function cleanupTsconfigExtends(tsconfigPath: string): Promise<void> {
|
|
367
|
+
try {
|
|
368
|
+
const content = await readFile(tsconfigPath, 'utf-8')
|
|
369
|
+
const tsconfig = JSON.parse(content)
|
|
370
|
+
|
|
371
|
+
if (!tsconfig.extends) return
|
|
372
|
+
|
|
373
|
+
// Resolve the extends path relative to the tsconfig.json directory
|
|
374
|
+
const tsconfigDir = dirname(tsconfigPath)
|
|
375
|
+
const extendsPath = join(tsconfigDir, tsconfig.extends)
|
|
376
|
+
|
|
377
|
+
try {
|
|
378
|
+
await access(extendsPath)
|
|
379
|
+
// Path exists — keep it
|
|
380
|
+
} catch {
|
|
381
|
+
// Path does not exist — remove the extends field
|
|
382
|
+
delete tsconfig.extends
|
|
383
|
+
const indent = detectIndent(content)
|
|
384
|
+
await writeFile(tsconfigPath, JSON.stringify(tsconfig, null, indent) + '\n', 'utf-8')
|
|
385
|
+
console.log(chalk.green(` ✓ Removed invalid extends from ${tsconfigPath}\n`))
|
|
386
|
+
}
|
|
387
|
+
} catch {
|
|
388
|
+
// tsconfig.json doesn't exist or isn't valid JSON — skip
|
|
389
|
+
}
|
|
390
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "t44",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.22",
|
|
4
4
|
"license": "LGPL",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -67,18 +67,18 @@
|
|
|
67
67
|
"fast-glob": "^3.3.3",
|
|
68
68
|
"inquirer": "^12.4.0",
|
|
69
69
|
"axios": "^1.13.4",
|
|
70
|
-
"turbo": "^2.7.5",
|
|
71
70
|
"@ucanto/principal": "^9.0.3",
|
|
72
71
|
"@ucanto/server": "^11.0.3",
|
|
73
72
|
"json-schema-ref-resolver": "^3.0.0",
|
|
74
|
-
"@stream44.studio/encapsulate": "^0.4.0-rc.
|
|
73
|
+
"@stream44.studio/encapsulate": "^0.4.0-rc.23",
|
|
74
|
+
"turbo": "^2.7.5"
|
|
75
75
|
},
|
|
76
76
|
"optionalDependencies": {
|
|
77
|
-
"@stream44.studio/t44-bunny.net": "^0.1.0-rc.
|
|
78
|
-
"@stream44.studio/t44-vercel.com": "^0.1.0-rc.
|
|
79
|
-
"@stream44.studio/t44-github.com": "^0.1.0-rc.
|
|
80
|
-
"@stream44.studio/t44-dynadot.com": "^0.1.0-rc.
|
|
81
|
-
"@stream44.studio/t44-npmjs.com": "^0.1.0-rc.
|
|
77
|
+
"@stream44.studio/t44-bunny.net": "^0.1.0-rc.4",
|
|
78
|
+
"@stream44.studio/t44-vercel.com": "^0.1.0-rc.4",
|
|
79
|
+
"@stream44.studio/t44-github.com": "^0.1.0-rc.4",
|
|
80
|
+
"@stream44.studio/t44-dynadot.com": "^0.1.0-rc.4",
|
|
81
|
+
"@stream44.studio/t44-npmjs.com": "^0.1.0-rc.4"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/bun": "^1.3.4",
|