/**
 * Gate function for bootstrap seeders.
 *
 * Returns true when either:
 *   - BOOTSTRAP_SEED=true is set explicitly, OR
 *   - NODE_ENV is not 'production' (development, test, undefined).
 *
 * This is the single source of truth for the gate — both IamBootstrapSeeder
 * and OAuthBootstrapSeeder import from here. The gate is a pure process.env
 * function with zero BC coupling, so it belongs in @aurora/ (framework/config).
 *
 * @aurora imports nothing from @app / BC-scoped @api — that direction is forbidden.
 * @app and @api importing from @aurora is the allowed direction.
 */

/** Returns true when the bootstrap seeders should run. */
export const bootstrapSeederIsEnabled = (): boolean => {
  if (process.env.BOOTSTRAP_SEED === 'true') return true;
  return process.env.NODE_ENV !== 'production';
};
