Linux vmi2545633.contaboserver.net 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64
Apache/2.4.62 (Debian)
Server IP : 127.0.0.1 & Your IP : 127.0.0.1
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
softmedya.net /
node_modules /
.bin /
Delete
Unzip
Name
Size
Permission
Date
Action
clean-orphaned-assets
2.52
KB
-rwxr-xr-x
2025-10-09 13:40
conc
10.9
KB
-rwxr-xr-x
2025-10-09 13:40
concurrently
10.9
KB
-rwxr-xr-x
2025-10-09 13:40
esbuild
9.83
MB
-rwxr-xr-x
2025-10-09 13:40
jiti
794
B
-rwxr-xr-x
2025-10-09 13:40
nanoid
1.1
KB
-rwxr-xr-x
2025-10-09 13:40
rollup
80.29
KB
-rwxr-xr-x
2025-10-09 13:40
tree-kill
244
B
-rwxr-xr-x
2025-10-09 13:40
vite
2.51
KB
-rwxr-xr-x
2025-10-09 13:40
Save
Rename
#!/usr/bin/env node import { readFileSync, readdirSync, unlinkSync, existsSync } from 'fs' import { dirname } from 'path' /* * Argv helpers. */ const argument = (name) => { const index = process.argv.findIndex(argument => argument.startsWith(`--${name}=`)) return index === -1 ? undefined : process.argv[index].substring(`--${name}=`.length) } const option = (name) => process.argv.includes(`--${name}`) /* * Helpers. */ const info = option(`quiet`) ? (() => undefined) : console.log const error = option(`quiet`) ? (() => undefined) : console.error /* * Clean. */ const main = () => { const manifestPaths = argument(`manifest`) ? [argument(`manifest`)] : (option(`ssr`) ? [`./bootstrap/ssr/ssr-manifest.json`, `./bootstrap/ssr/manifest.json`] : [`./public/build/manifest.json`]) const foundManifestPath = manifestPaths.find(existsSync) if (! foundManifestPath) { error(`Unable to find manifest file.`) process.exit(1) } info(`Reading manifest [${foundManifestPath}].`) const manifest = JSON.parse(readFileSync(foundManifestPath).toString()) const manifestFiles = Object.keys(manifest) const isSsr = Array.isArray(manifest[manifestFiles[0]]) isSsr ? info(`SSR manifest found.`) : info(`Non-SSR manifest found.`) const manifestAssets = isSsr ? manifestFiles.flatMap(key => manifest[key]) : manifestFiles.flatMap(key => [ ...manifest[key].css ?? [], manifest[key].file, ]) const assetsPath = argument('assets') ?? dirname(foundManifestPath)+'/assets' info(`Verify assets in [${assetsPath}].`) const existingAssets = readdirSync(assetsPath, { withFileTypes: true }) const orphanedAssets = existingAssets.filter(file => file.isFile()) .filter(file => manifestAssets.findIndex(asset => asset.endsWith(`/${file.name}`)) === -1) if (orphanedAssets.length === 0) { info(`No ophaned assets found.`) } else { orphanedAssets.length === 1 ? info(`[${orphanedAssets.length}] orphaned asset found.`) : info(`[${orphanedAssets.length}] orphaned assets found.`) orphanedAssets.forEach(asset => { const path = `${assetsPath}/${asset.name}` option(`dry-run`) ? info(`Orphaned asset [${path}] would be removed.`) : info(`Removing orphaned asset [${path}].`) if (! option(`dry-run`)) { unlinkSync(path) } }) } } main()