next-anteater 0.2.13 → 0.2.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.
- package/lib/scaffold.mjs +20 -0
- package/package.json +1 -1
package/lib/scaffold.mjs
CHANGED
|
@@ -208,6 +208,24 @@ async function patchRunsRouteFailedTtlIfMissing(path) {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
async function patchWorkflowModelInputIfPresent(path) {
|
|
212
|
+
try {
|
|
213
|
+
const existing = await readFile(path, "utf-8");
|
|
214
|
+
const modelInputPattern = /^\s*model:\s*".*"\s*\r?\n/m;
|
|
215
|
+
if (!modelInputPattern.test(existing)) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
const patched = existing.replace(modelInputPattern, "");
|
|
219
|
+
if (patched === existing) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
await writeFile(path, patched, "utf-8");
|
|
223
|
+
return true;
|
|
224
|
+
} catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
211
229
|
/**
|
|
212
230
|
* Generate anteater.config.ts
|
|
213
231
|
*/
|
|
@@ -1134,6 +1152,8 @@ export async function scaffoldFiles(cwd, options) {
|
|
|
1134
1152
|
const workflowPath = join(cwd, ".github/workflows/anteater.yml");
|
|
1135
1153
|
if (await writeIfNotExists(workflowPath, generateWorkflow(options))) {
|
|
1136
1154
|
results.push(".github/workflows/anteater.yml");
|
|
1155
|
+
} else if (await patchWorkflowModelInputIfPresent(workflowPath)) {
|
|
1156
|
+
results.push(".github/workflows/anteater.yml (patched deprecated model input)");
|
|
1137
1157
|
}
|
|
1138
1158
|
|
|
1139
1159
|
// Claude Code agent settings (always overwrite — reflects current choices)
|