@manuelp1345/graph-generator 1.2.11 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -1
- package/package.json +2 -2
- package/src/cli.ts +2 -1
package/dist/cli.js
CHANGED
@@ -10,13 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
};
|
11
11
|
import { exec } from "child_process";
|
12
12
|
import { promisify } from "util";
|
13
|
+
import path from "path";
|
13
14
|
// Promisify exec to use async/await
|
14
15
|
const execPromise = promisify(exec);
|
15
16
|
// Función para ejecutar el comando de generación de código
|
16
17
|
function runCodegen() {
|
17
18
|
return __awaiter(this, void 0, void 0, function* () {
|
18
19
|
try {
|
19
|
-
const { stdout, stderr } = yield execPromise(
|
20
|
+
const { stdout, stderr } = yield execPromise(`graphql-codegen --config ${path.join(__dirname, "../dist/codegen.js")} `);
|
20
21
|
console.log("stdout:", stdout);
|
21
22
|
if (stderr) {
|
22
23
|
console.error("stderr:", stderr);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@manuelp1345/graph-generator",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.12",
|
4
4
|
"description": "generador de schema y types de graphql",
|
5
5
|
"scripts": {
|
6
6
|
"codegen": "graphql-codegen --config src/codegen.ts",
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"build": "tsc",
|
9
9
|
"prepublishOnly": "npm run codegen && npm run build"
|
10
10
|
},
|
11
|
-
"main": "
|
11
|
+
"main": "src/index.ts",
|
12
12
|
"type": "module",
|
13
13
|
"keywords": [],
|
14
14
|
"author": "manuelDev",
|
package/src/cli.ts
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
import { exec } from "child_process";
|
4
4
|
import { promisify } from "util";
|
5
|
+
import path from "path";
|
5
6
|
|
6
7
|
// Promisify exec to use async/await
|
7
8
|
const execPromise = promisify(exec);
|
@@ -10,7 +11,7 @@ const execPromise = promisify(exec);
|
|
10
11
|
async function runCodegen() {
|
11
12
|
try {
|
12
13
|
const { stdout, stderr } = await execPromise(
|
13
|
-
|
14
|
+
`graphql-codegen --config ${path.join(__dirname, "../dist/codegen.js")} `
|
14
15
|
);
|
15
16
|
|
16
17
|
console.log("stdout:", stdout);
|