mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-14 12:14:33 +01:00
Working
This commit is contained in:
25
script.cjs
Normal file
25
script.cjs
Normal file
@@ -0,0 +1,25 @@
|
||||
const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
|
||||
const filesToModify = [
|
||||
'node_modules/drizzle-orm/pg-core/columns/timestamp.js',
|
||||
'node_modules/drizzle-orm/pg-core/columns/timestamp.cjs',
|
||||
]
|
||||
|
||||
filesToModify.forEach((file) => {
|
||||
const filePath = path.join(__dirname, file)
|
||||
console.log(`Checking path: ${filePath}`)
|
||||
|
||||
if (fs.existsSync(filePath)) {
|
||||
let fileContent = fs.readFileSync(filePath, 'utf8')
|
||||
fileContent = fileContent.replace(
|
||||
'return value.toISOString()',
|
||||
'return value',
|
||||
)
|
||||
fs.writeFileSync(filePath, fileContent, 'utf8')
|
||||
console.log(`Modified: ${file}`)
|
||||
}
|
||||
else {
|
||||
console.error(`File not found: ${filePath}`)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user