diff --git a/.gitignore b/.gitignore index 68942c6b..22c2bb2b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ commit.patch commit.template .wireit target/ +*.tsbuildinfo # todo: we should figure out a good way to sync these with the internal repo instead of having to generate them with the init script Cargo.lock diff --git a/.vscode/settings.json b/.vscode/settings.json index 6d845b8c..b587be8f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,6 +13,11 @@ "changeProcessCWD": true } ], + "[javascript]": { + "editor.defaultFormatter": "vscode.typescript-language-features", + "editor.insertSpaces": false, + "editor.formatOnSave": true + }, "[typescript]": { "editor.defaultFormatter": "vscode.typescript-language-features", "editor.insertSpaces": false, diff --git a/priompt-preview/scripts/serve.cjs b/priompt-preview/scripts/serve.cjs index f39ba51b..b52fc42d 100755 --- a/priompt-preview/scripts/serve.cjs +++ b/priompt-preview/scripts/serve.cjs @@ -61,7 +61,7 @@ const requestListener = (req, res) => { data = data.toString().replace(/PRIOMPT_PREVIEW_OPENAI_KEY/g, `${process.env.PRIOMPT_PREVIEW_OPENAI_KEY}`); } if ((extname === '.html' || extname === '.js') && data.toString().includes('PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING')) { - data = data.toString().replace(/PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING/g, `${process.env.PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING}`); + data = data.toString().replace(/PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING/g, `${process.env.PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING ?? "PRIOMPT_PREVIEW_OSS_ENDPOINTS_JSON_STRING"}`); } res.end(data); }