⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
node_modules
/
es-abstract
/
operations
/
View File Name :
spackle.js
'use strict'; const path = require('path'); const fs = require('fs'); const childProcess = require('child_process'); const deltas = require('./deltas'); const years = require('./years'); const writtenFiles = [5].concat(years).flatMap((year, i, arr) => { if ((i + 1) < arr.length) { const ops = fs.readdirSync(path.join(process.cwd(), String(year))); return ops.flatMap((opFile) => { const maybeDirPath = path.join(process.cwd(), String(year), opFile); if (fs.statSync(maybeDirPath).isDirectory()) { return fs.readdirSync(maybeDirPath).map((x) => `${opFile}::${path.basename(x, path.extname(x))}`); } return opFile; }).map((opFile) => { const op = path.basename(opFile, path.extname(opFile)); const opPath = op.replace('::', '/'); const thisFile = path.join(process.cwd(), String(year), `${opPath}.js`); const nextYear = arr[i + 1]; const nextFile = path.join(process.cwd(), String(nextYear), `${opPath}.js`); console.log('**', opFile, op, opPath, thisFile, nextFile); fs.mkdirSync(path.dirname(nextFile), { recursive: true }); if (!deltas[nextYear].removed.has(op) && fs.existsSync(thisFile) && !fs.existsSync(nextFile)) { console.log(`writing: ${nextYear}/${opPath} -> ${year}/${opPath}`); const thisSpecifier = `../${year}/${opPath}`; const reexport = `'use strict'; module.exports = require('${thisSpecifier}'); `; const replacement = fs.readFileSync(thisFile, 'utf-8'); fs.writeFileSync(nextFile, process.argv[2] ? replacement : reexport); return path.relative(process.cwd(), nextFile); } return null; }); } return []; }).filter(Boolean); fs.writeFileSync(path.join(process.cwd(), '.gitattributes'), writtenFiles.map((x) => `${x}\tspackled linguist-generated=true`).join('\n')); childProcess.execSync(`git add .gitattributes ${writtenFiles.join(' ')}`);