'use strict';

/**
 * Contract: config template
 *
 * Output raw template content dari db-connection.env (format KEY=VALUE) ke stdout.
 * Read-only utility, tidak membuat file apa pun.
 *
 * Inline migration v4.0.0: business logic asli dari config-template.js
 * di-inline langsung di handler. Adapter process.argv override dihapus karena
 * handler tidak butuh argv. process.exit() dihapus (return normal cukup).
 */

const { DB_CONNECTION_ENV_TEMPLATE } = require('../../lib/templates/db-connection-env');

module.exports = {
    resource: 'config',
    verb: 'template',
    description: 'Output raw template dari db-connection.env (format KEY=VALUE)',
    category: 'utility',
    flags: {},
    examples: [
        'npx restforge config template',
        'npx restforge config template > config/db-connection.env'
    ],
    async handler(_args) {
        process.stdout.write(DB_CONNECTION_ENV_TEMPLATE);
    }
};
