@autobe/agent
Version:
AI backend server code generator
19 lines (18 loc) • 862 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTestImportStatements = void 0;
const utils_1 = require("@autobe/utils");
const getTestImportStatements = (document) => {
const typeReferences = Array.from(new Set(Object.keys(document.components.schemas).map((key) => key.split(".")[0]))).sort();
return utils_1.StringUtil.trim `
import { ArrayUtil, RandomGenerator, TestValidator } from "@nestia/e2e";
import { IConnection } from "@nestia/fetcher";
import typia, { tags } from "typia";
import api from "@ORGANIZATION/PROJECT-api";
${typeReferences
.map((ref) => `import type { ${ref} } from "@ORGANIZATION/PROJECT-api/lib/structures/${ref}";`)
.join("\n")}
`;
};
exports.getTestImportStatements = getTestImportStatements;
//# sourceMappingURL=getTestImportStatements.js.map