We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0aee843 commit 5a624c2Copy full SHA for 5a624c2
1 file changed
packages/openops/src/lib/ai/sync-models.ts
@@ -138,10 +138,10 @@ async function fetchAiSdkModels(
138
139
const dts = await response.text();
140
const pattern = new RegExp(
141
- `type\\s+${source.typeName}\\s*=\\s*([^;]+);`,
+ String.raw`type\s+${source.typeName}\s*=\s*([^;]+);`,
142
's',
143
);
144
- const match = dts.match(pattern);
+ const match = pattern.exec(dts);
145
if (!match) {
146
throw new Error(`Could not find type ${source.typeName} in @ai-sdk/${pkg}`);
147
}
0 commit comments