commit f8d9cf6b563d55738b3e65415a0a205346bd6356 Author: lisonge Date: Tue Jul 4 10:39:26 2023 +0800 chore: init diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b90cf49d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +.env +.vscode diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..2073ac01 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +strict-peer-dependencies=false +auto-install-peers=false +registry="https://registry.npmjs.org/" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..e3c58fae --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +pnpm-lock.yaml +pnpm-workspace.yaml +LICENCE + +dist diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 00000000..2a275dd8 --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,9 @@ +// @ts-check +/** + * @type {import('prettier').Config} + */ +module.exports = { + tabWidth: 2, + singleQuote: true, + trailingComma: 'all', +}; diff --git a/README.md b/README.md new file mode 100644 index 00000000..1b518187 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# gkd-subscription + +a subscription for gkd + +## gitmirror + +
+ gkd + +- [gdk](https://raw.gitmirror.com/lisonge/gkd-subscription/main/dist/gkd.json) + +![image](https://github.com/lisonge/gkd/assets/38517192/e9adef4e-4e56-42e2-9d46-2123966467ec) + +
+ +## 大陆 CDN + +
+ gkd + +- [gkd](https://cdn.lisonge.com/gkd.json) + +![image](https://github.com/lisonge/gkd/assets/38517192/341aea22-9f48-4178-b94f-5d14868c70a3) + +
diff --git a/dist/gkd.json b/dist/gkd.json new file mode 100644 index 00000000..3fc6eb43 --- /dev/null +++ b/dist/gkd.json @@ -0,0 +1,1138 @@ +{ + "name": "GKD官方订阅", + "version": 4, + "author": "lisonge", + "supportUrl": "https://github.com/lisonge/gkd-subscription", + "apps": [ + { + "id": "air.tv.douyu.android", + "groups": [ + { + "key": 0, + "name": "斗鱼-开屏广告", + "activityIds": [ + "com.douyu.module.home.pages.main.MainActivity", + "miuix.appcompat.app.m" + ], + "rules": [ + "[text^='跳过'] + * >2 TextView[text*='跳转']" + ] + }, + { + "key": 1, + "name": "斗鱼-青少年模式", + "desc": "关闭青少年模式提醒弹窗", + "activityIds": "com.douyu.module.home.pages.main.MainActivity", + "rules": [ + "[text='开启青少年模式'] + [text='我知道了']" + ] + } + ] + }, + { + "id": "cmb.pb", + "groups": [ + { + "key": 0, + "name": "招商银行-开屏广告", + "activityIds": "cmb.pb.app.mainframe.container.PBMainActivity", + "rules": "[id=`cmb.pb:id/ll_launch_ad_skip_hot_area`]" + } + ] + }, + { + "id": "cn.wps.moffice_eng", + "groups": [ + { + "key": 0, + "name": "WPS-开屏广告", + "activityIds": "cn.wps.moffice.documentmanager.PreStartActivity", + "rules": "[id=`cn.wps.moffice_eng:id/splash_skip`]" + } + ] + }, + { + "id": "com.MobileTicket", + "groups": [ + { + "key": 0, + "name": "铁路12306-开屏广告", + "activityIds": "com.MobileTicket.ui.dialog.SplashAdDialog", + "rules": "[id=`com.MobileTicket:id/tv_skip`]" + } + ] + }, + { + "id": "com.UCMobile", + "groups": [ + { + "key": 0, + "name": "UC浏览器-推荐页广告", + "activityIds": "com.uc.browser.InnerUCMobile", + "rules": [ + "TextView[text=`屏蔽此条广告`]", + "TextView[text=`广告`] +n ImageView[desc=`不感兴趣`]" + ] + } + ] + }, + { + "id": "com.achievo.vipshop", + "groups": [ + { + "key": 0, + "name": "唯品会-开屏广告", + "activityIds": "com.achievo.vipshop.activity.LodingActivity", + "rules": "[id=`com.achievo.vipshop:id/adv_countdown`]" + } + ] + }, + { + "id": "com.alibaba.wireless", + "groups": [ + { + "key": 0, + "name": "阿里巴巴-开屏广告", + "activityIds": "com.alibaba.wireless.launch.home.V5HomeActivity", + "rules": "[id=`com.alibaba.wireless:id/v5_splash_over`]" + } + ] + }, + { + "id": "com.android.thememanager", + "groups": [ + { + "key": 1, + "name": "miui主题壁纸-推荐下广告", + "rules": "[id=`com.android.thememanager:id/ad_close_btn`]" + } + ] + }, + { + "id": "com.anjuke.android.app", + "groups": [ + { + "key": 0, + "name": "安居客-开屏广告", + "activityIds": "com.anjuke.android.app.mainmodule.WelcomeActivity", + "rules": "[id=`com.anjuke.android.app:id/skip_btn`]" + } + ] + }, + { + "id": "com.baidu.BaiduMap", + "groups": [ + { + "key": 0, + "name": "百度地图-开屏广告", + "activityIds": "com.baidu.baidumaps.MapsActivity", + "rules": "@TextView[text^=`跳过`] + TextView[text=`广告`]" + } + ] + }, + { + "id": "com.baidu.homework", + "groups": [ + { + "key": 0, + "name": "作业帮-开屏广告", + "activityIds": "com.baidu.homework.activity.init.InitActivity", + "rules": "[id=`com.baidu.homework:id/adx_splash_skip_text`]" + } + ] + }, + { + "id": "com.baidu.netdisk", + "groups": [ + { + "key": 0, + "name": "百度网盘-开屏广告", + "activityIds": "com.baidu.netdisk.ui.Navigate", + "rules": [ + "@TextView[text^=`跳过`] + TextView[text=`广告`]", + "[id='com.byted.pangle:id/tt_splash_skip_btn']" + ] + } + ] + }, + { + "id": "com.baidu.tieba", + "groups": [ + { + "key": 0, + "name": "百度贴吧-开屏广告", + "desc": "数字倒计时广告,圆形倒计时广告", + "activityIds": [ + "com.baidu.tieba.tblauncher.MainTabActivity", + "com.baidu.tieba.pb.pb.main.PbActivity" + ], + "rules": [ + "TextView[text*=`广告`] - TextView[text^=`跳过`]", + "[id=`com.kwad.dy.sdk:id/ksad_splash_circle_skip_view`] TextView[text=`跳过`]", + "[id=`com.byted.pangle:id/tt_splash_skip_btn`]" + ] + }, + { + "key": 1, + "name": "任意界面-选择不喜欢理由-不感兴趣", + "rules": "@View[text=null] - TextView[text=`选择不喜欢理由`][index=0]" + }, + { + "key": 2, + "name": "首页/贴吧帖子列表-推荐列表-长得像帖子的广告卡片", + "activityIds": [ + "com.baidu.tieba.tblauncher.MainTabActivity", + "com.baidu.tieba.frs.FrsActivity" + ], + "rules": [ + "ImageView < @FrameLayout < LinearLayout < RelativeLayout RelativeLayout > TextView[text$=`广告`]" + ] + }, + { + "key": 3, + "name": "某个广告卡片", + "desc": "忘记是哪个卡片了", + "activityIds": [ + "com.baidu.tieba.tblauncher.MainTabActivity", + "com.baidu.tieba.pb.pb.main.PbActivity" + ], + "rules": "TextView[text=`广告`] ImageView" + }, + { + "key": 4, + "name": "帖子评论区内部广告卡片", + "activityIds": "com.baidu.tieba.frs.FrsActivity", + "rules": "ImageView < @FrameLayout < LinearLayout < RelativeLayout TextView[id=`com.byted.pangle:id/tt_item_tv`][text=`不感兴趣`]" + }, + "Button[text$=`去广告`] - Button[text=`不感兴趣`]", + "[id=`com.coolapk.market:id/close_view`]" + ] + } + ] + }, + { + "id": "com.ct.client", + "groups": [ + { + "key": 0, + "name": "中国电信-开屏广告", + "activityIds": [ + "com.ct.client.activity.MainActivity", + "com.ct.client.activity.SplashActivity" + ], + "rules": "[id=`com.ct.client:id/tvSkip`]" + } + ] + }, + { + "id": "com.daimajia.gold", + "groups": [ + { + "key": 0, + "name": "稀土掘金-开屏广告", + "activityIds": "im.juejin.android.ui.SplashActivity", + "rules": "[id=`com.daimajia.gold:id/fl_skip`]" + } + ] + }, + { + "id": "com.dianping.v1", + "groups": [ + { + "key": 0, + "name": "大众点评-开屏广告", + "activityIds": "com.dianping.v1.NovaMainActivity", + "rules": "[id=`com.dianping.v1:id/new_skip`]" + } + ] + }, + { + "id": "com.dragon.read", + "groups": [ + { + "key": 0, + "name": "番茄免费小说-阅读页面底部广告", + "rules": [ + { + "activityIds": "com.dragon.read.ad.banner.ui", + "matches": "@[isClickable=true] TextView[text=`关闭此条广告`]" + }, + { + "activityIds": "com.dragon.read.reader.ReaderActivity", + "matches": "@ImageView - LinearLayout TextView[text=`广告`]" + } + ] + } + ] + }, + { + "id": "com.duokan.phone.remotecontroller", + "groups": [ + { + "key": 0, + "name": "万能遥控-底部横幅广告", + "activityIds": "com.xiaomi.mitv.phone.remotecontroller.HoriWidgetMainActivityV2", + "rules": "ImageView[id=`com.duokan.phone.remotecontroller:id/image_close_banner`]" + } + ] + }, + { + "id": "com.duowan.kiwi", + "groups": [ + { + "key": 0, + "name": "虎牙直播-开屏广告", + "activityIds": [ + "com.duowan.kiwi.homepage.Homepage", + "com.duowan.kiwi.adsplash.view.AdSplashActivity" + ], + "rules": [ + "[id=`com.duowan.kiwi:id/skip_time`]" + ] + }, + { + "key": 1, + "name": "虎牙直播-关闭青少年模式弹窗", + "activityIds": [ + "com.duowan.kiwi.homepage.Homepage", + "com.miui.home.launcher.Launcher" + ], + "rules": "[id=`com.duowan.kiwi:id/hyui_dialog_button_positive`][text=`我知道了`]" + } + ] + }, + { + "id": "com.google.android.youtube", + "groups": [ + { + "key": 0, + "name": "youtube-视频播放-跳过广告", + "activityIds": "com.google.android.apps.youtube.app.watchwhile.WatchWhileActivity", + "rules": "[id=`com.google.android.youtube:id/skip_ad_button`]" + } + ] + }, + { + "id": "com.gotokeep.keep", + "groups": [ + { + "key": 0, + "name": "Keep-开屏广告", + "activityIds": "com.gotokeep.keep.splash.SplashActivity", + "rules": "[id=`com.gotokeep.keep:id/textSkip`]" + } + ] + }, + { + "id": "com.greenpoint.android.mc10086.activity", + "groups": [ + { + "key": 0, + "name": "中国移动-开屏广告", + "activityIds": "com.mc10086.cmcc.view.tabs.AppTabFragment", + "rules": "[id=`com.greenpoint.android.mc10086.activity:id/video_time_skip`]" + } + ] + }, + { + "id": "com.handsgo.jiakao.android", + "groups": [ + { + "key": 0, + "name": "驾考宝典-开屏广告", + "activityIds": "com.handsgo.jiakao.android.splash.Login", + "rules": "[id=`com.handsgo.jiakao.android:id/closeLayout`]" + } + ] + }, + { + "id": "com.hunantv.imgo.activity", + "groups": [ + { + "key": 0, + "name": "芒果TV-关闭青少年模式提示", + "activityIds": [ + "com.hunantv.imgo.activity.MainActivity", + "miuix.appcompat.app.m" + ], + "rules": "[id=`com.hunantv.imgo.activity:id/btnIknow`]" + } + ] + }, + { + "id": "com.hupu.shihuo", + "groups": [ + { + "key": 0, + "name": "识货-开屏广告", + "activityIds": "com.shizhi.shihuoapp.module.main.ui.welcome.WelcomeActivity", + "rules": "[id=`com.hupu.shihuo:id/fl_countdown`]" + } + ] + }, + { + "id": "com.hxak.liangongbao", + "groups": [ + { + "key": 0, + "name": "链工宝-开屏广告", + "activityIds": "com.hxak.liangongbao.login.ui.HomeActivity", + "rules": "[id=`com.hxak.liangongbao:id/time_down`]" + } + ] + }, + { + "id": "com.icbc", + "groups": [ + { + "key": 0, + "name": "中国工商银行-第一次启动提示", + "activityIds": "com.icbc.activity.init.SplashActivity", + "rules": "[id=`com.icbc:id/close_btn`]" + } + ] + }, + { + "id": "com.intsig.camscanner", + "groups": [ + { + "key": 0, + "name": "扫描全能王-开屏vip提示", + "activityIds": "com.intsig.camscanner.guide.guidevideo.GuideVideoActivity", + "rules": "[id=`com.intsig.camscanner:id/tv_drop_cnl_close_new`]" + } + ] + }, + { + "id": "com.iqiyi.hotchat", + "groups": [ + { + "key": 0, + "name": "爱奇艺热聊-开屏广告", + "activityIds": "com.iqiyi.hotchat.ui.activity.AdvertisementActivity", + "rules": "[id=`com.iqiyi.hotchat:id/tv_advertisement_lunch_skip`]" + } + ] + }, + { + "id": "com.kmxs.reader", + "groups": [ + { + "key": 0, + "name": "七猫免费小说-关闭青少年模式", + "activityIds": "com.kmxs.reader.home.ui.HomeActivity", + "rules": "[id=`com.kmxs.reader:id/young_dialog_close`]" + } + ] + }, + { + "id": "com.kuaikan.comic", + "groups": [ + { + "key": 0, + "name": "快看-开屏广告", + "activityIds": "com.kuaikan.comic.ui.AdvertisementActivity", + "rules": "[id=`com.kuaikan.comic:id/skip_button`]" + } + ] + }, + { + "id": "com.kugou.android", + "groups": [ + { + "key": 0, + "name": "酷狗音乐-开屏广告", + "activityIds": "com.kugou.android.app.splash.SplashActivity", + "rules": "[desc=`跳过`]" + } + ] + }, + { + "id": "com.mihoyo.hyperion", + "groups": [ + { + "key": 0, + "name": "米游社-开屏广告", + "activityIds": "com.mihoyo.hyperion.ui.SplashActivity", + "rules": "[id=`com.mihoyo.hyperion:id/mSplashBtJump`]" + }, + { + "key": 1, + "name": "米游社-青少年模式", + "desc": "关闭青少年模式提醒弹窗", + "rules": "TextView[id=`com.mihoyo.hyperion:id/tv_dialog_i_know`]" + } + ] + }, + { + "id": "com.miui.player", + "groups": [ + { + "key": 0, + "name": "小米音乐-开屏广告", + "activityIds": "com.tencent.qqmusiclite.activity.MainActivity", + "rules": "@TextView[text$=`跳过`] + TextView[id=`com.miui.player:id/ad_view`]" + } + ] + }, + { + "id": "com.miui.systemAdSolution", + "groups": [ + { + "key": 0, + "name": "miui任意app开屏广告", + "rules": "[id=`com.miui.systemAdSolution:id/view_skip_button`]" + }, + { + "key": 1, + "name": "miui-为什么不希望看到这条推广", + "desc": "关闭这个提示", + "activityIds": "com.xiaomi.ad.feedback", + "rules": "[id=`com.miui.systemAdSolution:id/no_interest`]" + } + ] + }, + { + "id": "com.mt.mtxx.mtxx", + "groups": [ + { + "key": 0, + "name": "美图秀秀-开屏广告", + "activityIds": "com.meitu.business.ads.core.activity.AdActivity", + "rules": "[id=`com.mt.mtxx.mtxx:id/0*`][text=`跳过广告`]" + } + ] + }, + { + "id": "com.netease.cloudmusic", + "groups": [ + { + "key": 0, + "name": "网易云音乐-开屏广告", + "activityIds": "com.netease.cloudmusic.activity.MainActivity", + "rules": "TextView[text^=`跳过`][id=`com.netease.cloudmusic:id/skipBtn`]" + } + ] + }, + { + "id": "com.qidian.QDReader", + "groups": [ + { + "key": 0, + "name": "起点读书-开屏广告", + "activityIds": "com.qidian.QDReader.ui.activity.SplashADActivity", + "rules": "Button[text^=`跳过`]" + } + ] + }, + { + "id": "com.qiyi.video", + "groups": [ + { + "key": 0, + "name": "iqiyi-开屏广告", + "activityIds": "org.qiyi.android.video.MainActivity", + "rules": "@FrameLayout[id=`com.qiyi.video:id/unused_res_a`] > LinearLayout[id=null] > TextView[text=`关闭`][id=`com.qiyi.video:id/unused_res_a`]" + }, + { + "key": 1, + "name": "iqiyi-关闭青少年模式弹窗", + "activityIds": "org.qiyi.basecore.widget.dialog.AlertDialogBottom1", + "rules": "Button[id=`com.qiyi.video:id/confirm_btn`][text=`我知道了`]" + } + ] + }, + { + "id": "com.quark.browser", + "groups": [ + { + "key": 0, + "name": "夸克浏览器-小说阅读页面底部广告", + "activityIds": "com.ucpro.BrowserActivity", + "rules": [ + "[id=`com.quark.browser:id/tv_close_ad`][text=`关闭广告`]", + "[id=`com.quark.browser:id/ad_close_layout_container`]" + ] + } + ] + }, + { + "id": "com.sankuai.meituan", + "groups": [ + { + "key": 0, + "name": "美团-开屏广告", + "activityIds": "com.meituan.android.pt.homepage.activity.MainActivity", + "rules": "TextView[id=`com.sankuai.meituan:id/close_btn`][text^=`跳过`]" + } + ] + }, + { + "id": "com.sankuai.meituan.takeoutnew", + "groups": [ + { + "key": 0, + "name": "美团外卖-开屏广告", + "activityIds": "com.sankuai.meituan.takeoutnew.ui.page.boot.SplashAdActivity", + "rules": "[id=`com.sankuai.meituan.takeoutnew:id/tv_remain_time`] + TextView[text*=`跳过`]" + }, + { + "key": 1, + "name": "美团外卖-关闭更新提醒弹窗", + "activityIds": "com.sankuai.waimai.business.page.homepage.widget.dialog.UpdateForceInstallDialog", + "rules": [ + "[id='com.sankuai.meituan.takeoutnew:id/wm_upgrade_force_cancel']" + ] + }, + { + "key": 2, + "name": "美团外卖-关闭弹窗美食广告", + "activityIds": "com.sankuai.waimai.platform.mach.dialog.DynamicDialog", + "rules": [ + "@[desc='关闭'][isClickable=true] > ImageView" + ] + } + ] + }, + { + "id": "com.sdu.didi.psnger", + "groups": [ + { + "key": 0, + "name": "滴滴-开屏广告", + "activityIds": "com.didi.sdk.app.launch.splash.SplashActivity", + "rules": "[id=`com.sdu.didi.psnger:id/skip_ad_ll`]" + } + ] + }, + { + "id": "com.sina.weibo", + "groups": [ + { + "key": 0, + "name": "微博-开屏广告", + "activityIds": "com.sina.weibo.mobileads.view.a", + "rules": [ + "@RelativeLayout > TextView[text=`跳过`]" + ] + }, + { + "key": 1, + "name": "微博-评论区顶部-相关推荐", + "activityIds": "com.sina.weibo.feed.DetailWeiboActivity", + "rules": "ImageView[id=`com.sina.weibo:id/iv_ad_x`]" + } + ] + }, + { + "id": "com.smile.gifmaker", + "groups": [ + { + "key": 0, + "name": "快手-关闭青少年模式弹窗", + "activityIds": "com.yxcorp.gifshow.HomeActivity", + "rules": "@[id=`com.smile.gifmaker:id/positive`] + [id=`com.smile.gifmaker:id/set_teenage_mode`]" + } + ] + }, + { + "id": "com.snda.wifilocating", + "groups": [ + { + "key": 0, + "name": "WiFi万能钥匙-内部广告", + "activityIds": "com.lantern.launcher.ui.MainActivityICS", + "rules": [ + { + "matches": [ + "[id=`com.snda.wifilocating:id/outer_ad_dislike_item_title`][text=`为什么看到此广告`]", + "@[id=`com.snda.wifilocating:id/outer_ad_dislike_item_one`] [id=`com.snda.wifilocating:id/outer_ad_dislike_item_title`][text=`不感兴趣`]" + ] + }, + "ImageView[id=`com.snda.wifilocating:id/feed_item_sdk_logo`] < LinearLayout + [id=`com.snda.wifilocating:id/feed_item_dislike`]" + ] + } + ] + }, + { + "id": "com.ss.android.ugc.aweme", + "groups": [ + { + "key": 0, + "name": "抖音-青少年模式弹窗", + "rules": "Button[text=`开启青少年模式`] + * > Button[text!=null]" + } + ] + }, + { + "id": "com.taobao.taobao", + "groups": [ + { + "key": 0, + "name": "淘宝-开屏广告", + "activityIds": "com.taobao.bootimage.activity.BootImageActivity", + "rules": "[id='com.taobao.taobao:id/close']" + } + ] + }, + { + "id": "com.tencent.androidqqmail", + "groups": [ + { + "key": 0, + "name": "qq邮箱-广告邮件-列表卡片广告", + "activityIds": "com.tencent.qqmail.fragment.base.MailFragmentActivity", + "rules": [ + "TextView[text=`赞助商提供的广告`] TextView[text=`跳过`]", + "TextView[text=`广告`] LinearLayout + TextView[text=`跳过`]" + ] + }, + { + "key": 1, + "name": "腾讯视频-青少年模式弹窗", + "activityIds": "com.tencent.qqlive.ona.update.trunk.client.TrunkUpdateActivity", + "rules": "TextView[text*=`青少年模式`] +n TextView[id=`com.tencent.qqlive:id/arg`][text=`我知道了`]" + } + ] + }, + { + "id": "com.tencent.qqmusic", + "groups": [ + { + "key": 0, + "name": "QQ音乐-开屏广告", + "activityIds": "com.tencent.qqmusic.activity.AppStarterActivity", + "rules": "TextView[text=`跳过`]" + }, + { + "key": 1, + "name": "QQ音乐-推荐页-广告卡片", + "activityIds": "com.tencent.qqmusic.activity.AppStarterActivity", + "rules": "@LinearLayout[isClickable=true] > TextView[text='广告'] + ImageView" + } + ] + }, + { + "id": "com.tencent.qt.sns", + "groups": [ + { + "key": 0, + "name": "掌上穿越火线-开屏广告", + "activityIds": "com.tencent.gamehelper.ui.main.WelcomeActivity", + "rules": "[id=`com.tencent.qt.sns:id/tv_timer`][text$=`跳过`]" + } + ] + }, + { + "id": "com.xiaomi.market", + "groups": [ + { + "key": 0, + "name": "小米应用商店-首页悬浮窗广告", + "activityIds": "com.xiaomi.market.ui.FloatWebActivity", + "rules": "Button[text='关闭']" + } + ] + }, + { + "id": "com.ximalaya.ting.lite", + "groups": [ + { + "key": 0, + "name": "喜马拉雅极速版-首页-推荐-卡片广告", + "activityIds": "com.ximalaya.ting.android.host.activity.MainActivity", + "rules": "[id='com.ximalaya.ting.lite:id/main_ad_top_home_iv_close']" + } + ] + }, + { + "id": "com.xunlei.downloadprovider", + "groups": [ + { + "key": 0, + "name": "迅雷-开屏广告", + "activityIds": "com.xunlei.downloadprovider.launch.LaunchActivity", + "rules": "TextView[text^=`跳过`]" + } + ] + }, + { + "id": "com.yek.android.kfc.activitys", + "groups": [ + { + "key": 0, + "name": "肯德基-开屏广告", + "activityIds": "com.yum.android.superkfc.ui.v5.HomeV5Activity", + "rules": "[id=`com.yek.android.kfc.activitys:id/splash_tv_3`]" + } + ] + }, + { + "id": "com.yipiao", + "groups": [ + { + "key": 0, + "name": "智行火车票12306抢票-开屏广告", + "activityIds": "com.app.main.entrance.MainActivity", + "rules": "LinearLayout > TextView + TextView[text=`跳过`]" + } + ] + }, + { + "id": "com.zhihu.android", + "groups": [ + { + "key": 0, + "name": "知乎-开屏广告", + "activityIds": [ + "com.zhihu.android.app.ui.activity.LauncherActivity", + "com.zhihu.android.app.ui.activity.LaunchAdActivity", + "com.zhihu.android.app.feed.AdTransparentHostActivity", + "com.miui.home.launcher.Launcher" + ], + "rules": "TextView[id=`com.zhihu.android:id/btn_skip`]" + }, + { + "key": 1, + "name": "知乎-关闭广告弹窗", + "desc": "点击 关闭广告按钮 之后出现的广告弹窗", + "activityIds": [ + "com.zhihu.android.ContentActivity", + "com.zhihu.android.app.ui.activity.MainActivity" + ], + "rules": "@FrameLayout ImageView + TextView[text*=`虚假广告`][id=`com.zhihu.android:id/tv_content`]" + }, + { + "key": 2, + "name": "知乎-关闭广告原因", + "desc": "点击 关闭广告按钮 之后出现的选择原因", + "activityIds": "com.zhihu.android.ContentActivity", + "rules": [ + "[id=`com.zhihu.android:id/confirm_uninterest`]", + "[id=`com.zhihu.android:id/revert_uninterest`] [id=`com.zhihu.android:id/uninterest_reason`]" + ] + }, + { + "key": 3, + "name": "知乎-关闭推荐", + "desc": "关闭回答底部其他回答", + "activityIds": "com.zhihu.android.mix.activity.ContentMixProfileActivity", + "rules": [ + "TextView + View + TextView + TextView[text$=`评论`][text*=`赞同`] + View" + ] + }, + { + "key": 5, + "name": "知乎-推荐页广告卡片", + "desc": "赚稿费广告卡片,盐选推荐广告,知乎学课堂,汽车广告", + "activityIds": "com.zhihu.android.app.ui.activity.MainActivity", + "rules": [ + "[id='com.zhihu.android:id/content'] >2 TextView[text='不感兴趣'][id='com.zhihu.android:id/title']", + "TextView[text=`内容质量差`][id=`com.zhihu.android:id/tv_content`]", + "@ImageView[id=`com.zhihu.android:id/menu`] < FrameLayout - * > TextView[text^=`广告`]", + "@ImageView[id=null][isClickable=true] -n TextView[text*=`广告`][index=0]" + ] + }, + { + "key": 6, + "name": "问题-回答列表-卡片广告", + "activityIds": "com.zhihu.android.ContentActivity", + "rules": [ + "@ImageView -n TextView[text=`广告`][index=0]", + "ImageView[id=null] + TextView[text!=null][id=null] + ViewGroup > ImageView[isClickable=true]" + ] + }, + { + "key": 7, + "name": "回答底部评论顶部的任意广告推荐", + "activityIds": [ + "com.zhihu.android.mixshortcontainer.MixShortContainerActivity", + "com.zhihu.android.app.ui.activity.HostActivity" + ], + "rules": [ + "@Image + TextView[text$=`的广告`]", + "TextView[text$=`的广告`] +n TextView[text=`×`]", + "TextView[text=`查看详情`] + TextView[text=`×`]", + "TextView[text*=`赞同`][text*=`评论`] + TextView[text=`×`]", + "TextView[text*=`回答`][text*=`关注`] + TextView[text=`×`]", + "TextView[text!=null] + TextView[text*=`赞同`] + View > Image", + "TextView[text$=`的广告`] - Image[id=null]", + "TextView[text*=`广告`] +2 Image[id=null]", + "TextView[text*=`点赞`][text*=`的回答`] +2 Image[id=null]", + "TextView[text=''] + Image[text=''] + TextView[text='​'] + Image[id=null][isClickable=true]" + ] + }, + { + "key": 8, + "name": "知乎-关闭首页广告", + "activityIds": "com.zhihu.android.app.ui.activity.AdAlphaVideoActivity", + "rules": "[id=`com.zhihu.android:id/tv_ad_close`]" + }, + { + "key": 9, + "name": "知乎-推荐页-顶部广告", + "activityIds": "com.zhihu.android.app.ui.activity.MainActivity", + "rules": [ + "[id='com.zhihu.android:id/tv_ad_tag'] + [id='com.zhihu.android:id/img_close_focus']" + ] + } + ] + }, + { + "id": "com.zidongdianji", + "groups": [ + { + "key": 0, + "name": "自动点击器-开屏广告", + "activityIds": "com.autoclicker.clicker.ads.SplashActivity", + "rules": [ + "[id=`com.byted.pangle:id/tt_splash_skip_btn`]", + "TextView[text^=`跳过`]" + ] + }, + { + "key": 1, + "name": "自动点击器-首页顶部广告卡片", + "activityIds": "com.autoclicker.clicker.MainActivity", + "rules": [ + { + "activityIds": "com.bytedance.sdk.openadsdk.core.dislike.ui", + "matches": "@LinearLayout > TextView[id=`com.byted.pangle:id/tt_item_tv`][text=`不感兴趣`]" + }, + "Image < @View + View >2 [text*=`广告`]" + ] + } + ] + }, + { + "id": "tv.danmaku.bili", + "groups": [ + { + "key": -1, + "name": "B站-开屏广告", + "desc": "开屏广告,切回APP开屏广告", + "rules": "TextView[id=`tv.danmaku.bili:id/count_down`]" + }, + { + "key": 0, + "name": "评论区顶部公告横幅", + "rules": "LinearLayout[id=`tv.danmaku.bili:id/ad_tint_frame`] > ImageView[desc=`关闭`]", + "excludeActivityIds": [ + "com.bilibili.bililive.room.ui.roomv3.LiveRoomActivityV3" + ] + }, + { + "key": 1, + "name": "青少年模式弹窗", + "rules": "TextView[text*=`青少年模式`] + TextView[text=`我知道了`]" + }, + { + "key": 2, + "name": "动态推荐卡片", + "rules": [ + { + "activityIds": "tv.danmaku.bili.MainActivityV2", + "matches": "[id=`tv.danmaku.bili:id/ad_goods_mark_big`]" + } + ] + }, + { + "key": 3, + "name": "点击关闭广告后出现的弹窗", + "rules": [ + { + "activityIds": "com.bilibili.lib.ui.menu", + "matches": "TextView[text='广告质量差'][id^='tv.danmaku.bili:id/reason']" + } + ] + }, + { + "key": 4, + "name": "视频底部广告", + "activityIds": "com.bilibili.video.videodetail.VideoDetailsActivity", + "rules": [ + "[id=`tv.danmaku.bili:id/reason1_layout`] > [id=`tv.danmaku.bili:id/reason1`][text*=`广告`]", + "[id=`tv.danmaku.bili:id/ad_tint_frame`][desc^=`UP主推荐广告`] @[id=`tv.danmaku.bili:id/more`] > ImageView" + ] + }, + { + "key": 5, + "name": "推荐页-可跳过广告", + "activityIds": "tv.danmaku.bili.MainActivityV2", + "rules": [ + "[id=`tv.danmaku.bili:id/click_skip`]" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..72e26ba4 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "@gkd-kit/subscription", + "type": "module", + "version": "0.0.0", + "private": false, + "main": "./dist/gkd.json", + "files": [ + "dist" + ], + "scripts": { + "build": "tsx ./src/main.ts" + }, + "dependencies": { + "@types/lodash": "^4.14.194", + "@types/node": "^20", + "@types/prettier": "2.7.3", + "dayjs": "^1.11.7", + "dotenv": "16.2.0", + "lodash": "^4.17.21", + "prettier": "2.8.8", + "qiniu": "7.8.0", + "tsx": "^3.12.6", + "typescript": "^5.0.4", + "undici": "^5.22.1" + }, + "volta": { + "node": "20.3.0" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..5941aa5c --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1165 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@types/lodash': + specifier: ^4.14.194 + version: 4.14.194 + '@types/node': + specifier: ^20 + version: 20.0.0 + '@types/prettier': + specifier: 2.7.3 + version: 2.7.3 + dayjs: + specifier: ^1.11.7 + version: 1.11.7 + dotenv: + specifier: 16.2.0 + version: 16.2.0 + lodash: + specifier: ^4.17.21 + version: 4.17.21 + prettier: + specifier: 2.8.8 + version: 2.8.8 + qiniu: + specifier: 7.8.0 + version: 7.8.0 + tsx: + specifier: ^3.12.6 + version: 3.12.6 + typescript: + specifier: ^5.0.4 + version: 5.0.4 + undici: + specifier: 5.22.1 + version: 5.22.1 + +packages: + + /@esbuild-kit/cjs-loader@2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.5.0 + dev: false + + /@esbuild-kit/core-utils@3.1.0: + resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} + dependencies: + esbuild: 0.17.16 + source-map-support: 0.5.21 + dev: false + + /@esbuild-kit/esm-loader@2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.5.0 + dev: false + + /@esbuild/android-arm64@0.17.16: + resolution: {integrity: sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@esbuild/android-arm@0.17.16: + resolution: {integrity: sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@esbuild/android-x64@0.17.16: + resolution: {integrity: sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: false + optional: true + + /@esbuild/darwin-arm64@0.17.16: + resolution: {integrity: sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@esbuild/darwin-x64@0.17.16: + resolution: {integrity: sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@esbuild/freebsd-arm64@0.17.16: + resolution: {integrity: sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/freebsd-x64@0.17.16: + resolution: {integrity: sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-arm64@0.17.16: + resolution: {integrity: sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-arm@0.17.16: + resolution: {integrity: sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-ia32@0.17.16: + resolution: {integrity: sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-loong64@0.17.16: + resolution: {integrity: sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-mips64el@0.17.16: + resolution: {integrity: sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-ppc64@0.17.16: + resolution: {integrity: sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-riscv64@0.17.16: + resolution: {integrity: sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-s390x@0.17.16: + resolution: {integrity: sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/linux-x64@0.17.16: + resolution: {integrity: sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@esbuild/netbsd-x64@0.17.16: + resolution: {integrity: sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/openbsd-x64@0.17.16: + resolution: {integrity: sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: false + optional: true + + /@esbuild/sunos-x64@0.17.16: + resolution: {integrity: sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: false + optional: true + + /@esbuild/win32-arm64@0.17.16: + resolution: {integrity: sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@esbuild/win32-ia32@0.17.16: + resolution: {integrity: sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@esbuild/win32-x64@0.17.16: + resolution: {integrity: sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@tootallnate/once@1.1.2: + resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} + engines: {node: '>= 6'} + dev: false + + /@types/lodash@4.14.194: + resolution: {integrity: sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==} + dev: false + + /@types/node@20.0.0: + resolution: {integrity: sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw==} + dev: false + + /@types/prettier@2.7.3: + resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} + dev: false + + /acorn-walk@8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: false + + /acorn@8.8.2: + resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: false + + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /agentkeepalive@4.3.0: + resolution: {integrity: sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg==} + engines: {node: '>= 8.0.0'} + dependencies: + debug: 4.3.4 + depd: 2.0.0 + humanize-ms: 1.2.1 + transitivePeerDependencies: + - supports-color + dev: false + + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: false + + /ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + dependencies: + tslib: 2.5.3 + dev: false + + /before@0.0.1: + resolution: {integrity: sha512-1J5SWbkoVJH9DTALN8igB4p+nPKZzPrJ/HomqBDLpfUvDXCdjdBmBUcH5McZfur0lftVssVU6BZug5NYh87zTw==} + dev: false + + /block-stream2@2.1.0: + resolution: {integrity: sha512-suhjmLI57Ewpmq00qaygS8UgEq2ly2PCItenIyhMqVjo4t4pGzqMvfgJuX8iWTeSDdfSSqS6j38fL4ToNL7Pfg==} + dependencies: + readable-stream: 3.6.2 + dev: false + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: false + + /busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + dev: false + + /bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + dev: false + + /call-bind@1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + dev: false + + /content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + dev: false + + /copy-to@2.0.1: + resolution: {integrity: sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w==} + dev: false + + /core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: false + + /crc32@0.2.2: + resolution: {integrity: sha512-PFZEGbDUeoNbL2GHIEpJRQGheXReDody/9axKTxhXtQqIL443wnNigtVZO9iuCIMPApKZRv7k2xr8euXHqNxQQ==} + engines: {node: '>= 0.4.0'} + hasBin: true + dev: false + + /data-uri-to-buffer@3.0.1: + resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} + engines: {node: '>= 6'} + dev: false + + /dayjs@1.11.7: + resolution: {integrity: sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==} + dev: false + + /debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + dev: false + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: false + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: false + + /default-user-agent@1.0.0: + resolution: {integrity: sha512-bDF7bg6OSNcSwFWPu4zYKpVkJZQYVrAANMYB8bc9Szem1D0yKdm4sa/rOCs2aC9+2GMqQ7KnwtZRvDhmLF0dXw==} + engines: {node: '>= 0.10.0'} + dependencies: + os-name: 1.0.3 + dev: false + + /degenerator@3.0.4: + resolution: {integrity: sha512-Z66uPeBfHZAHVmue3HPfyKu2Q0rC2cRxbTOsvmU/po5fvvcx27W4mIu9n0PUlQih4oUYvcG1BsbtVv8x7KDOSw==} + engines: {node: '>= 6'} + dependencies: + ast-types: 0.13.4 + escodegen: 1.14.3 + esprima: 4.0.1 + vm2: 3.9.19 + dev: false + + /depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dev: false + + /destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dev: false + + /digest-header@1.1.0: + resolution: {integrity: sha512-glXVh42vz40yZb9Cq2oMOt70FIoWiv+vxNvdKdU8CwjLad25qHM3trLxhl9bVjdr6WaslIXhWpn0NO8T/67Qjg==} + engines: {node: '>= 8.0.0'} + dev: false + + /dotenv@16.2.0: + resolution: {integrity: sha512-jcq2vR1DY1+QA+vH58RIrWLDZOifTGmyQJWzP9arDUbgZcySdzuBb1WvhWZzZtiXgfm+GW2pjBqStqlfpzq7wQ==} + engines: {node: '>=12'} + dev: false + + /ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + dev: false + + /encodeurl@1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + dev: false + + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: false + + /esbuild@0.17.16: + resolution: {integrity: sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.17.16 + '@esbuild/android-arm64': 0.17.16 + '@esbuild/android-x64': 0.17.16 + '@esbuild/darwin-arm64': 0.17.16 + '@esbuild/darwin-x64': 0.17.16 + '@esbuild/freebsd-arm64': 0.17.16 + '@esbuild/freebsd-x64': 0.17.16 + '@esbuild/linux-arm': 0.17.16 + '@esbuild/linux-arm64': 0.17.16 + '@esbuild/linux-ia32': 0.17.16 + '@esbuild/linux-loong64': 0.17.16 + '@esbuild/linux-mips64el': 0.17.16 + '@esbuild/linux-ppc64': 0.17.16 + '@esbuild/linux-riscv64': 0.17.16 + '@esbuild/linux-s390x': 0.17.16 + '@esbuild/linux-x64': 0.17.16 + '@esbuild/netbsd-x64': 0.17.16 + '@esbuild/openbsd-x64': 0.17.16 + '@esbuild/sunos-x64': 0.17.16 + '@esbuild/win32-arm64': 0.17.16 + '@esbuild/win32-ia32': 0.17.16 + '@esbuild/win32-x64': 0.17.16 + dev: false + + /escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: false + + /escodegen@1.14.3: + resolution: {integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==} + engines: {node: '>=4.0'} + hasBin: true + dependencies: + esprima: 4.0.1 + estraverse: 4.3.0 + esutils: 2.0.3 + optionator: 0.8.3 + optionalDependencies: + source-map: 0.6.1 + dev: false + + /esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: false + + /estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + dev: false + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: false + + /extend-shallow@2.0.1: + resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} + engines: {node: '>=0.10.0'} + dependencies: + is-extendable: 0.1.1 + dev: false + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: false + + /file-uri-to-path@2.0.0: + resolution: {integrity: sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==} + engines: {node: '>= 6'} + dev: false + + /formstream@1.2.0: + resolution: {integrity: sha512-ef4F+FQLnQLly1/AZ5OGNgGzzlOmp+T7+L/TaXASJ1GrETrpZb78/Mz7z+1Ra5FX3nLZE0WIOInGOoa81LxWew==} + dependencies: + destroy: 1.2.0 + mime: 2.6.0 + pause-stream: 0.0.11 + dev: false + + /fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: false + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /ftp@0.3.10: + resolution: {integrity: sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==} + engines: {node: '>=0.8.0'} + dependencies: + readable-stream: 1.1.14 + xregexp: 2.0.0 + dev: false + + /function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: false + + /get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-proto: 1.0.1 + has-symbols: 1.0.3 + dev: false + + /get-tsconfig@4.5.0: + resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} + dev: false + + /get-uri@3.0.2: + resolution: {integrity: sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==} + engines: {node: '>= 6'} + dependencies: + '@tootallnate/once': 1.1.2 + data-uri-to-buffer: 3.0.1 + debug: 4.3.4 + file-uri-to-path: 2.0.0 + fs-extra: 8.1.0 + ftp: 0.3.10 + transitivePeerDependencies: + - supports-color + dev: false + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: false + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: false + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: false + + /has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: false + + /http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + dev: false + + /http-proxy-agent@4.0.1: + resolution: {integrity: sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==} + engines: {node: '>= 6'} + dependencies: + '@tootallnate/once': 1.1.2 + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + dependencies: + ms: 2.1.3 + dev: false + + /iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: false + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: false + + /ip@1.1.8: + resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==} + dev: false + + /ip@2.0.0: + resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} + dev: false + + /is-extendable@0.1.1: + resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} + engines: {node: '>=0.10.0'} + dev: false + + /isarray@0.0.1: + resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} + dev: false + + /jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + optionalDependencies: + graceful-fs: 4.2.11 + dev: false + + /levn@0.3.0: + resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.1.2 + type-check: 0.3.2 + dev: false + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: false + + /lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + dependencies: + yallist: 3.1.1 + dev: false + + /mime@2.6.0: + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} + hasBin: true + dev: false + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: false + + /mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: false + + /mockdate@3.0.5: + resolution: {integrity: sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==} + dev: false + + /ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: false + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: false + + /ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: false + + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: false + + /netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + dev: false + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: false + + /object-inspect@1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: false + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: false + + /optionator@0.8.3: + resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} + engines: {node: '>= 0.8.0'} + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.3.0 + prelude-ls: 1.1.2 + type-check: 0.3.2 + word-wrap: 1.2.3 + dev: false + + /os-name@1.0.3: + resolution: {integrity: sha512-f5estLO2KN8vgtTRaILIgEGBoBrMnZ3JQ7W9TMZCnOIGwHe8TRGSpcagnWDo+Dfhd/z08k9Xe75hvciJJ8Qaew==} + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + osx-release: 1.1.0 + win-release: 1.1.1 + dev: false + + /osx-release@1.1.0: + resolution: {integrity: sha512-ixCMMwnVxyHFQLQnINhmIpWqXIfS2YOXchwQrk+OFzmo6nDjQ0E4KXAyyUh0T0MZgV4bUhkRrAbVqlE4yLVq4A==} + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: false + + /pac-proxy-agent@5.0.0: + resolution: {integrity: sha512-CcFG3ZtnxO8McDigozwE3AqAw15zDvGH+OjXO4kzf7IkEKkQ4gxQ+3sdF50WmhQ4P/bVusXcqNE2S3XrNURwzQ==} + engines: {node: '>= 8'} + dependencies: + '@tootallnate/once': 1.1.2 + agent-base: 6.0.2 + debug: 4.3.4 + get-uri: 3.0.2 + http-proxy-agent: 4.0.1 + https-proxy-agent: 5.0.1 + pac-resolver: 5.0.1 + raw-body: 2.5.2 + socks-proxy-agent: 5.0.1 + transitivePeerDependencies: + - supports-color + dev: false + + /pac-resolver@5.0.1: + resolution: {integrity: sha512-cy7u00ko2KVgBAjuhevqpPeHIkCIqPe1v24cydhWjmeuzaBfmUWFCZJ1iAh5TuVzVZoUzXIW7K8sMYOZ84uZ9Q==} + engines: {node: '>= 8'} + dependencies: + degenerator: 3.0.4 + ip: 1.1.8 + netmask: 2.0.2 + dev: false + + /pause-stream@0.0.11: + resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} + dependencies: + through: 2.3.8 + dev: false + + /prelude-ls@1.1.2: + resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} + engines: {node: '>= 0.8.0'} + dev: false + + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: false + + /proxy-agent@5.0.0: + resolution: {integrity: sha512-gkH7BkvLVkSfX9Dk27W6TyNOWWZWRilRfk1XxGNWOYJ2TuedAv1yFpCaU9QSBmBe716XOTNpYNOzhysyw8xn7g==} + engines: {node: '>= 8'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + http-proxy-agent: 4.0.1 + https-proxy-agent: 5.0.1 + lru-cache: 5.1.1 + pac-proxy-agent: 5.0.0 + proxy-from-env: 1.1.0 + socks-proxy-agent: 5.0.1 + transitivePeerDependencies: + - supports-color + dev: false + + /proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: false + + /pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: false + + /qiniu@7.8.0: + resolution: {integrity: sha512-StJ2+E2gnr9BOfUcOLLBSWicc4ItpI3BK+O76ebHKdWrcdNnFfIfHK6dzJY5Fu0k3od2QyuWoNMTZ77SD6emMA==} + engines: {node: '>= 6'} + dependencies: + agentkeepalive: 4.3.0 + before: 0.0.1 + block-stream2: 2.1.0 + crc32: 0.2.2 + destroy: 1.2.0 + encodeurl: 1.0.2 + formstream: 1.2.0 + mime: 2.6.0 + mockdate: 3.0.5 + tunnel-agent: 0.6.0 + urllib: 2.40.0 + transitivePeerDependencies: + - supports-color + dev: false + + /qs@6.11.2: + resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + dev: false + + /raw-body@2.5.2: + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: false + + /readable-stream@1.1.14: + resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 0.0.1 + string_decoder: 0.10.31 + dev: false + + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: false + + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: false + + /safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: false + + /semver@5.7.1: + resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + hasBin: true + dev: false + + /setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + dev: false + + /side-channel@1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + object-inspect: 1.12.3 + dev: false + + /smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + dev: false + + /socks-proxy-agent@5.0.1: + resolution: {integrity: sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + socks: 2.7.1 + transitivePeerDependencies: + - supports-color + dev: false + + /socks@2.7.1: + resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==} + engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} + dependencies: + ip: 2.0.0 + smart-buffer: 4.2.0 + dev: false + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: false + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: false + + /statuses@1.5.0: + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} + dev: false + + /statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + dev: false + + /streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + dev: false + + /string_decoder@0.10.31: + resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} + dev: false + + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: false + + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: false + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: false + + /through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + dev: false + + /toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + dev: false + + /tslib@2.5.3: + resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} + dev: false + + /tsx@3.12.6: + resolution: {integrity: sha512-q93WgS3lBdHlPgS0h1i+87Pt6n9K/qULIMNYZo07nSeu2z5QE2CellcAZfofVXBo2tQg9av2ZcRMQ2S2i5oadQ==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.1.0 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: false + + /tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + dependencies: + safe-buffer: 5.2.1 + dev: false + + /type-check@0.3.2: + resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.1.2 + dev: false + + /typescript@5.0.4: + resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} + engines: {node: '>=12.20'} + hasBin: true + dev: false + + /undici@5.22.1: + resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} + engines: {node: '>=14.0'} + dependencies: + busboy: 1.6.0 + dev: false + + /unescape@1.0.1: + resolution: {integrity: sha512-O0+af1Gs50lyH1nUu3ZyYS1cRh01Q/kUKatTOkSs7jukXE6/NebucDVxyiDsA9AQ4JC1V1jUH9EO8JX2nMDgGQ==} + engines: {node: '>=0.10.0'} + dependencies: + extend-shallow: 2.0.1 + dev: false + + /universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + dev: false + + /unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + dev: false + + /urllib@2.40.0: + resolution: {integrity: sha512-XDZjoijtzsbkXTXgM+A/sJM002nwoYsc46YOYr6MNH2jUUw1nCBf2ywT1WaPsVEWJX4Yr+9isGmYj4+yofFn9g==} + engines: {node: '>= 0.10.0'} + dependencies: + any-promise: 1.3.0 + content-type: 1.0.5 + debug: 2.6.9 + default-user-agent: 1.0.0 + digest-header: 1.1.0 + ee-first: 1.1.1 + formstream: 1.2.0 + humanize-ms: 1.2.1 + iconv-lite: 0.4.24 + ip: 1.1.8 + proxy-agent: 5.0.0 + pump: 3.0.0 + qs: 6.11.2 + statuses: 1.5.0 + utility: 1.18.0 + transitivePeerDependencies: + - supports-color + dev: false + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: false + + /utility@1.18.0: + resolution: {integrity: sha512-PYxZDA+6QtvRvm//++aGdmKG/cI07jNwbROz0Ql+VzFV1+Z0Dy55NI4zZ7RHc9KKpBePNFwoErqIuqQv/cjiTA==} + engines: {node: '>= 0.12.0'} + dependencies: + copy-to: 2.0.1 + escape-html: 1.0.3 + mkdirp: 0.5.6 + mz: 2.7.0 + unescape: 1.0.1 + dev: false + + /vm2@3.9.19: + resolution: {integrity: sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==} + engines: {node: '>=6.0'} + hasBin: true + dependencies: + acorn: 8.8.2 + acorn-walk: 8.2.0 + dev: false + + /win-release@1.1.1: + resolution: {integrity: sha512-iCRnKVvGxOQdsKhcQId2PXV1vV3J/sDPXKA4Oe9+Eti2nb2ESEsYHRYls/UjoUW3bIc5ZDO8dTH50A/5iVN+bw==} + engines: {node: '>=0.10.0'} + dependencies: + semver: 5.7.1 + dev: false + + /word-wrap@1.2.3: + resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} + engines: {node: '>=0.10.0'} + dev: false + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: false + + /xregexp@2.0.0: + resolution: {integrity: sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==} + dev: false + + /yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + dev: false diff --git a/scripts/sync_json.ps1 b/scripts/sync_json.ps1 new file mode 100644 index 00000000..927783f2 --- /dev/null +++ b/scripts/sync_json.ps1 @@ -0,0 +1,4 @@ +pnpm build +git add './dist/*.json' +git commit -m 'chore: sync json' +git push diff --git a/src/apps/air.tv.douyu.android.ts b/src/apps/air.tv.douyu.android.ts new file mode 100644 index 00000000..a80f2579 --- /dev/null +++ b/src/apps/air.tv.douyu.android.ts @@ -0,0 +1,27 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'air.tv.douyu.android', + groups: [ + { + key: 0, + name: '斗鱼-开屏广告', + activityIds: [ + 'com.douyu.module.home.pages.main.MainActivity', + `miuix.appcompat.app.m`, + ], + rules: [ + `[text^='跳过'] + * >2 TextView[text*='跳转']`, // 1686970245243, 1686970188866 + ], + }, + { + key: 1, + name: `斗鱼-青少年模式`, + desc: `关闭青少年模式提醒弹窗`, + activityIds: `com.douyu.module.home.pages.main.MainActivity`, + rules: [ + `[text='开启青少年模式'] + [text='我知道了']`, // 1686970236642 + ], + }, + ], +}; diff --git a/src/apps/cmb.pb.ts b/src/apps/cmb.pb.ts new file mode 100644 index 00000000..523e413b --- /dev/null +++ b/src/apps/cmb.pb.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'cmb.pb', + groups: [ + { + key: 0, + name: '招商银行-开屏广告', + activityIds: 'cmb.pb.app.mainframe.container.PBMainActivity', + rules: '[id=`cmb.pb:id/ll_launch_ad_skip_hot_area`]', + }, + ], +}; diff --git a/src/apps/cn.wps.moffice_eng.ts b/src/apps/cn.wps.moffice_eng.ts new file mode 100644 index 00000000..e01ef1a3 --- /dev/null +++ b/src/apps/cn.wps.moffice_eng.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'cn.wps.moffice_eng', + groups: [ + { + key: 0, + name: 'WPS-开屏广告', + activityIds: 'cn.wps.moffice.documentmanager.PreStartActivity', + rules: '[id=`cn.wps.moffice_eng:id/splash_skip`]', + }, + ], +}; diff --git a/src/apps/com.MobileTicket.ts b/src/apps/com.MobileTicket.ts new file mode 100644 index 00000000..8f7b1bfe --- /dev/null +++ b/src/apps/com.MobileTicket.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.MobileTicket', + groups: [ + { + key: 0, + name: '铁路12306-开屏广告', + activityIds: 'com.MobileTicket.ui.dialog.SplashAdDialog', + rules: '[id=`com.MobileTicket:id/tv_skip`]', + }, + ], +}; diff --git a/src/apps/com.UCMobile.ts b/src/apps/com.UCMobile.ts new file mode 100644 index 00000000..fc89e2f5 --- /dev/null +++ b/src/apps/com.UCMobile.ts @@ -0,0 +1,16 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.UCMobile', + groups: [ + { + key: 0, + name: 'UC浏览器-推荐页广告', + activityIds: 'com.uc.browser.InnerUCMobile', + rules: [ + 'TextView[text=`屏蔽此条广告`]', + 'TextView[text=`广告`] +n ImageView[desc=`不感兴趣`]', + ], + }, + ], +}; diff --git a/src/apps/com.achievo.vipshop.ts b/src/apps/com.achievo.vipshop.ts new file mode 100644 index 00000000..ea2ef141 --- /dev/null +++ b/src/apps/com.achievo.vipshop.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.achievo.vipshop', + groups: [ + { + key: 0, + name: '唯品会-开屏广告', + activityIds: 'com.achievo.vipshop.activity.LodingActivity', + rules: '[id=`com.achievo.vipshop:id/adv_countdown`]', + }, + ], +}; diff --git a/src/apps/com.alibaba.wireless.ts b/src/apps/com.alibaba.wireless.ts new file mode 100644 index 00000000..636bee80 --- /dev/null +++ b/src/apps/com.alibaba.wireless.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.alibaba.wireless', + groups: [ + { + key: 0, + name: '阿里巴巴-开屏广告', + activityIds: 'com.alibaba.wireless.launch.home.V5HomeActivity', + rules: '[id=`com.alibaba.wireless:id/v5_splash_over`]', + }, + ], +}; diff --git a/src/apps/com.android.thememanager.ts b/src/apps/com.android.thememanager.ts new file mode 100644 index 00000000..c6de65f8 --- /dev/null +++ b/src/apps/com.android.thememanager.ts @@ -0,0 +1,12 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.android.thememanager', + groups: [ + { + key: 1, + name: 'miui主题壁纸-推荐下广告', + rules: '[id=`com.android.thememanager:id/ad_close_btn`]', + }, + ], +}; diff --git a/src/apps/com.anjuke.android.app.ts b/src/apps/com.anjuke.android.app.ts new file mode 100644 index 00000000..760c9c2f --- /dev/null +++ b/src/apps/com.anjuke.android.app.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.anjuke.android.app', + groups: [ + { + key: 0, + name: '安居客-开屏广告', + activityIds: 'com.anjuke.android.app.mainmodule.WelcomeActivity', + rules: '[id=`com.anjuke.android.app:id/skip_btn`]', + }, + ], +}; diff --git a/src/apps/com.baidu.BaiduMap.ts b/src/apps/com.baidu.BaiduMap.ts new file mode 100644 index 00000000..37432983 --- /dev/null +++ b/src/apps/com.baidu.BaiduMap.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.baidu.BaiduMap', + groups: [ + { + key: 0, + name: '百度地图-开屏广告', + activityIds: 'com.baidu.baidumaps.MapsActivity', + rules: '@TextView[text^=`跳过`] + TextView[text=`广告`]', + }, + ], +}; diff --git a/src/apps/com.baidu.homework.ts b/src/apps/com.baidu.homework.ts new file mode 100644 index 00000000..649d76ff --- /dev/null +++ b/src/apps/com.baidu.homework.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.baidu.homework', + groups: [ + { + key: 0, + name: '作业帮-开屏广告', + activityIds: 'com.baidu.homework.activity.init.InitActivity', + rules: '[id=`com.baidu.homework:id/adx_splash_skip_text`]', + }, + ], +}; diff --git a/src/apps/com.baidu.netdisk.ts b/src/apps/com.baidu.netdisk.ts new file mode 100644 index 00000000..11cd9495 --- /dev/null +++ b/src/apps/com.baidu.netdisk.ts @@ -0,0 +1,16 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.baidu.netdisk', + groups: [ + { + key: 0, + name: '百度网盘-开屏广告', + activityIds: 'com.baidu.netdisk.ui.Navigate', + rules: [ + '@TextView[text^=`跳过`] + TextView[text=`广告`]', + `[id='com.byted.pangle:id/tt_splash_skip_btn']`, // 1687136781353 + ], + }, + ], +}; diff --git a/src/apps/com.baidu.tieba.ts b/src/apps/com.baidu.tieba.ts new file mode 100644 index 00000000..10f68e82 --- /dev/null +++ b/src/apps/com.baidu.tieba.ts @@ -0,0 +1,65 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.baidu.tieba', + groups: [ + { + key: 0, + name: '百度贴吧-开屏广告', + desc: '数字倒计时广告,圆形倒计时广告', + activityIds: [ + 'com.baidu.tieba.tblauncher.MainTabActivity', + 'com.baidu.tieba.pb.pb.main.PbActivity', + ], + rules: [ + 'TextView[text*=`广告`] - TextView[text^=`跳过`]', + '[id=`com.kwad.dy.sdk:id/ksad_splash_circle_skip_view`] TextView[text=`跳过`]', + '[id=`com.byted.pangle:id/tt_splash_skip_btn`]', + ], + }, + { + key: 1, + name: '任意界面-选择不喜欢理由-不感兴趣', + rules: '@View[text=null] - TextView[text=`选择不喜欢理由`][index=0]', + }, + { + key: 2, + name: '首页/贴吧帖子列表-推荐列表-长得像帖子的广告卡片', + activityIds: [ + 'com.baidu.tieba.tblauncher.MainTabActivity', + 'com.baidu.tieba.frs.FrsActivity', + ], + rules: [ + 'ImageView < @FrameLayout < LinearLayout < RelativeLayout RelativeLayout > TextView[text$=`广告`]', + ], + }, + { + key: 3, + name: '某个广告卡片', + desc: '忘记是哪个卡片了', + activityIds: [ + 'com.baidu.tieba.tblauncher.MainTabActivity', + 'com.baidu.tieba.pb.pb.main.PbActivity', + ], + rules: + 'TextView[text=`广告`] ImageView', + }, + { + key: 4, + name: '帖子评论区内部广告卡片', + activityIds: 'com.baidu.tieba.frs.FrsActivity', + rules: + 'ImageView < @FrameLayout < LinearLayout < RelativeLayout { + id: 'com.bjsk.intelligent', + groups: [ + { + key: 0, + name: 'WiFi智能钥匙-开屏广告', + activityIds: 'com.cssq.wifi.ui.splash.SplashActivity', + rules: [ + '[text^=`跳过`]', + '[id=`com.byted.pangle:id/tt_splash_skip_btn`]', + ], + }, + { + key: 1, + name: 'WiFi智能钥匙-内部启动广告', + activityIds: + 'com.bytedance.sdk.openadsdk.stub.activity.Stub_Standard_Portrait_Activity', + rules: [ + 'Image < @View +4 TextView[text=`反馈`] + View TextView[text=`广告`]', + ], + }, + ], +}; diff --git a/src/apps/com.cmcc.cmvideo.ts b/src/apps/com.cmcc.cmvideo.ts new file mode 100644 index 00000000..81330ff3 --- /dev/null +++ b/src/apps/com.cmcc.cmvideo.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.cmcc.cmvideo', + groups: [ + { + key: 0, + name: '咪咕视频-开屏广告', + activityIds: 'com.cmcc.cmvideo.main.application.CompatibleMainActivity', + rules: '[id=`com.cmcc.cmvideo:id/skip_button`]', + }, + ], +}; diff --git a/src/apps/com.coolapk.market.ts b/src/apps/com.coolapk.market.ts new file mode 100644 index 00000000..4a1af5b4 --- /dev/null +++ b/src/apps/com.coolapk.market.ts @@ -0,0 +1,29 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.coolapk.market', + groups: [ + { + key: 0, + name: '酷安-关闭卡片广告', + desc: '点击卡片右上角按钮,然后点击关闭弹窗', + activityIds: [ + 'com.coolapk.market.view.main.MainActivity', + 'com.coolapk.market.view.base.SimpleAlphaActivity', + ], + rules: [ + { + activityIds: [ + 'com.bytedance.sdk.openadsdk.core.dislike.ui', + 'com.coolapk.market.view.main.MainActivity', + 'com.coolapk.market.view.base.SimpleAlphaActivity', + ], + matches: + '@LinearLayout > TextView[id=`com.byted.pangle:id/tt_item_tv`][text=`不感兴趣`]', + }, + 'Button[text$=`去广告`] - Button[text=`不感兴趣`]', + '[id=`com.coolapk.market:id/close_view`]', + ], + }, + ], +}; diff --git a/src/apps/com.ct.client.ts b/src/apps/com.ct.client.ts new file mode 100644 index 00000000..20491f53 --- /dev/null +++ b/src/apps/com.ct.client.ts @@ -0,0 +1,16 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.ct.client', + groups: [ + { + key: 0, + name: '中国电信-开屏广告', + activityIds: [ + 'com.ct.client.activity.MainActivity', + 'com.ct.client.activity.SplashActivity', + ], + rules: '[id=`com.ct.client:id/tvSkip`]', + }, + ], +}; diff --git a/src/apps/com.daimajia.gold.ts b/src/apps/com.daimajia.gold.ts new file mode 100644 index 00000000..3ce4af10 --- /dev/null +++ b/src/apps/com.daimajia.gold.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.daimajia.gold', + groups: [ + { + key: 0, + name: '稀土掘金-开屏广告', + activityIds: 'im.juejin.android.ui.SplashActivity', + rules: '[id=`com.daimajia.gold:id/fl_skip`]', + }, + ], +}; diff --git a/src/apps/com.dianping.v1.ts b/src/apps/com.dianping.v1.ts new file mode 100644 index 00000000..a4944d31 --- /dev/null +++ b/src/apps/com.dianping.v1.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.dianping.v1', + groups: [ + { + key: 0, + name: '大众点评-开屏广告', + activityIds: 'com.dianping.v1.NovaMainActivity', + rules: '[id=`com.dianping.v1:id/new_skip`]', + }, + ], +}; diff --git a/src/apps/com.dragon.read.ts b/src/apps/com.dragon.read.ts new file mode 100644 index 00000000..c44100a8 --- /dev/null +++ b/src/apps/com.dragon.read.ts @@ -0,0 +1,21 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.dragon.read', + groups: [ + { + key: 0, + name: '番茄免费小说-阅读页面底部广告', + rules: [ + { + activityIds: 'com.dragon.read.ad.banner.ui', + matches: '@[isClickable=true] TextView[text=`关闭此条广告`]', + }, + { + activityIds: 'com.dragon.read.reader.ReaderActivity', + matches: '@ImageView - LinearLayout TextView[text=`广告`]', + }, + ], + }, + ], +}; diff --git a/src/apps/com.duokan.phone.remotecontroller.ts b/src/apps/com.duokan.phone.remotecontroller.ts new file mode 100644 index 00000000..d285fe60 --- /dev/null +++ b/src/apps/com.duokan.phone.remotecontroller.ts @@ -0,0 +1,15 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.duokan.phone.remotecontroller', + groups: [ + { + key: 0, + name: '万能遥控-底部横幅广告', + activityIds: + 'com.xiaomi.mitv.phone.remotecontroller.HoriWidgetMainActivityV2', + rules: + 'ImageView[id=`com.duokan.phone.remotecontroller:id/image_close_banner`]', + }, + ], +}; diff --git a/src/apps/com.duowan.kiwi.ts b/src/apps/com.duowan.kiwi.ts new file mode 100644 index 00000000..ff00a92c --- /dev/null +++ b/src/apps/com.duowan.kiwi.ts @@ -0,0 +1,26 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.duowan.kiwi', + groups: [ + { + key: 0, + name: '虎牙直播-开屏广告', + activityIds: [ + 'com.duowan.kiwi.homepage.Homepage', + 'com.duowan.kiwi.adsplash.view.AdSplashActivity', + ], + rules: ['[id=`com.duowan.kiwi:id/skip_time`]'], + }, + { + key: 1, + name: '虎牙直播-关闭青少年模式弹窗', + activityIds: [ + 'com.duowan.kiwi.homepage.Homepage', + 'com.miui.home.launcher.Launcher', + ], + rules: + '[id=`com.duowan.kiwi:id/hyui_dialog_button_positive`][text=`我知道了`]', + }, + ], +}; diff --git a/src/apps/com.google.android.youtube.ts b/src/apps/com.google.android.youtube.ts new file mode 100644 index 00000000..bf43f2e8 --- /dev/null +++ b/src/apps/com.google.android.youtube.ts @@ -0,0 +1,14 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.google.android.youtube', + groups: [ + { + key: 0, + name: 'youtube-视频播放-跳过广告', + activityIds: + 'com.google.android.apps.youtube.app.watchwhile.WatchWhileActivity', + rules: '[id=`com.google.android.youtube:id/skip_ad_button`]', + }, + ], +}; diff --git a/src/apps/com.gotokeep.keep.ts b/src/apps/com.gotokeep.keep.ts new file mode 100644 index 00000000..c17b523c --- /dev/null +++ b/src/apps/com.gotokeep.keep.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.gotokeep.keep', + groups: [ + { + key: 0, + name: 'Keep-开屏广告', + activityIds: 'com.gotokeep.keep.splash.SplashActivity', + rules: '[id=`com.gotokeep.keep:id/textSkip`]', + }, + ], +}; diff --git a/src/apps/com.greenpoint.android.mc10086.activity.ts b/src/apps/com.greenpoint.android.mc10086.activity.ts new file mode 100644 index 00000000..476fdb9b --- /dev/null +++ b/src/apps/com.greenpoint.android.mc10086.activity.ts @@ -0,0 +1,14 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.greenpoint.android.mc10086.activity', + groups: [ + { + key: 0, + name: '中国移动-开屏广告', + activityIds: 'com.mc10086.cmcc.view.tabs.AppTabFragment', + rules: + '[id=`com.greenpoint.android.mc10086.activity:id/video_time_skip`]', + }, + ], +}; diff --git a/src/apps/com.handsgo.jiakao.android.ts b/src/apps/com.handsgo.jiakao.android.ts new file mode 100644 index 00000000..a8a70eeb --- /dev/null +++ b/src/apps/com.handsgo.jiakao.android.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.handsgo.jiakao.android', + groups: [ + { + key: 0, + name: '驾考宝典-开屏广告', + activityIds: 'com.handsgo.jiakao.android.splash.Login', + rules: '[id=`com.handsgo.jiakao.android:id/closeLayout`]', + }, + ], +}; diff --git a/src/apps/com.hunantv.imgo.activity.ts b/src/apps/com.hunantv.imgo.activity.ts new file mode 100644 index 00000000..bae24fc8 --- /dev/null +++ b/src/apps/com.hunantv.imgo.activity.ts @@ -0,0 +1,16 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.hunantv.imgo.activity', + groups: [ + { + key: 0, + name: '芒果TV-关闭青少年模式提示', + activityIds: [ + 'com.hunantv.imgo.activity.MainActivity', + 'miuix.appcompat.app.m', + ], + rules: '[id=`com.hunantv.imgo.activity:id/btnIknow`]', + }, + ], +}; diff --git a/src/apps/com.hupu.shihuo.ts b/src/apps/com.hupu.shihuo.ts new file mode 100644 index 00000000..a3a8e177 --- /dev/null +++ b/src/apps/com.hupu.shihuo.ts @@ -0,0 +1,14 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.hupu.shihuo', + groups: [ + { + key: 0, + name: '识货-开屏广告', + activityIds: + 'com.shizhi.shihuoapp.module.main.ui.welcome.WelcomeActivity', + rules: '[id=`com.hupu.shihuo:id/fl_countdown`]', + }, + ], +}; diff --git a/src/apps/com.hxak.liangongbao.ts b/src/apps/com.hxak.liangongbao.ts new file mode 100644 index 00000000..9f13346a --- /dev/null +++ b/src/apps/com.hxak.liangongbao.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.hxak.liangongbao', + groups: [ + { + key: 0, + name: '链工宝-开屏广告', + activityIds: 'com.hxak.liangongbao.login.ui.HomeActivity', + rules: '[id=`com.hxak.liangongbao:id/time_down`]', + }, + ], +}; diff --git a/src/apps/com.icbc.ts b/src/apps/com.icbc.ts new file mode 100644 index 00000000..7bc491d8 --- /dev/null +++ b/src/apps/com.icbc.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.icbc', + groups: [ + { + key: 0, + name: '中国工商银行-第一次启动提示', + activityIds: 'com.icbc.activity.init.SplashActivity', + rules: '[id=`com.icbc:id/close_btn`]', + }, + ], +}; diff --git a/src/apps/com.intsig.camscanner.ts b/src/apps/com.intsig.camscanner.ts new file mode 100644 index 00000000..023bdce7 --- /dev/null +++ b/src/apps/com.intsig.camscanner.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.intsig.camscanner', + groups: [ + { + key: 0, + name: '扫描全能王-开屏vip提示', + activityIds: 'com.intsig.camscanner.guide.guidevideo.GuideVideoActivity', + rules: '[id=`com.intsig.camscanner:id/tv_drop_cnl_close_new`]', + }, + ], +}; diff --git a/src/apps/com.iqiyi.hotchat.ts b/src/apps/com.iqiyi.hotchat.ts new file mode 100644 index 00000000..baff1bed --- /dev/null +++ b/src/apps/com.iqiyi.hotchat.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.iqiyi.hotchat', + groups: [ + { + key: 0, + name: '爱奇艺热聊-开屏广告', + activityIds: 'com.iqiyi.hotchat.ui.activity.AdvertisementActivity', + rules: '[id=`com.iqiyi.hotchat:id/tv_advertisement_lunch_skip`]', + }, + ], +}; diff --git a/src/apps/com.kmxs.reader.ts b/src/apps/com.kmxs.reader.ts new file mode 100644 index 00000000..f912ca00 --- /dev/null +++ b/src/apps/com.kmxs.reader.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.kmxs.reader', + groups: [ + { + key: 0, + name: '七猫免费小说-关闭青少年模式', + activityIds: 'com.kmxs.reader.home.ui.HomeActivity', + rules: '[id=`com.kmxs.reader:id/young_dialog_close`]', + }, + ], +}; diff --git a/src/apps/com.kuaikan.comic.ts b/src/apps/com.kuaikan.comic.ts new file mode 100644 index 00000000..863c496e --- /dev/null +++ b/src/apps/com.kuaikan.comic.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.kuaikan.comic', + groups: [ + { + key: 0, + name: '快看-开屏广告', + activityIds: 'com.kuaikan.comic.ui.AdvertisementActivity', + rules: '[id=`com.kuaikan.comic:id/skip_button`]', + }, + ], +}; diff --git a/src/apps/com.kugou.android.ts b/src/apps/com.kugou.android.ts new file mode 100644 index 00000000..71e00506 --- /dev/null +++ b/src/apps/com.kugou.android.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.kugou.android', + groups: [ + { + key: 0, + name: '酷狗音乐-开屏广告', + activityIds: 'com.kugou.android.app.splash.SplashActivity', + rules: '[desc=`跳过`]', + }, + ], +}; diff --git a/src/apps/com.mihoyo.hyperion.ts b/src/apps/com.mihoyo.hyperion.ts new file mode 100644 index 00000000..9fb4543d --- /dev/null +++ b/src/apps/com.mihoyo.hyperion.ts @@ -0,0 +1,19 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.mihoyo.hyperion', + groups: [ + { + key: 0, + name: '米游社-开屏广告', + activityIds: 'com.mihoyo.hyperion.ui.SplashActivity', + rules: '[id=`com.mihoyo.hyperion:id/mSplashBtJump`]', + }, + { + key: 1, + name: '米游社-青少年模式', + desc: '关闭青少年模式提醒弹窗', + rules: 'TextView[id=`com.mihoyo.hyperion:id/tv_dialog_i_know`]', + }, + ], +}; diff --git a/src/apps/com.miui.player.ts b/src/apps/com.miui.player.ts new file mode 100644 index 00000000..b04e6f9a --- /dev/null +++ b/src/apps/com.miui.player.ts @@ -0,0 +1,14 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.miui.player', + groups: [ + { + key: 0, + name: '小米音乐-开屏广告', + activityIds: 'com.tencent.qqmusiclite.activity.MainActivity', + rules: + '@TextView[text$=`跳过`] + TextView[id=`com.miui.player:id/ad_view`]', + }, + ], +}; diff --git a/src/apps/com.miui.systemAdSolution.ts b/src/apps/com.miui.systemAdSolution.ts new file mode 100644 index 00000000..853fb4a1 --- /dev/null +++ b/src/apps/com.miui.systemAdSolution.ts @@ -0,0 +1,19 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.miui.systemAdSolution', + groups: [ + { + key: 0, + name: 'miui任意app开屏广告', + rules: '[id=`com.miui.systemAdSolution:id/view_skip_button`]', + }, + { + key: 1, + name: 'miui-为什么不希望看到这条推广', + desc: '关闭这个提示', + activityIds: 'com.xiaomi.ad.feedback', + rules: '[id=`com.miui.systemAdSolution:id/no_interest`]', + }, + ], +}; diff --git a/src/apps/com.mt.mtxx.mtxx.ts b/src/apps/com.mt.mtxx.mtxx.ts new file mode 100644 index 00000000..d9b14843 --- /dev/null +++ b/src/apps/com.mt.mtxx.mtxx.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.mt.mtxx.mtxx', + groups: [ + { + key: 0, + name: '美图秀秀-开屏广告', + activityIds: 'com.meitu.business.ads.core.activity.AdActivity', + rules: '[id=`com.mt.mtxx.mtxx:id/0*`][text=`跳过广告`]', + }, + ], +}; diff --git a/src/apps/com.netease.cloudmusic.ts b/src/apps/com.netease.cloudmusic.ts new file mode 100644 index 00000000..bff24bdf --- /dev/null +++ b/src/apps/com.netease.cloudmusic.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.netease.cloudmusic', + groups: [ + { + key: 0, + name: '网易云音乐-开屏广告', + activityIds: 'com.netease.cloudmusic.activity.MainActivity', + rules: 'TextView[text^=`跳过`][id=`com.netease.cloudmusic:id/skipBtn`]', + }, + ], +}; diff --git a/src/apps/com.qidian.QDReader.ts b/src/apps/com.qidian.QDReader.ts new file mode 100644 index 00000000..048456da --- /dev/null +++ b/src/apps/com.qidian.QDReader.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.qidian.QDReader', + groups: [ + { + key: 0, + name: '起点读书-开屏广告', + activityIds: 'com.qidian.QDReader.ui.activity.SplashADActivity', + rules: 'Button[text^=`跳过`]', + }, + ], +}; diff --git a/src/apps/com.qiyi.video.ts b/src/apps/com.qiyi.video.ts new file mode 100644 index 00000000..7ed8b765 --- /dev/null +++ b/src/apps/com.qiyi.video.ts @@ -0,0 +1,20 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.qiyi.video', + groups: [ + { + key: 0, + name: 'iqiyi-开屏广告', + activityIds: 'org.qiyi.android.video.MainActivity', + rules: + '@FrameLayout[id=`com.qiyi.video:id/unused_res_a`] > LinearLayout[id=null] > TextView[text=`关闭`][id=`com.qiyi.video:id/unused_res_a`]', + }, + { + key: 1, + name: 'iqiyi-关闭青少年模式弹窗', + activityIds: 'org.qiyi.basecore.widget.dialog.AlertDialogBottom1', + rules: 'Button[id=`com.qiyi.video:id/confirm_btn`][text=`我知道了`]', + }, + ], +}; diff --git a/src/apps/com.quark.browser.ts b/src/apps/com.quark.browser.ts new file mode 100644 index 00000000..135718fa --- /dev/null +++ b/src/apps/com.quark.browser.ts @@ -0,0 +1,16 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.quark.browser', + groups: [ + { + key: 0, + name: '夸克浏览器-小说阅读页面底部广告', + activityIds: 'com.ucpro.BrowserActivity', + rules: [ + '[id=`com.quark.browser:id/tv_close_ad`][text=`关闭广告`]', + '[id=`com.quark.browser:id/ad_close_layout_container`]', + ], + }, + ], +}; diff --git a/src/apps/com.sankuai.meituan.takeoutnew.ts b/src/apps/com.sankuai.meituan.takeoutnew.ts new file mode 100644 index 00000000..f3464ba9 --- /dev/null +++ b/src/apps/com.sankuai.meituan.takeoutnew.ts @@ -0,0 +1,31 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.sankuai.meituan.takeoutnew', + groups: [ + { + key: 0, + name: '美团外卖-开屏广告', + activityIds: + 'com.sankuai.meituan.takeoutnew.ui.page.boot.SplashAdActivity', + rules: + '[id=`com.sankuai.meituan.takeoutnew:id/tv_remain_time`] + TextView[text*=`跳过`]', + }, + { + key: 1, + name: `美团外卖-关闭更新提醒弹窗`, + activityIds: `com.sankuai.waimai.business.page.homepage.widget.dialog.UpdateForceInstallDialog`, + rules: [ + `[id='com.sankuai.meituan.takeoutnew:id/wm_upgrade_force_cancel']`, // 1686969252896 + ], + }, + { + key: 2, + name: `美团外卖-关闭弹窗美食广告`, + activityIds: `com.sankuai.waimai.platform.mach.dialog.DynamicDialog`, + rules: [ + `@[desc='关闭'][isClickable=true] > ImageView`, // 1686969062508 + ], + }, + ], +}; diff --git a/src/apps/com.sankuai.meituan.ts b/src/apps/com.sankuai.meituan.ts new file mode 100644 index 00000000..18386aa1 --- /dev/null +++ b/src/apps/com.sankuai.meituan.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.sankuai.meituan', + groups: [ + { + key: 0, + name: '美团-开屏广告', + activityIds: 'com.meituan.android.pt.homepage.activity.MainActivity', + rules: 'TextView[id=`com.sankuai.meituan:id/close_btn`][text^=`跳过`]', + }, + ], +}; diff --git a/src/apps/com.sdu.didi.psnger.ts b/src/apps/com.sdu.didi.psnger.ts new file mode 100644 index 00000000..5d51bb10 --- /dev/null +++ b/src/apps/com.sdu.didi.psnger.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.sdu.didi.psnger', + groups: [ + { + key: 0, + name: '滴滴-开屏广告', + activityIds: 'com.didi.sdk.app.launch.splash.SplashActivity', + rules: '[id=`com.sdu.didi.psnger:id/skip_ad_ll`]', + }, + ], +}; diff --git a/src/apps/com.sina.weibo.ts b/src/apps/com.sina.weibo.ts new file mode 100644 index 00000000..c483e6d4 --- /dev/null +++ b/src/apps/com.sina.weibo.ts @@ -0,0 +1,19 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.sina.weibo', + groups: [ + { + key: 0, + name: '微博-开屏广告', + activityIds: 'com.sina.weibo.mobileads.view.a', + rules: ['@RelativeLayout > TextView[text=`跳过`]'], + }, + { + key: 1, + name: '微博-评论区顶部-相关推荐', + activityIds: 'com.sina.weibo.feed.DetailWeiboActivity', + rules: 'ImageView[id=`com.sina.weibo:id/iv_ad_x`]', + }, + ], +}; diff --git a/src/apps/com.smile.gifmaker.ts b/src/apps/com.smile.gifmaker.ts new file mode 100644 index 00000000..a795cb5d --- /dev/null +++ b/src/apps/com.smile.gifmaker.ts @@ -0,0 +1,14 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.smile.gifmaker', + groups: [ + { + key: 0, + name: '快手-关闭青少年模式弹窗', + activityIds: 'com.yxcorp.gifshow.HomeActivity', + rules: + '@[id=`com.smile.gifmaker:id/positive`] + [id=`com.smile.gifmaker:id/set_teenage_mode`]', + }, + ], +}; diff --git a/src/apps/com.snda.wifilocating.ts b/src/apps/com.snda.wifilocating.ts new file mode 100644 index 00000000..5d86005d --- /dev/null +++ b/src/apps/com.snda.wifilocating.ts @@ -0,0 +1,21 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.snda.wifilocating', + groups: [ + { + key: 0, + name: 'WiFi万能钥匙-内部广告', + activityIds: 'com.lantern.launcher.ui.MainActivityICS', + rules: [ + { + matches: [ + '[id=`com.snda.wifilocating:id/outer_ad_dislike_item_title`][text=`为什么看到此广告`]', + '@[id=`com.snda.wifilocating:id/outer_ad_dislike_item_one`] [id=`com.snda.wifilocating:id/outer_ad_dislike_item_title`][text=`不感兴趣`]', + ], + }, + 'ImageView[id=`com.snda.wifilocating:id/feed_item_sdk_logo`] < LinearLayout + [id=`com.snda.wifilocating:id/feed_item_dislike`]', + ], + }, + ], +}; diff --git a/src/apps/com.ss.android.ugc.aweme.ts b/src/apps/com.ss.android.ugc.aweme.ts new file mode 100644 index 00000000..425aaaca --- /dev/null +++ b/src/apps/com.ss.android.ugc.aweme.ts @@ -0,0 +1,12 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.ss.android.ugc.aweme', + groups: [ + { + key: 0, + name: '抖音-青少年模式弹窗', + rules: 'Button[text=`开启青少年模式`] + * > Button[text!=null]', + }, + ], +}; diff --git a/src/apps/com.taobao.taobao.ts b/src/apps/com.taobao.taobao.ts new file mode 100644 index 00000000..53419b9a --- /dev/null +++ b/src/apps/com.taobao.taobao.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: `com.taobao.taobao`, + groups: [ + { + key: 0, + name: `淘宝-开屏广告`, + activityIds: `com.taobao.bootimage.activity.BootImageActivity`, + rules: `[id='com.taobao.taobao:id/close']`, // 1687596777612 + }, + ], +}; diff --git a/src/apps/com.tencent.androidqqmail.ts b/src/apps/com.tencent.androidqqmail.ts new file mode 100644 index 00000000..180846c1 --- /dev/null +++ b/src/apps/com.tencent.androidqqmail.ts @@ -0,0 +1,16 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.androidqqmail', + groups: [ + { + key: 0, + name: 'qq邮箱-广告邮件-列表卡片广告', + activityIds: 'com.tencent.qqmail.fragment.base.MailFragmentActivity', + rules: [ + 'TextView[text=`赞助商提供的广告`] { + id: 'com.tencent.djcity', + groups: [ + { + key: 0, + name: '掌上道聚城-开屏广告', + activityIds: 'com.tencent.djcity.activities.homepage.PortalActivity', + rules: '[id=`com.tencent.djcity:id/ad_view_ll_skip`]', + }, + ], +}; diff --git a/src/apps/com.tencent.karaoke.ts b/src/apps/com.tencent.karaoke.ts new file mode 100644 index 00000000..1fe04530 --- /dev/null +++ b/src/apps/com.tencent.karaoke.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.karaoke', + groups: [ + { + key: 0, + name: '全民K歌-开屏广告', + activityIds: 'com.tencent.karaoke.module.splash.ui.SplashAdDialog', + rules: '[text*=`跳过`][id!=null]', + }, + ], +}; diff --git a/src/apps/com.tencent.mm.ts b/src/apps/com.tencent.mm.ts new file mode 100644 index 00000000..3d20a896 --- /dev/null +++ b/src/apps/com.tencent.mm.ts @@ -0,0 +1,38 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.mm', + groups: [ + { + key: 0, + name: '微信朋友圈广告', + desc: '朋友圈信息流广告,点击关闭按钮,确认关闭', + activityIds: 'com.tencent.mm.plugin.sns.ui.SnsTimeLineUI', + rules: [ + 'TextView[text*=`广告`] + TextView[text=`关闭该广告`]', + 'ImageView - TextView[text=`广告`][id!=null][index=0]', + ], + }, + { + key: 1, + name: '微信电脑快捷自动登录', + activityIds: '.plugin.webwx.ui.ExtDeviceWXLoginUI', + rules: 'TextView[text=`取消登录`] - Button[text=`登录`]', + }, + { + key: 2, + name: '微信电脑第三方登录自动授权', + activityIds: ['com.tencent.mm.plugin.webview.ui.tools.SDKOAuthUI'], + rules: 'Button[text=`拒绝`] - Button[text=`允许`]', + }, + { + key: 3, + name: '微信手机第三方app申请使用', + desc: '自动点击同意', + rules: [ + 'TextView + TextView[text=`申请使用`]', + 'Button[text=`拒绝`] - Button[text=`允许`]', + ], + }, + ], +}; diff --git a/src/apps/com.tencent.mobileqq.ts b/src/apps/com.tencent.mobileqq.ts new file mode 100644 index 00000000..aaf8a2f1 --- /dev/null +++ b/src/apps/com.tencent.mobileqq.ts @@ -0,0 +1,21 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.mobileqq', + groups: [ + { + key: 0, + name: 'QQ-开屏广告', + activityIds: 'com.tencent.mobileqq.activity.SplashActivity', + rules: '[text*=`跳过`]', + }, + { + key: 1, + name: `QQ-消息页面-顶部广告`, + activityIds: `com.tencent.mobileqq.activity.SplashActivity`, + rules: [ + `ImageView[id!=null][desc='关闭'][isClickable=true]`, // 1687669217838 + ], + }, + ], +}; diff --git a/src/apps/com.tencent.mtt.ts b/src/apps/com.tencent.mtt.ts new file mode 100644 index 00000000..3b7b9e5a --- /dev/null +++ b/src/apps/com.tencent.mtt.ts @@ -0,0 +1,14 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.mtt', + groups: [ + { + key: 0, + name: 'QQ浏览器-开屏广告', + activityIds: 'com.tencent.mtt.MainActivity', + rules: + '@View[id=null] + ImageView + FrameLayout TextView[text=`向上滑动或点击查看`]', + }, + ], +}; diff --git a/src/apps/com.tencent.qqlive.ts b/src/apps/com.tencent.qqlive.ts new file mode 100644 index 00000000..bd1e30b0 --- /dev/null +++ b/src/apps/com.tencent.qqlive.ts @@ -0,0 +1,24 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.qqlive', + groups: [ + { + key: 0, + name: '腾讯视频-开屏广告', + activityIds: 'com.tencent.qqlive.ona.activity.SplashHomeActivity', + rules: [ + 'TextView[text*=`互动广告`] < LinearLayout < FrameLayout + FrameLayout > TextView[text=`跳过`]', + 'TextView[text=`广告`] LinearLayout + TextView[text=`跳过`]', + ], + }, + { + key: 1, + name: '腾讯视频-青少年模式弹窗', + activityIds: + 'com.tencent.qqlive.ona.update.trunk.client.TrunkUpdateActivity', + rules: + 'TextView[text*=`青少年模式`] +n TextView[id=`com.tencent.qqlive:id/arg`][text=`我知道了`]', + }, + ], +}; diff --git a/src/apps/com.tencent.qqmusic.ts b/src/apps/com.tencent.qqmusic.ts new file mode 100644 index 00000000..eed41286 --- /dev/null +++ b/src/apps/com.tencent.qqmusic.ts @@ -0,0 +1,19 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.qqmusic', + groups: [ + { + key: 0, + name: 'QQ音乐-开屏广告', + activityIds: 'com.tencent.qqmusic.activity.AppStarterActivity', + rules: 'TextView[text=`跳过`]', + }, + { + key: 1, + name: 'QQ音乐-推荐页-广告卡片', + activityIds: 'com.tencent.qqmusic.activity.AppStarterActivity', + rules: `@LinearLayout[isClickable=true] > TextView[text='广告'] + ImageView`, // 1688045698846 + }, + ], +}; diff --git a/src/apps/com.tencent.qt.sns.ts b/src/apps/com.tencent.qt.sns.ts new file mode 100644 index 00000000..00d44db0 --- /dev/null +++ b/src/apps/com.tencent.qt.sns.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.tencent.qt.sns', + groups: [ + { + key: 0, + name: '掌上穿越火线-开屏广告', + activityIds: 'com.tencent.gamehelper.ui.main.WelcomeActivity', + rules: '[id=`com.tencent.qt.sns:id/tv_timer`][text$=`跳过`]', + }, + ], +}; diff --git a/src/apps/com.xiaomi.market.ts b/src/apps/com.xiaomi.market.ts new file mode 100644 index 00000000..4927bb15 --- /dev/null +++ b/src/apps/com.xiaomi.market.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.xiaomi.market', + groups: [ + { + key: 0, + name: '小米应用商店-首页悬浮窗广告', + activityIds: 'com.xiaomi.market.ui.FloatWebActivity', + rules: "Button[text='关闭']", + }, + ], +}; diff --git a/src/apps/com.ximalaya.ting.lite.ts b/src/apps/com.ximalaya.ting.lite.ts new file mode 100644 index 00000000..b9b3ea0a --- /dev/null +++ b/src/apps/com.ximalaya.ting.lite.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.ximalaya.ting.lite', + groups: [ + { + key: 0, + name: '喜马拉雅极速版-首页-推荐-卡片广告', + activityIds: 'com.ximalaya.ting.android.host.activity.MainActivity', + rules: "[id='com.ximalaya.ting.lite:id/main_ad_top_home_iv_close']", + }, + ], +}; diff --git a/src/apps/com.xunlei.downloadprovider.ts b/src/apps/com.xunlei.downloadprovider.ts new file mode 100644 index 00000000..c8ae1df4 --- /dev/null +++ b/src/apps/com.xunlei.downloadprovider.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.xunlei.downloadprovider', + groups: [ + { + key: 0, + name: '迅雷-开屏广告', + activityIds: 'com.xunlei.downloadprovider.launch.LaunchActivity', + rules: 'TextView[text^=`跳过`]', + }, + ], +}; diff --git a/src/apps/com.yek.android.kfc.activitys.ts b/src/apps/com.yek.android.kfc.activitys.ts new file mode 100644 index 00000000..221bc3fd --- /dev/null +++ b/src/apps/com.yek.android.kfc.activitys.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.yek.android.kfc.activitys', + groups: [ + { + key: 0, + name: '肯德基-开屏广告', + activityIds: 'com.yum.android.superkfc.ui.v5.HomeV5Activity', + rules: '[id=`com.yek.android.kfc.activitys:id/splash_tv_3`]', + }, + ], +}; diff --git a/src/apps/com.yipiao.ts b/src/apps/com.yipiao.ts new file mode 100644 index 00000000..b23ef041 --- /dev/null +++ b/src/apps/com.yipiao.ts @@ -0,0 +1,13 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.yipiao', + groups: [ + { + key: 0, + name: '智行火车票12306抢票-开屏广告', + activityIds: 'com.app.main.entrance.MainActivity', + rules: 'LinearLayout > TextView + TextView[text=`跳过`]', + }, + ], +}; diff --git a/src/apps/com.zhihu.android.ts b/src/apps/com.zhihu.android.ts new file mode 100644 index 00000000..156302d9 --- /dev/null +++ b/src/apps/com.zhihu.android.ts @@ -0,0 +1,103 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.zhihu.android', + groups: [ + { + key: 0, + name: '知乎-开屏广告', + activityIds: [ + 'com.zhihu.android.app.ui.activity.LauncherActivity', + 'com.zhihu.android.app.ui.activity.LaunchAdActivity', + 'com.zhihu.android.app.feed.AdTransparentHostActivity', + 'com.miui.home.launcher.Launcher', + ], + rules: 'TextView[id=`com.zhihu.android:id/btn_skip`]', // 1688038758143 + }, + { + key: 1, + name: '知乎-关闭广告弹窗', + desc: '点击 关闭广告按钮 之后出现的广告弹窗', + activityIds: [ + 'com.zhihu.android.ContentActivity', + 'com.zhihu.android.app.ui.activity.MainActivity', + ], + rules: + '@FrameLayout ImageView + TextView[text*=`虚假广告`][id=`com.zhihu.android:id/tv_content`]', // 1687787655006 + }, + { + key: 2, + name: '知乎-关闭广告原因', + desc: '点击 关闭广告按钮 之后出现的选择原因', + activityIds: 'com.zhihu.android.ContentActivity', + rules: [ + '[id=`com.zhihu.android:id/confirm_uninterest`]', + '[id=`com.zhihu.android:id/revert_uninterest`] [id=`com.zhihu.android:id/uninterest_reason`]', + ], + }, + { + key: 3, + name: '知乎-关闭推荐', + desc: '关闭回答底部其他回答', + activityIds: 'com.zhihu.android.mix.activity.ContentMixProfileActivity', + rules: [ + 'TextView + View + TextView + TextView[text$=`评论`][text*=`赞同`] + View', + ], + }, + { + key: 5, + name: '知乎-推荐页广告卡片', + desc: `赚稿费广告卡片,盐选推荐广告,知乎学课堂,汽车广告`, + activityIds: 'com.zhihu.android.app.ui.activity.MainActivity', + rules: [ + `[id='com.zhihu.android:id/content'] >2 TextView[text='不感兴趣'][id='com.zhihu.android:id/title']`, // 1686989681860 + 'TextView[text=`内容质量差`][id=`com.zhihu.android:id/tv_content`]', + '@ImageView[id=`com.zhihu.android:id/menu`] < FrameLayout - * > TextView[text^=`广告`]', // 1687913210243 1686989714786 + '@ImageView[id=null][isClickable=true] -n TextView[text*=`广告`][index=0]', // 1687418944396 1686924015259 + ], + }, + { + key: 6, + name: '问题-回答列表-卡片广告', + activityIds: 'com.zhihu.android.ContentActivity', + rules: [ + '@ImageView -n TextView[text=`广告`][index=0]', // 1687787712268 1687787635158 + `ImageView[id=null] + TextView[text!=null][id=null] + ViewGroup > ImageView[isClickable=true]`, // 1688028432747 + ], + }, + { + key: 7, + name: '回答底部评论顶部的任意广告推荐', + activityIds: [ + 'com.zhihu.android.mixshortcontainer.MixShortContainerActivity', + 'com.zhihu.android.app.ui.activity.HostActivity', + ], + rules: [ + '@Image + TextView[text$=`的广告`]', + 'TextView[text$=`的广告`] +n TextView[text=`×`]', + 'TextView[text=`查看详情`] + TextView[text=`×`]', + 'TextView[text*=`赞同`][text*=`评论`] + TextView[text=`×`]', + 'TextView[text*=`回答`][text*=`关注`] + TextView[text=`×`]', + 'TextView[text!=null] + TextView[text*=`赞同`] + View > Image', + 'TextView[text$=`的广告`] - Image[id=null]', + 'TextView[text*=`广告`] +2 Image[id=null]', // 1687338556331 + 'TextView[text*=`点赞`][text*=`的回答`] +2 Image[id=null]', // 1687076663768 1686969672948 + `TextView[text=''] + Image[text=''] + TextView[text='​'] + Image[id=null][isClickable=true]`, // 1687234636980 + ], + }, + { + key: 8, + name: '知乎-关闭首页广告', + activityIds: 'com.zhihu.android.app.ui.activity.AdAlphaVideoActivity', + rules: '[id=`com.zhihu.android:id/tv_ad_close`]', + }, + { + key: 9, + name: `知乎-推荐页-顶部广告`, + activityIds: `com.zhihu.android.app.ui.activity.MainActivity`, + rules: [ + `[id='com.zhihu.android:id/tv_ad_tag'] + [id='com.zhihu.android:id/img_close_focus']`, // 1686911063850 + ], + }, + ], +}; diff --git a/src/apps/com.zidongdianji.ts b/src/apps/com.zidongdianji.ts new file mode 100644 index 00000000..80ce1974 --- /dev/null +++ b/src/apps/com.zidongdianji.ts @@ -0,0 +1,29 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'com.zidongdianji', + groups: [ + { + key: 0, + name: '自动点击器-开屏广告', + activityIds: 'com.autoclicker.clicker.ads.SplashActivity', + rules: [ + '[id=`com.byted.pangle:id/tt_splash_skip_btn`]', + 'TextView[text^=`跳过`]', + ], + }, + { + key: 1, + name: '自动点击器-首页顶部广告卡片', + activityIds: 'com.autoclicker.clicker.MainActivity', + rules: [ + { + activityIds: 'com.bytedance.sdk.openadsdk.core.dislike.ui', + matches: + '@LinearLayout > TextView[id=`com.byted.pangle:id/tt_item_tv`][text=`不感兴趣`]', + }, + 'Image < @View + View >2 [text*=`广告`]', + ], + }, + ], +}; diff --git a/src/apps/tv.danmaku.bili.ts b/src/apps/tv.danmaku.bili.ts new file mode 100644 index 00000000..2a1e8111 --- /dev/null +++ b/src/apps/tv.danmaku.bili.ts @@ -0,0 +1,63 @@ +import type { AppConfig } from '../types'; + +export default { + id: 'tv.danmaku.bili', + groups: [ + { + key: -1, + name: 'B站-开屏广告', + desc: '开屏广告,切回APP开屏广告', + rules: 'TextView[id=`tv.danmaku.bili:id/count_down`]', + }, + { + key: 0, + name: '评论区顶部公告横幅', + rules: + 'LinearLayout[id=`tv.danmaku.bili:id/ad_tint_frame`] > ImageView[desc=`关闭`]', + excludeActivityIds: [ + 'com.bilibili.bililive.room.ui.roomv3.LiveRoomActivityV3', + ], + }, + { + key: 1, + name: '青少年模式弹窗', + rules: 'TextView[text*=`青少年模式`] + TextView[text=`我知道了`]', + }, + { + key: 2, + name: '动态推荐卡片', + rules: [ + { + activityIds: 'tv.danmaku.bili.MainActivityV2', + matches: '[id=`tv.danmaku.bili:id/ad_goods_mark_big`]', + }, + ], + }, + { + key: 3, + name: '点击关闭广告后出现的弹窗', + rules: [ + { + activityIds: 'com.bilibili.lib.ui.menu', + matches: + "TextView[text='广告质量差'][id^='tv.danmaku.bili:id/reason']", + }, + ], + }, + { + key: 4, + name: '视频底部广告', + activityIds: 'com.bilibili.video.videodetail.VideoDetailsActivity', + rules: [ + '[id=`tv.danmaku.bili:id/reason1_layout`] > [id=`tv.danmaku.bili:id/reason1`][text*=`广告`]', + '[id=`tv.danmaku.bili:id/ad_tint_frame`][desc^=`UP主推荐广告`] @[id=`tv.danmaku.bili:id/more`] > ImageView', + ], + }, + { + key: 5, + name: '推荐页-可跳过广告', + activityIds: 'tv.danmaku.bili.MainActivityV2', + rules: ['[id=`tv.danmaku.bili:id/click_skip`]'], + }, + ], +}; diff --git a/src/file.ts b/src/file.ts new file mode 100644 index 00000000..eb211fbe --- /dev/null +++ b/src/file.ts @@ -0,0 +1,98 @@ +import dayjs from 'dayjs'; +import _ from 'lodash'; +import fs from 'node:fs/promises'; +import url from 'node:url'; +import path from 'node:path'; +import { SubscriptionConfig } from './types'; +import { refreshUrls, uploadFile } from './upload_qiniu'; + +export const relativePath = (p: string) => { + return url.fileURLToPath(new URL(p, import.meta.url)); +}; + +export const writeConfig = async (fp: string, config: SubscriptionConfig) => { + const filePath = relativePath(fp); + const newConfig: SubscriptionConfig = { ...config }; + const oldConfig: SubscriptionConfig = JSON.parse( + await fs.readFile(filePath, 'utf-8').catch(() => `{}`), + ); + + newConfig.version = oldConfig.version ?? 0; + if (_.isEqual(newConfig, oldConfig)) { + return; + } + newConfig.version++; + + // check duplicated key + newConfig.apps?.forEach((app) => { + const keys = new Set(); + app.groups?.forEach((g) => { + if (keys.has(g.key)) { + console.error({ + configName: newConfig.name, + appId: app.id, + groupName: g.name, + groupKey: g.key, + }); + throw new Error(`invalid duplicated group key`); + } + keys.add(g.key); + }); + }); + + const sortKeys: (keyof SubscriptionConfig)[] = [ + `name`, + `version`, + `author`, + 'supportUrl', + `updateUrl`, + `apps`, + ]; + const newKeys = Object.keys(newConfig) as (keyof SubscriptionConfig)[]; + if (newKeys.some((s) => !sortKeys.includes(s))) { + console.log({ + sortKeys, + newKeys, + }); + throw new Error(`sortKeys miss some new key`); + } + // keep json key sort by map + const map = new Map(); + sortKeys.forEach((k) => { + if (newConfig[k] === undefined) return; + map.set(k, newConfig[k]); + }); + const buffer = Buffer.from( + JSON.stringify(Object.fromEntries(map.entries()), void 0, 2), + 'utf-8', + ); + await fs.writeFile(filePath, buffer); + const { key, hash } = await uploadFile(filePath); + await refreshUrls(key); + console.log( + [ + dayjs().format(`HH:mm:ss`), + (buffer.length / 1024).toFixed(3) + `KB`, + newConfig.version, + key, + hash, + ].join(` `), + ); +}; + +export async function* walk(dirPath: string) { + const pathnames = (await fs.readdir(dirPath)).map((s) => + path.join(dirPath, s), + ); + while (pathnames.length > 0) { + const pathname = pathnames.pop()!; + const state = await fs.lstat(pathname); + if (state.isFile()) { + yield pathname; + } else if (state.isDirectory()) { + pathnames.push( + ...(await fs.readdir(pathname)).map((s) => path.join(pathname, s)), + ); + } + } +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 00000000..f54c5549 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,17 @@ +import { relativePath, walk, writeConfig } from './file'; +import { AppConfig, AppConfigMudule } from './types'; + +const apps: AppConfig[] = []; +for await (const tsFp of walk(relativePath('./apps'))) { + const mod: AppConfigMudule = await import(`file://` + tsFp); + apps.push(mod.default); +} +// a,b,c,d +apps.sort((a, b) => (a.id > b.id ? 1 : -1)); + +await writeConfig(`../dist/gkd.json`, { + name: `GKD官方订阅`, + author: `lisonge`, + supportUrl: `https://github.com/lisonge/gkd-subscription`, + apps, +}); diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 00000000..033f6f65 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,69 @@ +type IArray = T | T[]; + +export type SubscriptionConfig = { + name?: string; + version?: number; + author?: string; + /** + * https url + * android file path + */ + updateUrl?: string; + /** + * https url + * android schema url, qq group + */ + supportUrl?: string; + apps?: AppConfig[]; +}; + +type NumberFilter = {}; +type StringFilter = {}; + +type AutoProps = { + activityIds?: IArray; + excludeActivityIds?: IArray; + cd?: number; + // https://github.com/ajv-validator/ajv + appFilter?: { + versionName: StringFilter; + versionCode: NumberFilter; + }; + deviceFilter?: { + device?: StringFilter; + model?: StringFilter; + manufacturer?: StringFilter; + brand?: StringFilter; + sdkInt?: NumberFilter; + release?: StringFilter; + }; +}; + +export type AppConfig = { + id: string; + groups?: GroupConfig[]; +} & AutoProps; + +export type AppConfigMudule = { + default: AppConfig; +}; + +type GroupConfig = { + key: number; + name: string; + desc?: string; + rules?: IArray; +} & AutoProps; + +type RuleConfig = { + key?: number; + name?: string; + desc?: string; + matches?: IArray; + excludeMatches?: IArray; + preKeys?: IArray; +} & AutoProps; + +export const defineSubsConfig = (config: SubscriptionConfig) => { + return JSON.stringify(config, undefined, 2); +}; diff --git a/src/upload_qiniu.ts b/src/upload_qiniu.ts new file mode 100644 index 00000000..e2e6f01a --- /dev/null +++ b/src/upload_qiniu.ts @@ -0,0 +1,75 @@ +import path from 'node:path'; +import qiniu from 'qiniu'; +import 'dotenv/config'; + +const { + QINUI_ACCESS_KEY, + QINUI_SECRET_KEY, + QINIU_BUCKET_NAME, + QINIU_CDN_ORIGIN, +} = process.env; + +const mac = new qiniu.auth.digest.Mac(QINUI_ACCESS_KEY, QINUI_SECRET_KEY); +export const uploadFile = async ( + filePath: string, + fileKey: string | ((filePath: string) => string) = path.basename(filePath), +) => { + const key = typeof fileKey == 'string' ? fileKey : fileKey(filePath); + const putPolicy = new qiniu.rs.PutPolicy({ + scope: QINIU_BUCKET_NAME + `:` + fileKey, + }); + const uploadToken = putPolicy.uploadToken(mac); + + const formUploader = new qiniu.form_up.FormUploader(); + const putExtra = new qiniu.form_up.PutExtra(); + + const respInfo = await new Promise<{ + status: number; + headers: Record; + size: number; + data: { hash: string; key: string }; + }>((res, rej) => { + formUploader.putFile( + uploadToken, + key, + filePath, + putExtra, + (respErr, respBody, respInfo) => { + if (respErr) { + return rej(respErr); + } + res(respInfo); + }, + ); + }); + if (respInfo.status != 200) { + console.error(respInfo); + throw new Error(`upload file failed`); + } + return respInfo.data; +}; + +const cdnManager = new qiniu.cdn.CdnManager(mac); +export const refreshUrls = async (...keys: string[]) => { + if (keys.length == 0) return; + const urls = keys.map((s) => QINIU_CDN_ORIGIN + `/` + s); + const refreshResult = await new Promise<{ + taskIds: Record; + urlQuotaDay: number; + urlSurplusDay: number; + dirQuotaDay: number; + dirSurplusDay: number; + }>((res, rej) => { + cdnManager.refreshUrls(urls, (err, _, respInfo) => { + if (err) { + return rej(err); + } + if (respInfo.statusCode != 200) { + console.error(respInfo); + return rej(new Error(`refreshUrls failed`)); + } + res(respInfo.data); + }); + }); + return refreshResult; +}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..177758a3 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ESNext", + "lib": ["ESNext"], + "module": "ESNext", + "moduleResolution": "Node", + "resolveJsonModule": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + }, + "include": ["./src/**/*.ts", "./scripts/**/*.ts", "./types/**/*.ts"] +} diff --git a/types/global.d.ts b/types/global.d.ts new file mode 100644 index 00000000..ec390df4 --- /dev/null +++ b/types/global.d.ts @@ -0,0 +1,27 @@ +import { + type FormData as FormDataType, + type Headers as HeadersType, + type Request as RequestType, + type Response as ResponseType, +} from 'undici'; + +declare global { + // Re-export undici fetch function and various classes to global scope. + // These are classes and functions expected to be at global scope according to Node.js v18 API + // documentation. + // See: https://nodejs.org/dist/latest-v18.x/docs/api/globals.html + export const { + FormData, + Headers, + Request, + Response, + fetch, + }: typeof import('undici'); + + // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/60924 + + type FormData = FormDataType; + type Headers = HeadersType; + type Request = RequestType; + type Response = ResponseType; +}