← Commit history

rust/verbs/assets/import-scan.ps1 (embedded by import.rs, missed by the rust/ push's extension filter; pup-bridge#118)

John Lauer ·9feb6ee81a ·1mo ago ·parent c7a8f33
2 files changed +31−1
rust/verbs/assets/import-scan.ps1added+28
@@ -0,0 +1,28 @@+$ErrorActionPreference='SilentlyContinue'+$local = $env:LOCALAPPDATA+$browsers = @(+  @{ id='chrome'; name='Google Chrome'; root=(Join-Path $local 'Google\Chrome\User Data') },+  @{ id='edge';   name='Microsoft Edge'; root=(Join-Path $local 'Microsoft\Edge\User Data') },+  @{ id='brave';  name='Brave';          root=(Join-Path $local 'BraveSoftware\Brave-Browser\User Data') }+)+$out = @()+foreach($b in $browsers){+  if(-not (Test-Path $b.root)){ continue }+  $abe=$false+  $lsPath = Join-Path $b.root 'Local State'+  if(Test-Path $lsPath){ try { $ls = Get-Content -Raw -LiteralPath $lsPath | ConvertFrom-Json; if($ls.os_crypt.app_bound_encrypted_key){ $abe=$true } } catch {} }+  $profs = @()+  $d = Get-Item -LiteralPath (Join-Path $b.root 'Default') -ErrorAction SilentlyContinue; if($d){ $profs += $d }+  $profs += (Get-ChildItem -LiteralPath $b.root -Directory -Filter 'Profile *' -ErrorAction SilentlyContinue)+  foreach($pf in $profs){+    if(-not $pf){ continue }+    $prefPath = Join-Path $pf.FullName 'Preferences'+    if(-not (Test-Path $prefPath)){ continue }+    $pname=$pf.Name; $emails=@()+    try { $pref = Get-Content -Raw -LiteralPath $prefPath | ConvertFrom-Json; if($pref.profile.name){ $pname = $pref.profile.name }; if($pref.account_info){ foreach($a in $pref.account_info){ if($a.email){ $emails += $a.email } } } } catch {}+    $ldPath = Join-Path $pf.FullName 'Login Data'+    $ldBytes=0; if(Test-Path $ldPath){ $ldBytes = (Get-Item -LiteralPath $ldPath).Length }+    if($ldBytes -gt 0){ $out += [pscustomobject]@{ browser=$b.id; browserName=$b.name; profileDir=$pf.Name; profileName=$pname; accounts=@($emails); loginDataBytes=$ldBytes; abe=$abe } }+  }+}+@{ profiles = @($out) } | ConvertTo-Json -Compress -Depth 6
tools/ship.sh+3−1
@@ -195,7 +195,9 @@ echo "== 5. push the source text files to the product page (source is open; publ # two build tools. 62 files, ~1.5 MB. Cargo.lock included so a checkout builds the same dependency set. # 2.0.598 (pup-bridge#118, Kyle): plus every file the Rust build EMBEDS from outside rust/ (the extensions, # icons, dashboard pages). Derived from the include_bytes!/include_str! sites, so a new embed ships by itself.-EMBED_FILES=$(python3 tools/list-embedded.py | grep -v '^rust/' | tr '\n' ' ') || { echo "   an embedded file is missing on disk (tools/list-embedded.py)"; exit 1; }+# ALL of them, rust/ included: the rust/ find below keeps only source-like extensions, and a clean checkout+# still failed on rust/verbs/assets/import-scan.ps1 (measured from a fresh pull, 2026-09-16).+EMBED_FILES=$(python3 tools/list-embedded.py | tr '\n' ' ') || { echo "   an embedded file is missing on disk (tools/list-embedded.py)"; exit 1; } RUST_FILES=$(find rust -path rust/target -prune -o -type f \( -name '*.rs' -o -name 'Cargo.toml' -o -name 'Cargo.lock' -o -name '*.ttf' -o -name '*.png' -o -name '*.svg' -o -name '*.json' -o -name '*.js' -o -name '*.html' -o -name '*.md' \) -print | tr '\n' ' ') adom-wiki repo push "$PAGE" \   --files src/bridge.json src/BRIDGE_VERSION src/*.js src/extension/*.js src/extension/*.json SKILL.md package.json \