@manuelp1345/graph-generator 1.2.8 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +2 -1
- package/package.json +3 -1
- package/src/cli.ts +2 -1
package/dist/cli.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
#!/usr/bin/env node
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -20,7 +21,7 @@ const execPromise = promisify(exec);
|
|
20
21
|
function runCodegen() {
|
21
22
|
return __awaiter(this, void 0, void 0, function* () {
|
22
23
|
try {
|
23
|
-
const { stdout, stderr } = yield execPromise("graphql-codegen --config src/codegen.ts");
|
24
|
+
const { stdout, stderr } = yield execPromise("npx graphql-codegen --config src/codegen.ts");
|
24
25
|
console.log(stdout);
|
25
26
|
if (stderr) {
|
26
27
|
console.error(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.10",
|
4
4
|
"description": "generador de schema y types de graphql",
|
5
5
|
"scripts": {
|
6
6
|
"codegen": "graphql-codegen --config src/codegen.ts",
|
@@ -8,6 +8,8 @@
|
|
8
8
|
"build": "tsc",
|
9
9
|
"prepublishOnly": "npm run codegen && npm run build"
|
10
10
|
},
|
11
|
+
"main": "dist/index.js",
|
12
|
+
"type": "module",
|
11
13
|
"keywords": [],
|
12
14
|
"author": "manuelDev",
|
13
15
|
"license": "ISC",
|
package/src/cli.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
#!/usr/bin/env node
|
1
2
|
import { exec } from "child_process";
|
2
3
|
import { promisify } from "util";
|
3
4
|
|
@@ -14,7 +15,7 @@ const execPromise = promisify(exec);
|
|
14
15
|
async function runCodegen() {
|
15
16
|
try {
|
16
17
|
const { stdout, stderr } = await execPromise(
|
17
|
-
"graphql-codegen --config src/codegen.ts"
|
18
|
+
"npx graphql-codegen --config src/codegen.ts"
|
18
19
|
);
|
19
20
|
console.log(stdout);
|
20
21
|
if (stderr) {
|