pgsql-test
Version:
pgsql-test offers isolated, role-aware, and rollback-friendly PostgreSQL environments for integration tests — giving developers realistic test coverage without external state pollution
24 lines (23 loc) • 763 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.launchql = launchql;
const types_1 = require("@launchql/types");
const core_1 = require("@launchql/core");
function launchql(cwd, cache = false) {
return {
async seed(ctx) {
const proj = new core_1.LaunchQLProject(cwd ?? ctx.connect.cwd);
if (!proj.isInModule())
return;
const opts = (0, types_1.getEnvOptions)({ pg: ctx.config });
await (0, core_1.deployFast)({
opts,
name: proj.getModuleName(),
database: ctx.config.database,
dir: proj.modulePath,
usePlan: true,
cache
});
}
};
}