Elffuss BraidHub

kikocis/continue public

Merge pull request #6482 from uinstinct/package-all-script

chore: fix import problems in package-all script
Changesetf01d551dde94a947320ee24aad75251bf1c85b5af0bebef8a4565abd64c31605
AuthorDallin Romney <dallinromney@gmail.com> · 2025-07-10 15:26 -07:00
CommitterGitHub <noreply@github.com> · 2025-07-10 15:26 -07:00
Parents0db1b6ee73ae, 548b15e845f2

Browse the files at this changeset

2 files changed

modified extensions/vscode/scripts/package-all.js +2 −1
@@ -11,7 +11,7 @@
1111 const args = process.argv.slice(2);
1212 const isPreRelease = args.includes("--pre-release");
1313
14-(async () => {
14+void (async () => {
1515 for (const i in PLATFORMS) {
1616 const platform = PLATFORMS[i];
1717 const pkgCommand = isPreRelease
@@ -23,4 +23,5 @@
2323 });
2424 execSync(pkgCommand, { stdio: "inherit" });
2525 }
26+ process.exit(0);
2627 })();
modified extensions/vscode/scripts/prepackage-cross-platform.js +11 −19
@@ -6,14 +6,17 @@
66
77 const fs = require("fs");
88 const path = require("path");
9+
910 const { rimrafSync } = require("rimraf");
11+
1012 const {
1113 validateFilesPresent,
1214 autodetectPlatformAndArch,
1315 } = require("../../../scripts/util/index");
16+
17+const { generateAndCopyConfigYamlSchema } = require("./generate-copy-config");
18+const { npmInstall } = require("./npm-install");
1419 const {
15- copyConfigSchema,
16- installNodeModules,
1720 buildGui,
1821 copyOnnxRuntimeFromNodeModules,
1922 copyTreeSitterWasms,
@@ -48,10 +51,10 @@
4851
4952 let os;
5053 let arch;
51-if (!target) {
52- [os, arch] = autodetectPlatformAndArch();
53-} else {
54+if (target) {
5455 [os, arch] = target.split("-");
56+} else {
57+ [os, arch] = autodetectPlatformAndArch();
5558 }
5659
5760 if (os === "alpine") {
@@ -71,26 +74,14 @@
7174 return !!process.env.GITHUB_ACTIONS;
7275 }
7376
74-function isArm() {
75- return (
76- target === "darwin-arm64" ||
77- target === "linux-arm64" ||
78- target === "win32-arm64"
79- );
80-}
81-
82-function isWin() {
83- return target?.startsWith("win");
84-}
85-
8677 async function package(target, os, arch, exe) {
8778 console.log("[info] Packaging extension for target ", target);
8879
8980 // Copy config_schema to intellij
90- copyConfigSchema();
81+ await generateAndCopyConfigYamlSchema();
9182
9283 // Install node_modules
93- installNodeModules();
84+ await npmInstall();
9485
9586 // Build gui and copy to extensions
9687 await buildGui(ghAction());
@@ -214,4 +205,5 @@
214205
215206 void (async () => {
216207 await package(target, os, arch, exe);
208+ process.exit(0);
217209 })();