@namcaodev/postman-codegen
Version:
Auto generate all file typescript, query options, mutation options of tanstack query from postman json
20 lines (16 loc) • 439 B
JavaScript
const { execSync } = require("child_process");
const path = require("path");
const plopfilePath = path.resolve(__dirname, "../dist/index.js");
try {
execSync(
`cross-env NODE_OPTIONS='--import tsx' plop --plopfile=${plopfilePath} generate-queries`,
{
stdio: "inherit",
shell: true,
}
);
} catch (error) {
console.error("❌ Error running postman-codegen:", error);
process.exit(1);
}