Skip to content

Commit 56abf4c

Browse files
committed
chore(repo): remove unused methods
1 parent 17fd379 commit 56abf4c

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

scripts/sync-common-types.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
const fs = require('fs')
1515
const path = require('path')
16-
const crypto = require('crypto')
1716

1817
const SOURCE_DIR = path.join(__dirname, '../packages/core/postgrest-js/src/types/common')
1918
const DEST_DIR = path.join(__dirname, '../packages/core/supabase-js/src/lib/rest/types/common')
@@ -30,18 +29,6 @@ const HEADER_COMMENT = `/**
3029
3130
`
3231

33-
function getFileHash(filePath) {
34-
if (!fs.existsSync(filePath)) return null
35-
const content = fs.readFileSync(filePath, 'utf8')
36-
return crypto.createHash('md5').update(content).digest('hex')
37-
}
38-
39-
function stripGeneratedHeader(content) {
40-
// Remove existing AUTO-GENERATED header if present
41-
const headerRegex = /^\/\*\*\s*\n\s*\*\s*AUTO-GENERATED FILE[\s\S]*?\*\/\s*\n\s*\n/
42-
return content.replace(headerRegex, '')
43-
}
44-
4532
function syncFile(fileName) {
4633
const sourcePath = path.join(SOURCE_DIR, fileName)
4734
const destPath = path.join(DEST_DIR, fileName)
@@ -85,7 +72,7 @@ function main() {
8572
}
8673

8774
// Get all .ts files from source directory
88-
const sourceFiles = fs.readdirSync(SOURCE_DIR).filter(file => file.endsWith('.ts'))
75+
const sourceFiles = fs.readdirSync(SOURCE_DIR).filter((file) => file.endsWith('.ts'))
8976

9077
if (sourceFiles.length === 0) {
9178
console.error(`❌ No TypeScript files found in ${SOURCE_DIR}`)
@@ -98,7 +85,9 @@ function main() {
9885
if (changed) changedCount++
9986
}
10087

101-
console.log(`\n✨ Sync complete: ${changedCount} file(s) updated, ${sourceFiles.length - changedCount} unchanged`)
88+
console.log(
89+
`\n✨ Sync complete: ${changedCount} file(s) updated, ${sourceFiles.length - changedCount} unchanged`
90+
)
10291

10392
if (changedCount > 0) {
10493
console.log('\n⚠️ Generated files were updated. Please commit these changes.')

0 commit comments

Comments
 (0)