diff --git a/aiAssets/DogCat3/Applovin/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_al.html b/aiAssets/DogCat3/Applovin/DogCat3_Full_al.html similarity index 100% rename from aiAssets/DogCat3/Applovin/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_al.html rename to aiAssets/DogCat3/Applovin/DogCat3_Full_al.html diff --git a/aiAssets/DogCat3/Facebook/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_fb.html b/aiAssets/DogCat3/Facebook/DogCat3_Full_fb.html similarity index 100% rename from aiAssets/DogCat3/Facebook/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_fb.html rename to aiAssets/DogCat3/Facebook/DogCat3_Full_fb.html diff --git a/aiAssets/DogCat3/GoogleAds/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_gg.zip b/aiAssets/DogCat3/GoogleAds/DogCat3_Full_gg.zip similarity index 100% rename from aiAssets/DogCat3/GoogleAds/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_gg.zip rename to aiAssets/DogCat3/GoogleAds/DogCat3_Full_gg.zip diff --git a/aiAssets/DogCat3/Ironsource/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_is.html b/aiAssets/DogCat3/Ironsource/DogCat3_Full_is.html similarity index 100% rename from aiAssets/DogCat3/Ironsource/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_is.html rename to aiAssets/DogCat3/Ironsource/DogCat3_Full_is.html diff --git a/aiAssets/DogCat3/Mintegral/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_mtg.zip b/aiAssets/DogCat3/Mintegral/DogCat3_Full_mtg.zip similarity index 100% rename from aiAssets/DogCat3/Mintegral/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_mtg.zip rename to aiAssets/DogCat3/Mintegral/DogCat3_Full_mtg.zip diff --git a/aiAssets/DogCat3/Moloco/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_mo.html b/aiAssets/DogCat3/Moloco/DogCat3_Full_mo.html similarity index 100% rename from aiAssets/DogCat3/Moloco/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_mo.html rename to aiAssets/DogCat3/Moloco/DogCat3_Full_mo.html diff --git a/aiAssets/DogCat3/Unity/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_un.html b/aiAssets/DogCat3/Unity/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_un.html deleted file mode 100644 index 1f2f881..0000000 --- a/aiAssets/DogCat3/Unity/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_un.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/aiAssets/DogCat3/Vungle/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_vu.zip b/aiAssets/DogCat3/Vungle/DogCat3_Full_vu.zip similarity index 100% rename from aiAssets/DogCat3/Vungle/wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_vu.zip rename to aiAssets/DogCat3/Vungle/DogCat3_Full_vu.zip diff --git a/aiAssets/Playworks_UnityNetwork.html b/aiAssets/DogCat3_Full.html similarity index 100% rename from aiAssets/Playworks_UnityNetwork.html rename to aiAssets/DogCat3_Full.html diff --git a/dist/hpl-toolbox-0.1.6.exe b/dist/hpl-toolbox-0.1.6.exe index 7576b82..cbd4699 100644 Binary files a/dist/hpl-toolbox-0.1.6.exe and b/dist/hpl-toolbox-0.1.6.exe differ diff --git a/dist/hpl-toolbox-0.1.6.vsix b/dist/hpl-toolbox-0.1.6.vsix index 3763125..66ab055 100644 Binary files a/dist/hpl-toolbox-0.1.6.vsix and b/dist/hpl-toolbox-0.1.6.vsix differ diff --git a/scripts/check-dogcat3-playwright.mjs b/scripts/check-dogcat3-playwright.mjs index 3fee25d..367f730 100644 --- a/scripts/check-dogcat3-playwright.mjs +++ b/scripts/check-dogcat3-playwright.mjs @@ -10,20 +10,6 @@ const root = process.cwd(); const dogCatRoot = process.env.DOGCAT_ROOT || path.join(root, 'aiAssets', 'DogCat3'); const waitMs = Number(process.env.RUNTIME_WAIT_MS || 9000); -const htmlFiles = [ - ['Applovin', path.join(dogCatRoot, 'Applovin', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_al.html')], - ['Facebook', path.join(dogCatRoot, 'Facebook', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_fb.html')], - ['Ironsource', path.join(dogCatRoot, 'Ironsource', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_is.html')], - ['Moloco', path.join(dogCatRoot, 'Moloco', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_mo.html')], - ['Unity', path.join(dogCatRoot, 'Unity', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_un.html')], -]; - -const zipFiles = [ - ['GoogleAds', path.join(dogCatRoot, 'GoogleAds', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_gg.zip')], - ['Mintegral', path.join(dogCatRoot, 'Mintegral', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_mtg.zip')], - ['Vungle', path.join(dogCatRoot, 'Vungle', 'wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na_vu.zip')], -]; - const mraidStub = ` window.mraid = window.mraid || { getState: function(){ return 'default'; }, @@ -44,20 +30,36 @@ window.ExitApi = window.ExitApi || { async function collectCases(tempDir) { const cases = []; - for (const [name, file] of htmlFiles) { - if (existsSync(file)) cases.push([name, await readFile(file)]); - } - - for (const [name, zip] of zipFiles) { - if (!existsSync(zip)) continue; + const networkFolders = [ + 'Applovin', + 'Facebook', + 'Ironsource', + 'Moloco', + 'Unity', + 'GoogleAds', + 'Mintegral', + 'Vungle', + ]; + for (const name of networkFolders) { + const dir = path.join(dogCatRoot, name); + if (!existsSync(dir)) continue; + const entries = await readdir(dir); + const htmlName = entries.find((entry) => /\.html?$/i.test(entry)); + if (htmlName) { + cases.push([name, await readFile(path.join(dir, htmlName))]); + continue; + } + const zipName = entries.find((entry) => /\.zip$/i.test(entry)); + if (!zipName) continue; + const zip = path.join(dir, zipName); const out = path.join(tempDir, name); execFileSync('powershell', [ '-NoProfile', '-Command', `Expand-Archive -LiteralPath '${zip.replaceAll("'", "''")}' -DestinationPath '${out.replaceAll("'", "''")}' -Force`, ], { stdio: 'ignore' }); - const entries = await readdir(out); - const indexName = entries.find((entry) => entry.toLowerCase() === 'index.html'); + const expanded = await readdir(out); + const indexName = expanded.find((entry) => entry.toLowerCase() === 'index.html'); if (indexName) cases.push([name, await readFile(path.join(out, indexName))]); } return cases; diff --git a/standalone/mraid_dogcat3_test.go b/standalone/mraid_dogcat3_test.go index e65699c..72bb121 100644 --- a/standalone/mraid_dogcat3_test.go +++ b/standalone/mraid_dogcat3_test.go @@ -44,6 +44,9 @@ func collectDogCat3MraidTargets(root string) ([]string, error) { dir := filepath.Join(root, folder) entries, err := os.ReadDir(dir) if err != nil { + if os.IsNotExist(err) { + continue + } return nil, err } for _, entry := range entries {