mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
33 lines
825 B
JavaScript
33 lines
825 B
JavaScript
// SPDX-FileCopyrightText: 2025-2026 Social Connect Labs, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
|
|
|
|
const {
|
|
removeExistingModule,
|
|
PRIVATE_MODULE_PATH,
|
|
} = require('./setup-private-modules.cjs');
|
|
const fs = require('fs');
|
|
|
|
function cleanupPrivateModules() {
|
|
console.log('🧹 Cleaning up private modules...');
|
|
|
|
try {
|
|
if (fs.existsSync(PRIVATE_MODULE_PATH)) {
|
|
removeExistingModule();
|
|
console.log('✅ Private modules cleanup complete');
|
|
} else {
|
|
console.log('✅ No private modules to clean up');
|
|
}
|
|
} catch (error) {
|
|
console.error('❌ Cleanup failed:', error.message);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
// Script execution
|
|
if (require.main === module) {
|
|
cleanupPrivateModules();
|
|
}
|
|
|
|
module.exports = { cleanupPrivateModules };
|