Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(guard): parse the TIER_CREDITS literal as an expression, not a block

purple3ba8b7d069c1
diff --git a/scripts/check-cloud-sales.mjs b/scripts/check-cloud-sales.mjs
index 25b1d2c4..725e0d59 100644
--- a/scripts/check-cloud-sales.mjs
+++ b/scripts/check-cloud-sales.mjs
@@ -97,7 +97,7 @@ function namedObject(file, name) {
let found
function visit(node) {
if (ts.isVariableDeclaration(node) && node.name.getText(file) === name && node.initializer && ts.isObjectLiteralExpression(node.initializer)) {
- found = objects(ts.createSourceFile('x.ts', node.initializer.getText(file), ts.ScriptTarget.Latest, true))[0]
+ found = objects(ts.createSourceFile('x.ts', `const x = ${node.initializer.getText(file)}`, ts.ScriptTarget.Latest, true))[0]
}
ts.forEachChild(node, visit)
}