Chore: new internal assets folder

This commit is contained in:
SukkaW 2024-04-09 18:28:34 +08:00
parent a5c0872890
commit 7bcb871f64
6 changed files with 11 additions and 3 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ public
# $ build output # $ build output
List/ List/
Clash/ Clash/
Internal/
Modules/sukka_local_dns_mapping.sgmodule Modules/sukka_local_dns_mapping.sgmodule
Modules/sukka_url_redirect.sgmodule Modules/sukka_url_redirect.sgmodule
Modules/sukka_common_always_realip.sgmodule Modules/sukka_common_always_realip.sgmodule

View File

@ -56,7 +56,7 @@ export const buildInternalCDNDomains = task(import.meta.path, async (span) => {
...sortDomains(domainDeduper(Array.from(proxySet)), gorhill).map(i => `SUFFIX,${i}`), ...sortDomains(domainDeduper(Array.from(proxySet)), gorhill).map(i => `SUFFIX,${i}`),
...Array.from(proxyKeywords).sort().map(i => `REGEX,${i}`) ...Array.from(proxyKeywords).sort().map(i => `REGEX,${i}`)
], ],
path.resolve(import.meta.dir, '../List/internal/cdn.txt') path.resolve(import.meta.dir, '../Internal/cdn.txt')
); );
}); });

View File

@ -23,7 +23,7 @@ export const buildInternalReverseChnCIDR = task(import.meta.path, async () => {
) )
); );
return Bun.write(path.resolve(import.meta.dir, '../List/internal/reversed-chn-cidr.txt'), `${reversedCidr.join('\n')}\n`); return Bun.write(path.resolve(import.meta.dir, '../Internal/reversed-chn-cidr.txt'), `${reversedCidr.join('\n')}\n`);
}); });
if (import.meta.main) { if (import.meta.main) {

View File

@ -13,6 +13,7 @@ const folderAndFilesToBeDeployed = [
`Clash${path.sep}`, `Clash${path.sep}`,
`Modules${path.sep}`, `Modules${path.sep}`,
`Script${path.sep}`, `Script${path.sep}`,
`Internal${path.sep}`,
'LICENSE' 'LICENSE'
]; ];
@ -57,6 +58,7 @@ const priorityOrder: Record<'default' | string & {}, number> = {
Script: 14, Script: 14,
Mock: 15, Mock: 15,
Assets: 16, Assets: 16,
Internal: 17,
LICENSE: 20, LICENSE: 20,
default: Number.MAX_VALUE default: Number.MAX_VALUE
}; };

View File

@ -190,7 +190,7 @@ export const buildRejectDomainSet = task(import.meta.path, async (span) => {
compareAndWriteFile( compareAndWriteFile(
span, span,
rejectDomainsStats.map(([domain, count]) => `${domain}${' '.repeat(100 - domain.length)}${count}`), rejectDomainsStats.map(([domain, count]) => `${domain}${' '.repeat(100 - domain.length)}${count}`),
path.resolve(import.meta.dir, '../List/internal/reject-stats.txt') path.resolve(import.meta.dir, '../Internal/reject-stats.txt')
) )
]); ]);
}); });

View File

@ -113,6 +113,11 @@ export const buildSSPanelUIMAppProfile = task(import.meta.path, async (span) =>
output, output,
path.resolve(import.meta.dir, '../List/internal/appprofile.php') path.resolve(import.meta.dir, '../List/internal/appprofile.php')
); );
await compareAndWriteFile(
span,
output,
path.resolve(import.meta.dir, '../Internal/appprofile.php')
);
}); });
if (import.meta.main) { if (import.meta.main) {