Skip to content

Commit c01b497

Browse files
committed
fix tar path
fix missing patch
1 parent 175030d commit c01b497

5 files changed

Lines changed: 14 additions & 9 deletions

File tree

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
],
1515
"scripts": {
1616
"prepare": "bun scripts/prepare.ts",
17-
"dev": "node scripts/dev.ts",
18-
"dev:server": "bun --watch src/index.ts",
17+
"dev:both": "node scripts/dev.ts",
18+
"dev": "bun --watch src/index.ts",
1919
"start": "bun src/index.ts",
2020
"test": "bun --test",
2121
"prepack": "npm run build:npm",
@@ -56,7 +56,7 @@
5656
"typescript": "^5.9.3"
5757
},
5858
"patchedDependencies": {
59-
"frida@17.6.1": "patches/frida@17.6.1.patch",
59+
"frida@17.6.2": "patches/frida@17.6.2.patch",
6060
"frida@16.7.19": "patches/frida@16.7.19.patch"
6161
},
6262
"trustedDependencies": [

scripts/build-bun.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ const bunTargets: Record<string, [string, string]> = {
1515

1616
const root = path.join(import.meta.dirname, "..");
1717

18-
async function prebuild(cwd: string, platform?: string, arch?: string) {
18+
async function prebuild(
19+
cwd: string,
20+
platform: string = process.platform,
21+
arch: string = process.arch,
22+
) {
23+
console.log("prebuild", cwd, "for", platform, arch);
1924
const binary = path.join(root, "node_modules", ".bin", "prebuild-install");
20-
await $`${process.execPath} ${binary} -r napi --arch ${arch || process.arch} --platform ${platform || process.platform}`.cwd(
25+
await $`${process.execPath} ${binary} -r napi --arch ${arch} --platform ${platform}`.cwd(
2126
cwd,
2227
);
2328
}
@@ -41,7 +46,8 @@ async function pack(dst: string, ...inputs: string[]) {
4146

4247
for (const src of inputs) {
4348
for await (const file of glob.scan(src)) {
44-
files[file] = Bun.file(`${src}/${file}`);
49+
const name = `./${src}/${file}`;
50+
files[name] = Bun.file(name);
4551
}
4652
}
4753

@@ -75,8 +81,6 @@ async function main() {
7581

7682
if (cross) {
7783
for (const [target, [platform, arch]] of Object.entries(bunTargets)) {
78-
console.log("install prebuild for:", target, platform, arch);
79-
8084
await prebuild(cwd, platform, arch);
8185
await bunBuild(target);
8286
}

scripts/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const subdirs = subprojects.map((name) =>
1414
function tmux() {
1515
const argv = ["new-session"];
1616
for (const cwd of subdirs) {
17-
argv.push("-c", cwd, process.argv0);
17+
argv.push("-c", cwd, runner);
1818
argv.push(...args);
1919
argv.push(";", "split-window", "-h");
2020
}

0 commit comments

Comments
 (0)