mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-21 22:18:04 +02:00
feat: security overhaul (proxy ssrf fix, streaming sanitization, docker optimization)
This commit is contained in:
1 parent
6d87ada2b8
commit
8df9a37baa
810 files changed
+131090
-151
No files matched your search
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* {module_display_name} Module Installer
|
||||
* Custom installation logic
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Object} options - Installation options
|
||||
* @param {string} options.projectRoot - Project root directory
|
||||
* @param {Object} options.config - Module configuration from module.yaml
|
||||
* @param {Array} options.installedIDEs - List of IDE codes being configured
|
||||
* @param {Object} options.logger - Logger instance (log, warn, error methods)
|
||||
* @returns {boolean} - true if successful, false to abort installation
|
||||
*/
|
||||
async function install(options) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { projectRoot, config, installedIDEs, logger } = options;
|
||||
|
||||
logger.log('Installing {module_display_name}...');
|
||||
|
||||
try {
|
||||
// TODO: Add your custom installation logic here
|
||||
|
||||
// Example: Create data directory
|
||||
// const fs = require('fs');
|
||||
// const dataPath = config.data_path;
|
||||
// if (!fs.existsSync(dataPath)) {
|
||||
// fs.mkdirSync(dataPath, { recursive: true });
|
||||
// logger.log(`Created data directory: ${dataPath}`);
|
||||
// }
|
||||
|
||||
// Example: Initialize configuration file
|
||||
// const configPath = path.join(projectRoot, config.config_file);
|
||||
// fs.writeFileSync(configPath, JSON.stringify({
|
||||
// initialized: new Date().toISOString(),
|
||||
// version: config.module_version
|
||||
// }, null, 2));
|
||||
|
||||
logger.log('{module_display_name} installation complete!');
|
||||
return true;
|
||||
} catch (error) {
|
||||
logger.error(`Installation failed: ${error.message}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line unicorn/prefer-module
|
||||
module.exports = { install };
|
||||
Reference in new issue
Block a user