35
35
dist_dir = ROOT_DIR / "dist"
36
36
build_dir = ROOT_DIR / "build"
37
37
BROWSER_BATTERIES_DIR = ROOT_DIR / "browser_batteries"
38
- NODE_BINARY_PATH = BROWSER_BATTERIES_DIR / "BrowserBatteries" / "bin"
38
+ BROWSER_BATTERIES_BIN_DIR = BROWSER_BATTERIES_DIR / "BrowserBatteries" / "bin"
39
39
proto_sources = (ROOT_DIR / "protobuf" ).glob ("*.proto" )
40
40
PYTHON_SRC_DIR = ROOT_DIR / "Browser"
41
41
python_protobuf_dir = PYTHON_SRC_DIR / "generated"
@@ -135,7 +135,7 @@ def clean(c):
135
135
ZIP_DIR ,
136
136
Path ("./.mypy_cache" ),
137
137
PYTHON_SRC_DIR / "wrapper" ,
138
- NODE_BINARY_PATH ,
138
+ BROWSER_BATTERIES_BIN_DIR ,
139
139
BROWSER_BATTERIES_DIR / "dist" ,
140
140
]:
141
141
if target .exists ():
@@ -247,11 +247,11 @@ def _os_platform() -> str:
247
247
248
248
def _build_nodejs (c : Context , architecture : str ):
249
249
"""Build NodeJS binary for GRPC server."""
250
- print (f"Build NodeJS binary to '{ NODE_BINARY_PATH } '." )
250
+ print (f"Build NodeJS binary to '{ BROWSER_BATTERIES_BIN_DIR } '." )
251
251
_copy_package_files ()
252
252
target = f"node22-{ _os_platform ()} -{ architecture } "
253
253
print (f"Target: { target } " )
254
- grpc_server = NODE_BINARY_PATH .joinpath ("grpc_server" )
254
+ grpc_server = BROWSER_BATTERIES_BIN_DIR .joinpath ("grpc_server" )
255
255
cmd = [
256
256
"node" ,
257
257
"node_modules/@yao-pkg/pkg/lib-es5/bin.js" ,
@@ -263,6 +263,8 @@ def _build_nodejs(c: Context, architecture: str):
263
263
"." ,
264
264
]
265
265
c .run (" " .join (cmd ))
266
+ for file in BROWSER_BATTERIES_DIR .glob ("**/*" ):
267
+ print (f"Found file: { file } " )
266
268
if grpc_server .exists ():
267
269
print (f"GRPC server binary created at '{ grpc_server } '." )
268
270
else :
0 commit comments