import { generateTypeScriptSDK } from "../../../../../scripts/generate-sdk-typescript.js";
function generateSDK(context) {
  const { spec, implType, outputDir } = context;
  if (!spec) {
    throw new Error("Specification is required in template context");
  }
  const config = implType.configuration || {};
  const options = {
    packageName: config.packageName || "@specverse/sdk",
    packageVersion: config.packageVersion || "1.0.0",
    includeAuth: config.includeAuth !== false,
    includeRetry: config.includeRetry !== false,
    timeout: config.timeout || 3e4,
    retries: config.retries || 3
  };
  const result = generateTypeScriptSDK(spec, outputDir || "./sdk-typescript", options);
  return JSON.stringify({
    message: "TypeScript SDK generated successfully",
    packageName: result.packageName,
    resourceCount: result.resourceCount,
    endpointCount: result.endpointCount,
    outputDir: result.outputDir,
    files: result.files
  }, null, 2);
}
export {
  generateSDK as default
};
