update the PSL on box code update

I tried replacing the module but it's complicated since there is a
lot of rules - https://github.com/publicsuffix/list/wiki/Format#format
This commit is contained in:
Girish Ramakrishnan
2025-02-10 16:16:07 +01:00
parent c43ba46c97
commit 46620e2da5
2 changed files with 6 additions and 0 deletions

View File

@@ -151,6 +151,11 @@ for try in `seq 1 10`; do
sleep 5
done
# update TLDs rules.json (https://github.com/thom4parisot/tld.js?tab=readme-ov-file#updating-the-tlds-list)
if ! node "${box_src_tmp_dir}/node_modules/tldjs/bin/update.js"; then
log "Failed to update PSL, continue anyway"
fi
if [[ ${try} -eq 10 ]]; then
log "npm rebuild failed, giving up"
exit 4