🐛 fix jetbrains build

This commit is contained in:
Nate Sesti 2024-05-18 23:40:16 -07:00
parent 4fdae2722d
commit 27470eb12b
2 changed files with 33 additions and 4 deletions

View file

@ -22,7 +22,7 @@ let targets = platforms.flatMap((platform) =>
);
const assetBackups = [
"node_modules/win-ca/lib/crypt32-ia32.node.bak",
"node_modules/win-ca/lib/crypt32-x64.node.bak"
"node_modules/win-ca/lib/crypt32-x64.node.bak",
];
let esbuildOnly = false;
@ -157,11 +157,41 @@ async function installNodeModuleInTempDirAndCopyToCurrent(package, toCopy) {
}
}
// tree-sitter-wasm
await new Promise((resolve, reject) => {
ncp(
path.join(
__dirname,
"..",
"core",
"node_modules",
"tree-sitter-wasms",
"out",
),
path.join(__dirname, "out/tree-sitter-wasms"),
{ dereference: true },
(error) => {
if (error) {
console.warn("[error] Error copying tree-sitter-wasm files", error);
reject(error);
} else {
resolve();
}
},
);
});
fs.copyFileSync(
path.join(__dirname, "../core/vendor/tree-sitter.wasm"),
path.join(__dirname, "out/tree-sitter.wasm"),
);
console.log("[info] Copied tree-sitter wasms");
console.log("[info] Cleaning up artifacts from previous builds...");
// delete asset backups generated by previous pkg invocations, if present
for (const assetPath of assetBackups) {
fs.rmSync(assetPath, {force: true});
fs.rmSync(assetPath, { force: true });
}
console.log("[info] Building with esbuild...");

View file

@ -19,7 +19,6 @@ import com.intellij.openapi.fileEditor.TextEditor
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.MessageType
import com.intellij.openapi.ui.Messages
import com.intellij.openapi.ui.popup.Balloon
import com.intellij.openapi.ui.popup.JBPopupFactory
import com.intellij.openapi.vfs.*
@ -434,7 +433,7 @@ class IdeProtocolClient (
respond(historyManager.list());
}
"saveSession" -> {
historyManager.save(data as PersistedSessionInfo);
historyManager.save(data as MutableMap<String, Any>);
respond(null);
}
"deleteSession" -> {